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 | |
parent | c65e71073f45e6e549c825969740cb15a96ea547 (diff) |
Rebase master to b108
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/zfs/zfs_main.c | 9 | ||||
-rw-r--r-- | cmd/zpool/zpool_main.c | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 161a15392..1f7f47d08 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_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. */ @@ -1747,7 +1747,7 @@ zfs_do_list(int argc, char **argv) boolean_t scripted = B_FALSE; static char default_fields[] = "name,used,available,referenced,mountpoint"; - int types = ZFS_TYPE_FILESYSTEM | ZFS_TYPE_VOLUME; + int types = ZFS_TYPE_DATASET; boolean_t types_specified = B_FALSE; char *fields = NULL; list_cbdata_t cb = { 0 }; @@ -2440,7 +2440,7 @@ zfs_do_receive(int argc, char **argv) bzero(&flags, sizeof (recvflags_t)); /* check options */ - while ((c = getopt(argc, argv, ":dnvF")) != -1) { + while ((c = getopt(argc, argv, ":dnuvF")) != -1) { switch (c) { case 'd': flags.isprefix = B_TRUE; @@ -2448,6 +2448,9 @@ zfs_do_receive(int argc, char **argv) case 'n': flags.dryrun = B_TRUE; break; + case 'u': + flags.nomount = B_TRUE; + break; case 'v': flags.verbose = B_TRUE; break; 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); } |