Lines Matching defs:path
33 * disk=(path=..., devid=...)
34 * file=(path=...)
133 check_slice(const char *path, int force, boolean_t wholedisk, boolean_t isspare)
146 if (dm_inuse((char *)path, &msg, who, &error) || error) {
163 (dm_isoverlapping((char *)path, &msg, &error) || error)) {
166 vdev_error(gettext("%s overlaps with %s\n"), path, msg);
256 check_device(const char *path, boolean_t force, boolean_t isspare)
263 * For whole disks, libdiskmgt does not include the leading dev path.
265 dev = strrchr(path, '/');
269 err = check_disk(path, desc, force, isspare);
274 return (check_slice(path, force, B_FALSE, isspare));
358 char path[MAXPATHLEN];
361 snprintf(path, sizeof(path), "%s%s", _PATH_DEV, name);
363 strlcpy(path, name, sizeof(path));
365 return (check_file(path, force, isspare));
382 char path[MAXPATHLEN];
384 (void) snprintf(path, sizeof (path), "%s%s%s",
386 if ((fd = open(path, O_RDWR | O_NDELAY)) < 0)
412 * /dev/dsk/xxx Complete disk path
413 * /xxx Full path to file
419 char path[MAXPATHLEN];
426 * Determine what type of vdev this is, and put the full path into
427 * 'path'. We detect whether this is a device of file afterwards by
432 * Complete device or file path. Exact type is determined by
443 (void) strlcpy(path, arg, sizeof (path));
446 * This may be a short path for a device, or it could be total
452 strlcpy(path, arg, sizeof (path));
454 snprintf(path, sizeof (path), "%s%s", _PATH_DEV, arg);
455 wholedisk = is_whole_disk(path);
456 if (!wholedisk && (stat64(path, &statbuf) != 0)) {
469 gettext("must be a full path or "
475 path, strerror(errno));
498 "GEOM provider or regular file\n"), path);
505 * vdevs have a 'path' element, and devices also have a 'devid' element.
508 verify(nvlist_add_string(vdev, ZPOOL_CONFIG_PATH, path) == 0);
527 if ((fd = open(path, O_RDONLY)) < 0) {
529 "%s\n"), path, strerror(errno));
659 char *path;
695 ZPOOL_CONFIG_PATH, &path) == 0);
732 if ((fd = open(path, O_RDONLY)) >= 0) {
736 err = stat64(path, &statbuf);
935 char *type, *path, *diskname;
952 * We have a disk device. Get the path to the device
956 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
961 diskname = strrchr(path, '/');
970 (void) snprintf(buf, sizeof (buf), "%ss0", path);
993 * Update the path to refer to the 's0' slice. The presence of
1026 * Determine if the given path is a hot spare within the given configuration.
1029 is_spare(nvlist_t *config, const char *path)
1041 if ((fd = open(path, O_RDONLY)) < 0)
1083 char *type, *path;
1094 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
1106 path);
1109 (void) strlcpy(buf, path, sizeof (buf));
1116 ret = check_device(path, force, isspare);
1118 ret = check_file(path, force, isspare);
1437 char *path;
1442 ZPOOL_CONFIG_PATH, &path) == 0);
1443 if ((type = is_grouping(path, &min, &max)) != NULL) {