Lines Matching refs:device

64  * A struct to hold device "specifications" extracted from a user
65 * specified device name. This struct is used to compare the user's
66 * available and unavailable device specifications against physical
70 * user supplied device name is parsable as a CTD name, it is parsed
73 * The CTD name space implies a device hierarchy and metassist
77 * correspond to an individual physical device depending on
145 device_spec_t *device);
149 device_spec_t *device);
152 * get_spec_for_name builds up a cached mapping of device
155 * This saves repeatedly converting the device names, which
187 * avail_specs_list is a list of device spec_t
194 * unavail_specs_list is a list of device spec_t
247 device_spec_t *device);
915 * device specifications.
947 * INPUT: name - a char* device CTD name
1583 * INPUT: desc - a dm_descriptor_t device handle
1591 * PURPOSE: Internal helper which determines if the input device can
1595 * The device is assumed to be a known valid device.
1597 * The function checks if the device passes the request's
1598 * available and unavailable device specifications.
1600 * The input device name may be either a DID name or a CTD
1667 * which specifies more "components" of a cXtXdXsX device
1816 * Converts the input arrays of (un)available device names into
1874 * INPUT: specs - char * array of device CTD names
1882 * PURPOSE: Function which converts the input CTD device names to the
2265 * device_name - char * device name
2266 * check_aliases - boolean_t which indicates whether the device's
2273 * avail is set to B_TRUE if the named device is available for
2276 * PURPOSE: Determine if the named device can be used to satisfy the
2279 * There are several levels at which device availabiity or
2368 /* does avail spec list include named device? */
2380 /* device is available, is it in the unavail list? */
2397 /* does unavail spec list include named device? */
2421 * device_name - a char * device CTD name
2422 * check_aliases - boolean_t which indicates if the device's
2426 * OUTPUT: includes - B_TRUE - if named device is "included" by any
2434 * if the input list of device specifications "includes"
2435 * a specific device.
2470 * device_name - a char * device CTD name
2471 * check_aliases - boolean_t which indicates if the device's
2475 * OUTPUT: includes - B_TRUE - if named device is "included" by any
2483 * if the input list of device specifications "includes"
2484 * a specific device.
2505 * so a more exact spec will rule the device out before a less
2509 * input device name is "c3t0d0s0", it will match "c3t0d0"
2513 * If the input device name is ruled out by a non-controller
2530 "device \"%s\" is unavailable, "
2544 * Need to see if the named device is a disk or slice,
2628 * device_name - a char * device CTD name
2629 * check_aliases - boolean_t which indicates if the device's
2632 * OUTPUT: includes - B_TRUE - if device is "included" by the input
2640 * determines if the input device specification "includes"
2641 * the named device.
2643 * If check_aliases is true and the named device is a slice or
2666 dm_descriptor_t device = (dm_descriptor_t)0;
2670 error = slice_get_by_name(device_name, &device);
2671 if (device != (dm_descriptor_t)0) {
2672 error = get_aliases(device, &aliases);
2674 error = disk_get_by_name(device_name, &device);
2675 if (device != (dm_descriptor_t)0) {
2676 error = get_aliases(device, &aliases);
2733 * INPUT: name - pointer to a char* device name
2741 * device name.
2751 /* allocate the device spec and try various parsing schemes */
2769 * INPUT: name - pointer to a char* device name
2777 * PURPOSE: Function which atttempts to parse the input device name into
2854 gettext("no slice component in device "
2874 "in device name \"%s\".\n"),
2905 "in device name \"%s\".\n"),
2930 "in device name \"%s\".\n"),
2980 * INPUT: name - pointer to a char* device name
2990 * the "raw" spec is just the input device name.
3008 gettext("made raw device spec for \"%s\"\n"), ctd_str);
3016 * INPUT: name - pointer to a char* device name
3085 * device_spec_t *device)
3088 * device - pointer to a device_spec struct
3090 * RETURNS: boolean_t - B_TRUE if the device is included in the spec
3093 * PURPOSE: Function which determines if the input device matches the
3105 device_spec_t *device)
3107 if ((spec->type == SPEC_TYPE_CTD) && (device->type == SPEC_TYPE_CTD)) {
3108 return (ctd_spec_includes_device(spec, device));
3110 (device->type == SPEC_TYPE_RAW)) {
3111 return (raw_spec_includes_device(spec, device));
3119 * device_spec_t *device)
3122 * device - pointer to a device_spec struct
3124 * RETURNS: boolean_t - B_TRUE if the device is included in the spec
3127 * PURPOSE: Function which determines if the input CTD device spec
3131 * both the specification and the device.
3133 * The device must match each of the ids in the spec that
3148 device_spec_t *device)
3160 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl) &&
3161 (spec->data.ctd->lun == device->data.ctd->lun) &&
3162 (spec->data.ctd->slice == device->data.ctd->slice);
3167 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl) &&
3168 (spec->data.ctd->lun == device->data.ctd->lun);
3172 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl);
3185 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl) &&
3186 (spec->data.ctd->target == device->data.ctd->target) &&
3187 (spec->data.ctd->lun == device->data.ctd->lun) &&
3188 (spec->data.ctd->slice == device->data.ctd->slice);
3194 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl) &&
3195 (spec->data.ctd->target == device->data.ctd->target) &&
3196 (spec->data.ctd->lun == device->data.ctd->lun);
3201 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl) &&
3202 (spec->data.ctd->target == device->data.ctd->target);
3206 match = (spec->data.ctd->ctrl == device->data.ctd->ctrl);
3217 device->data.ctd->ctrl, device->data.ctd->target,
3218 device->data.ctd->lun, device->data.ctd->slice);
3225 * device_spec_t *device)
3228 * device - pointer to a device_spec struct
3230 * RETURNS: boolean_t - B_TRUE if the device is included in the spec
3233 * PURPOSE: Function which determines if the input raw device spec
3238 * If the spec's raw device name is exactly contained at the
3239 * beginning of the device spec's raw name, then the function
3245 device_spec_t *device)
3248 device->data.raw, strlen(spec->data.raw)) == 0);
3254 * INPUT: name - opaque pointer to a char * device name
3260 * PURPOSE: dlist_t helper which compares the input device name
3261 * to the list_item's device name for equality.
3328 * desc - a dm_descriptor_t device handle
3335 * PURPOSE: Utility function to determine which of the possible device
3336 * names should be used to access a known available device.
3340 * If the input device is a multipathed disk or slice, it
3343 * or unavailable device specifications.
3366 gettext("device DID name %s is preferred\n"),
3378 gettext("device name %s is accessible\n"),
3397 gettext("device alias %s is accessible for %s\n"),