Changeset View
Changeset View
Standalone View
Standalone View
cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
Show First 20 Lines • Show All 268 Lines • ▼ Show 20 Lines | return (gettext("\tlist [-Hp] [-r|-d max] [-o property[,...]] " | ||||
"[-s property]...\n\t [-S property]... [-t type[,...]] " | "[-s property]...\n\t [-S property]... [-t type[,...]] " | ||||
"[filesystem|volume|snapshot] ...\n")); | "[filesystem|volume|snapshot] ...\n")); | ||||
case HELP_MOUNT: | case HELP_MOUNT: | ||||
return (gettext("\tmount\n" | return (gettext("\tmount\n" | ||||
"\tmount [-vO] [-o opts] <-a | filesystem>\n")); | "\tmount [-vO] [-o opts] <-a | filesystem>\n")); | ||||
case HELP_PROMOTE: | case HELP_PROMOTE: | ||||
return (gettext("\tpromote <clone-filesystem>\n")); | return (gettext("\tpromote <clone-filesystem>\n")); | ||||
case HELP_RECEIVE: | case HELP_RECEIVE: | ||||
return (gettext("\treceive|recv [-vnsFu] <filesystem|volume|" | return (gettext("\treceive|recv [-vnsFMu] <filesystem|volume|" | ||||
"snapshot>\n" | "snapshot>\n" | ||||
"\treceive|recv [-vnsFu] [-o origin=<snapshot>] [-d | -e] " | "\treceive|recv [-vnsFMu] [-o origin=<snapshot>] [-d | -e] " | ||||
"<filesystem>\n" | "<filesystem>\n" | ||||
"\treceive|recv -A <filesystem|volume>\n")); | "\treceive|recv -A <filesystem|volume>\n")); | ||||
case HELP_RENAME: | case HELP_RENAME: | ||||
return (gettext("\trename [-f] <filesystem|volume|snapshot> " | return (gettext("\trename [-f] <filesystem|volume|snapshot> " | ||||
"<filesystem|volume|snapshot>\n" | "<filesystem|volume|snapshot>\n" | ||||
"\trename [-f] -p <filesystem|volume> <filesystem|volume>\n" | "\trename [-f] -p <filesystem|volume> <filesystem|volume>\n" | ||||
"\trename -r <snapshot> <snapshot>\n" | "\trename -r <snapshot> <snapshot>\n" | ||||
"\trename <bookmark> <bookmark>\n" | "\trename <bookmark> <bookmark>\n" | ||||
▲ Show 20 Lines • Show All 3,758 Lines • ▼ Show 20 Lines | zfs_do_receive(int argc, char **argv) | ||||
nvlist_t *props; | nvlist_t *props; | ||||
nvpair_t *nvp = NULL; | nvpair_t *nvp = NULL; | ||||
if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) | if (nvlist_alloc(&props, NV_UNIQUE_NAME, 0) != 0) | ||||
nomem(); | nomem(); | ||||
/* check options */ | /* check options */ | ||||
while ((c = getopt(argc, argv, ":o:denuvFsA")) != -1) { | while ((c = getopt(argc, argv, ":o:denuvMFsA")) != -1) { | ||||
switch (c) { | switch (c) { | ||||
case 'o': | case 'o': | ||||
if (parseprop(props, optarg) != 0) | if (parseprop(props, optarg) != 0) | ||||
return (1); | return (1); | ||||
break; | break; | ||||
case 'd': | case 'd': | ||||
flags.isprefix = B_TRUE; | flags.isprefix = B_TRUE; | ||||
break; | break; | ||||
Show All 10 Lines | while ((c = getopt(argc, argv, ":o:denuvMFsA")) != -1) { | ||||
case 'v': | case 'v': | ||||
flags.verbose = B_TRUE; | flags.verbose = B_TRUE; | ||||
break; | break; | ||||
case 's': | case 's': | ||||
flags.resumable = B_TRUE; | flags.resumable = B_TRUE; | ||||
break; | break; | ||||
case 'F': | case 'F': | ||||
flags.force = B_TRUE; | flags.force = B_TRUE; | ||||
break; | |||||
case 'M': | |||||
flags.forceunmount = B_TRUE; | |||||
break; | break; | ||||
case 'A': | case 'A': | ||||
abort_resumable = B_TRUE; | abort_resumable = B_TRUE; | ||||
break; | break; | ||||
case ':': | case ':': | ||||
(void) fprintf(stderr, gettext("missing argument for " | (void) fprintf(stderr, gettext("missing argument for " | ||||
"'%c' option\n"), optopt); | "'%c' option\n"), optopt); | ||||
usage(B_FALSE); | usage(B_FALSE); | ||||
▲ Show 20 Lines • Show All 65 Lines • ▼ Show 20 Lines | zfs_do_receive(int argc, char **argv) | ||||
if (isatty(STDIN_FILENO)) { | if (isatty(STDIN_FILENO)) { | ||||
(void) fprintf(stderr, | (void) fprintf(stderr, | ||||
gettext("Error: Backup stream can not be read " | gettext("Error: Backup stream can not be read " | ||||
"from a terminal.\n" | "from a terminal.\n" | ||||
"You must redirect standard input.\n")); | "You must redirect standard input.\n")); | ||||
return (1); | return (1); | ||||
} | } | ||||
err = zfs_receive(g_zfs, argv[0], props, &flags, STDIN_FILENO, NULL); | err = zfs_receive(g_zfs, argv[0], props, &flags, STDIN_FILENO, NULL); | ||||
bcr: This is debug output, right? ;) | |||||
return (err != 0); | return (err != 0); | ||||
} | } | ||||
/* | /* | ||||
* allow/unallow stuff | * allow/unallow stuff | ||||
*/ | */ | ||||
/* copied from zfs/sys/dsl_deleg.h */ | /* copied from zfs/sys/dsl_deleg.h */ | ||||
▲ Show 20 Lines • Show All 3,382 Lines • Show Last 20 Lines |
This is debug output, right? ;)