Lines Matching defs:path

33  * 		disk=(path=..., devid=...)
34 * file=(path=...)
132 check_slice(const char *path, int force, boolean_t wholedisk, boolean_t isspare)
145 if (dm_inuse((char *)path, &msg, who, &error) || error) {
162 (dm_isoverlapping((char *)path, &msg, &error) || error)) {
165 vdev_error(gettext("%s overlaps with %s\n"), path, msg);
255 check_device(const char *path, boolean_t force, boolean_t isspare)
262 * For whole disks, libdiskmgt does not include the leading dev path.
264 dev = strrchr(path, '/');
268 err = check_disk(path, desc, force, isspare);
273 return (check_slice(path, force, B_FALSE, isspare));
365 char path[MAXPATHLEN];
367 (void) snprintf(path, sizeof (path), "%s%s%s",
369 if ((fd = open(path, O_RDWR | O_NDELAY)) < 0)
385 * /dev/dsk/xxx Complete disk path
386 * /xxx Full path to file
392 char path[MAXPATHLEN];
399 * Determine what type of vdev this is, and put the full path into
400 * 'path'. We detect whether this is a device of file afterwards by
405 * Complete device or file path. Exact type is determined by
416 (void) strlcpy(path, arg, sizeof (path));
419 * This may be a short path for a device, or it could be total
424 (void) snprintf(path, sizeof (path), "%s/%s", ZFS_DISK_ROOT,
426 wholedisk = is_whole_disk(path);
427 if (!wholedisk && (stat64(path, &statbuf) != 0)) {
440 gettext("must be a full path or "
446 path, strerror(errno));
461 "block device or regular file\n"), path);
468 * vdevs have a 'path' element, and devices also have a 'devid' element.
471 verify(nvlist_add_string(vdev, ZPOOL_CONFIG_PATH, path) == 0);
489 if ((fd = open(path, O_RDONLY)) < 0) {
491 "%s\n"), path, strerror(errno));
618 char *path;
651 ZPOOL_CONFIG_PATH, &path) == 0);
688 if ((fd = open(path, O_RDONLY)) >= 0) {
692 err = stat64(path, &statbuf);
890 char *type, *path, *diskname;
907 * We have a disk device. Get the path to the device
911 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
916 diskname = strrchr(path, '/');
925 (void) snprintf(buf, sizeof (buf), "%ss0", path);
948 * Update the path to refer to the 's0' slice. The presence of
980 * Determine if the given path is a hot spare within the given configuration.
983 is_spare(nvlist_t *config, const char *path)
995 if ((fd = open(path, O_RDONLY)) < 0)
1037 char *type, *path;
1048 verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
1059 path);
1061 (void) strlcpy(buf, path, sizeof (buf));
1068 ret = check_device(path, force, isspare);
1070 ret = check_file(path, force, isspare);
1387 char *path;
1392 ZPOOL_CONFIG_PATH, &path) == 0);
1393 if ((type = is_grouping(path, &min, &max)) != NULL) {