2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved. 2N/A * Use is subject to license terms. 2N/A * structure for di_devlink_walk 2N/A * callback funtion for di_devlink_walk 2N/A * Find matching /dev link for the given path argument. 2N/A * devlink element and callback function argument. 2N/A * The input path is expected to not have "/devices". 2N/A * When path is specified, it doesn't have minor 2N/A * name. Therefore, the ../.. prefixes needs to be stripped. 2N/A /* make it sure the device path has minor name */ 2N/A * Convert /devices paths to /dev sym-link paths. 2N/A * The mapping buffer OSDeviceName paths will be 2N/A * converted to short names. 2N/A * mappings The target mappings data to convert to short names 2N/A * If no link is found, the long path is left as is. 2N/A * Note: The NumberOfEntries field MUST not be greater than the size 2N/A * of the array passed in. 2N/A /* search link for minor node */ 2N/A * Finds controller path for a give device path. 2N/A * Return value: /dev link for dir and minor name. 2N/A "Unable to open %s to find controller number.",
dir);
2N/A "Invalid argument for storing the link.");
2N/A * dirplen is large enough to fit the largest path- 2N/A * struct dirent includes one byte (the terminator) 2N/A * so we don't add 1 to the calculation here. 2N/A * set to another pointer since dirp->d_name length is 1 2N/A * that will store only the first char 'c' from the name. 2N/A * if device path has substring of path 2N/A * and exactally matching with :scsi suffix 2N/A * Finds controller path for a give device path. 2N/A * Return vale:i smp devlink. 2N/A * Finds smp devlink for a give smp path. 2N/A * Return vale: smp devlink.