diff options
author | Ned Bass <[email protected]> | 2010-10-18 11:26:04 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2010-10-22 12:25:58 -0700 |
commit | 4682b8c14efdeae26808195422a763b896fef037 (patch) | |
tree | 5c7eae915070f77c5e31ff3741a33aad90075d44 /cmd/zpool | |
parent | a2c6816c34952eb6dad51248d31172189fba9126 (diff) |
Remove solaris-specific code from make_leaf_vdev()
Portability between Solaris and Linux isn't really an issue for us anymore, and
removing sections like this one helps simplify the code.
Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'cmd/zpool')
-rw-r--r-- | cmd/zpool/zpool_vdev.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index 0c4c97075..bcfb02eed 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -499,43 +499,6 @@ make_leaf_vdev(const char *arg, uint64_t is_log) verify(nvlist_add_uint64(vdev, ZPOOL_CONFIG_WHOLE_DISK, (uint64_t)wholedisk) == 0); -#if defined(__sun__) || defined(__sun) - /* - * For a whole disk, defer getting its devid until after labeling it. - */ - if (S_ISBLK(statbuf.st_mode) && !wholedisk) { - /* - * Get the devid for the device. - */ - int fd; - ddi_devid_t devid; - char *minor = NULL, *devid_str = NULL; - - if ((fd = open(path, O_RDONLY|O_EXCL)) < 0) { - (void) fprintf(stderr, gettext("cannot open '%s': " - "%s\n"), path, strerror(errno)); - nvlist_free(vdev); - return (NULL); - } - - if (devid_get(fd, &devid) == 0) { - if (devid_get_minor_name(fd, &minor) == 0 && - (devid_str = devid_str_encode(devid, minor)) != - NULL) { - verify(nvlist_add_string(vdev, - ZPOOL_CONFIG_DEVID, devid_str) == 0); - } - if (devid_str != NULL) - devid_str_free(devid_str); - if (minor != NULL) - devid_str_free(minor); - devid_free(devid); - } - - (void) close(fd); - } -#endif - return (vdev); } |