X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=cmd%2Fzpool%2Fzpool_vdev.c;h=8c4fadebd14cb9e7d3857dcec67abdbbe96881fd;hb=c242c188fd7df8ecdb793a3d12ed584cbe3ff424;hp=ea887f8b9c77a236dcc727d99f59a5bf77954447;hpb=df30f56639f96175ba71d83b4456ccf410c46542;p=zfs.git diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index ea887f8..8c4fade 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -188,19 +188,10 @@ check_error(int err) static int check_slice(const char *path, blkid_cache cache, int force, boolean_t isspare) { - struct stat64 statbuf; int err; #ifdef HAVE_LIBBLKID char *value; -#endif /* HAVE_LIBBLKID */ - - if (stat64(path, &statbuf) != 0) { - vdev_error(gettext("cannot stat %s: %s\n"), - path, strerror(errno)); - return (-1); - } -#ifdef HAVE_LIBBLKID /* No valid type detected device is safe to use */ value = blkid_get_tag_value(cache, "TYPE", path); if (value == NULL) @@ -376,9 +367,9 @@ is_whole_disk(const char *path) /* * This may be a shorthand device path or it could be total gibberish. * Check to see if it's a known device in /dev/, /dev/disk/by-id, - * /dev/disk/by-label, /dev/disk/by-path, /dev/disk/by-uuid, or - * /dev/disk/zpool/. As part of this check, see if we've been given - * an entire disk (minus the slice number). + * /dev/disk/by-label, /dev/disk/by-path, /dev/disk/by-uuid, + * /dev/disk/by-vdev, or /dev/disk/zpool/. As part of this check, see + * if we've been given an entire disk (minus the slice number). */ static int is_shorthand_path(const char *arg, char *path,