summaryrefslogtreecommitdiff
path: root/cmds-send.c
diff options
context:
space:
mode:
Diffstat (limited to 'cmds-send.c')
-rw-r--r--cmds-send.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/cmds-send.c b/cmds-send.c
index 4a8478de..b314c400 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -431,11 +431,6 @@ int cmd_send_start(int argc, char **argv)
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':
@@ -508,6 +503,13 @@ int cmd_send_start(int argc, char **argv)
}
}
+ 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];