From 172ca0a7f1d0ac09753b717e5b23a041baf78f47 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 15 Oct 2009 09:34:17 -0700 Subject: [PATCH] Remove topic branch linux-have-libdiskmgt --- cmd/zpool/zpool_vdev.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/cmd/zpool/zpool_vdev.c b/cmd/zpool/zpool_vdev.c index 7a2fabfe17..7ff3684155 100644 --- a/cmd/zpool/zpool_vdev.c +++ b/cmd/zpool/zpool_vdev.c @@ -64,9 +64,7 @@ #include #include #include -#ifdef HAVE_LIBDISKMGT #include -#endif #include #include #include @@ -114,7 +112,6 @@ vdev_error(const char *fmt, ...) va_end(ap); } -#ifdef HAVE_LIBDISKMGT static void libdiskmgt_error(int error) { @@ -276,7 +273,6 @@ check_device(const char *path, boolean_t force, boolean_t isspare) return (check_slice(path, force, B_FALSE, isspare)); } -#endif /* * Check that a file is valid. All we can do in this case is check that it's @@ -288,10 +284,9 @@ check_file(const char *file, boolean_t force, boolean_t isspare) char *name; int fd; int ret = 0; + int err; pool_state_t state; boolean_t inuse; -#ifdef HAVE_DM_INUSE_SWAP - int err; if (dm_inuse_swap(file, &err)) { if (err) @@ -301,7 +296,6 @@ check_file(const char *file, boolean_t force, boolean_t isspare) "Please see swap(1M).\n"), file); return (-1); } -#endif if ((fd = open(file, O_RDONLY)) < 0) return (0); @@ -1068,15 +1062,11 @@ check_in_use(nvlist_t *config, nvlist_t *nv, int force, int isreplacing, return (0); } -#ifdef HAVE_LIBDISKMGT if (strcmp(type, VDEV_TYPE_DISK) == 0) ret = check_device(path, force, isspare); if (strcmp(type, VDEV_TYPE_FILE) == 0) ret = check_file(path, force, isspare); -#else - ret = check_file(path, force, isspare); -#endif return (ret); }