David Sterba
2012-Oct-25 15:27 UTC
[PATCH] btrfs-progs: do not send stream into a terminal
Signed-off-by: David Sterba <dsterba@suse.cz>
---
cmds-send.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/cmds-send.c b/cmds-send.c
index 9b47e70..e37f5d2 100644
--- a/cmds-send.c
+++ b/cmds-send.c
@@ -427,6 +427,11 @@ 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, "vf:i:p:")) != -1) {
switch (c) {
case ''v'':
--
1.7.6.233.gd79bc
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs"
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Apparently Analagous Threads
- [PATCH] btrfs-progs: fsck: understand the -s option
- [PATCH] Btrfs-progs: add send option for using new end-cmd semantic
- [PATCH] btrfs-progs: add filter for deleted but uncleanded subvolumes
- [PATCH] btrfs-progs: mkfs: extend -O syntax to disable features
- [PATCH] btrfs-progs: man: add rescue super-recover bits
