diff options
author | Brian Behlendorf <[email protected]> | 2009-02-18 12:51:31 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2009-02-18 12:51:31 -0800 |
commit | d164b2093561a9771db07346e6fffc9ca19427a2 (patch) | |
tree | b24adaf8695cebdd827968ac1df3cc0093936be1 /cmd/zpool/zpool_main.c | |
parent | c65e71073f45e6e549c825969740cb15a96ea547 (diff) |
Rebase master to b108
Diffstat (limited to 'cmd/zpool/zpool_main.c')
-rw-r--r-- | cmd/zpool/zpool_main.c | 5 |
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); } |