Lines Matching defs:path

33  * 		disk=(path=..., devid=...)
34 * file=(path=...)
134 check_slice(const char *path, int force, boolean_t wholedisk, boolean_t isspare)
147 if (dm_inuse((char *)path, &msg, who, &error) || error) {
164 (dm_isoverlapping((char *)path, &msg, &error) || error)) {
167 vdev_error(gettext("%s overlaps with %s\n"), path, msg);
257 check_device(const char *path, boolean_t force, boolean_t isspare)
264 * For whole disks, libdiskmgt does not include the leading dev path.
266 dev = strrchr(path, '/');
270 err = check_disk(path, desc, force, isspare);
275 return (check_slice(path, force, B_FALSE, isspare));
367 char path[MAXPATHLEN];
369 (void) snprintf(path, sizeof (path), "%s%s%s",
371 if ((fd = open(path, O_RDWR | O_NDELAY)) < 0)
387 * /dev/dsk/xxx Complete disk path
388 * /xxx Full path to file
394 char path[MAXPATHLEN];
401 * Determine what type of vdev this is, and put the full path into
402 * 'path'. We detect whether this is a device of file afterwards by
407 * Complete device or file path. Exact type is determined by
418 (void) strlcpy(path, arg, sizeof (path));
421 * This may be a short path for a device, or it could be total
426 (void) snprintf(path, sizeof (path), "%s/%s", DISK_ROOT,
428 wholedisk = is_whole_disk(path);
429 if (!wholedisk && (stat64(path, &statbuf) != 0)) {
442 gettext("must be a full path or "
448 path, strerror(errno));
463 "block device or regular file\n"), path);
470 * vdevs have a 'path' element, and devices also have a 'devid' element.
473 verify(nvlist_add_string(vdev, ZPOOL_CONFIG_PATH, path) == 0);
491 if ((fd = open(path, O_RDONLY)) < 0) {
493 "%s\n"), path, strerror(errno));
621 char *path;
654 ZPOOL_CONFIG_PATH, &path) == 0);
691 if ((fd = open(path, O_RDONLY)) >= 0) {
695 err = stat64(path, &statbuf);
893 char *type, *path, *diskname;
910 * We have a disk device. Get the path to the device
914 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
919 diskname = strrchr(path, '/');
928 (void) snprintf(buf, sizeof (buf), "%ss0", path);
951 * Update the path to refer to the 's0' slice. The presence of
983 * Determine if the given path is a hot spare within the given configuration.
986 is_spare(nvlist_t *config, const char *path)
998 if ((fd = open(path, O_RDONLY)) < 0)
1040 char *type, *path;
1051 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
1062 path);
1064 (void) strlcpy(buf, path, sizeof (buf));
1071 ret = check_device(path, force, isspare);
1073 ret = check_file(path, force, isspare);
1390 char *path;
1395 ZPOOL_CONFIG_PATH, &path) == 0);
1396 if ((type = is_grouping(path, &min, &max)) != NULL) {