projects
/
platform
/
upstream
/
btrfs-progs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1a9797
)
btrfs-progs: do not send stream into a terminal
author
David Sterba
<dsterba@suse.cz>
Thu, 25 Oct 2012 15:27:57 +0000
(17:27 +0200)
committer
David Sterba
<dsterba@suse.cz>
Thu, 17 Jan 2013 17:27:54 +0000
(18:27 +0100)
Signed-off-by: David Sterba <dsterba@suse.cz>
cmds-send.c
patch
|
blob
|
history
diff --git
a/cmds-send.c
b/cmds-send.c
index
59522c3
..
29a7dd3
100644
(file)
--- a/
cmds-send.c
+++ b/
cmds-send.c
@@
-429,6
+429,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':