memset(&send, 0, sizeof(send));
send.dump_fd = fileno(stdout);
- if (isatty(send.dump_fd)) {
- fprintf(stderr, "ERROR: not dumping send stream into a terminal, redirect it into a file\n");
- return 1;
- }
-
while ((c = getopt(argc, argv, "vc:f:i:p:")) != -1) {
switch (c) {
case 'v':
}
}
+ if (isatty(send.dump_fd)) {
+ fprintf(stderr,
+ "ERROR: not dumping send stream into a terminal, "
+ "redirect it into a file\n");
+ return 1;
+ }
+
/* use first send subvol to determine mount_root */
subvol = argv[optind];
NULL
};
-static const char * const cmd_send_usage[] = {
+const char * const cmd_send_usage[] = {
"btrfs send [-v] [-p <parent>] [-c <clone-src>] <subvol>",
"Send the subvolume to stdout.",
"Sends the subvolume specified by <subvol> to stdout.",
"which case 'btrfs send' will determine a suitable parent among the",
"clone sources itself.",
"\n",
- "-v Enable verbose debug output. Each occurrency of",
+ "-v Enable verbose debug output. Each occurrence of",
" this option increases the verbose level more.",
"-p <parent> Send an incremental stream from <parent> to",
" <subvol>.",
NULL
};
-const struct cmd_group send_cmd_group = {
- send_cmd_group_usage, NULL, {
- { "send", cmd_send_start, cmd_send_usage, NULL, 0 },
- { 0, 0, 0, 0, 0 },
- },
-};
-
int cmd_send(int argc, char **argv)
{
return cmd_send_start(argc, argv);