summaryrefslogtreecommitdiffstats
path: root/cmd/zpool/zpool_main.c
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2009-02-18 12:51:31 -0800
committerBrian Behlendorf <[email protected]>2009-02-18 12:51:31 -0800
commitd164b2093561a9771db07346e6fffc9ca19427a2 (patch)
treeb24adaf8695cebdd827968ac1df3cc0093936be1 /cmd/zpool/zpool_main.c
parentc65e71073f45e6e549c825969740cb15a96ea547 (diff)
Rebase master to b108
Diffstat (limited to 'cmd/zpool/zpool_main.c')
-rw-r--r--cmd/zpool/zpool_main.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cmd/zpool/zpool_main.c b/cmd/zpool/zpool_main.c
index 1bca45c80..42c6aabb6 100644
--- a/cmd/zpool/zpool_main.c
+++ b/cmd/zpool/zpool_main.c
@@ -20,7 +20,7 @@
*/
/*
- * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -1323,7 +1323,8 @@ do_import(nvlist_t *config, const char *newname, const char *mntopts,
verify((zhp = zpool_open_canfail(g_zfs, name)) != NULL);
- if (zpool_enable_datasets(zhp, mntopts, 0) != 0) {
+ if (zpool_get_state(zhp) != POOL_STATE_UNAVAIL &&
+ zpool_enable_datasets(zhp, mntopts, 0) != 0) {
zpool_close(zhp);
return (1);
}