git.annexia.org
/
libguestfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab608f3
)
hivexsh: Only print final \n when interactive.
author
Richard Jones
<rjones@redhat.com>
Wed, 3 Feb 2010 17:50:51 +0000
(17:50 +0000)
committer
Richard Jones
<rjones@redhat.com>
Thu, 4 Feb 2010 10:26:12 +0000
(10:26 +0000)
When hivexsh was called non-interactively, it would print an
annoying extra line. Only print this line if we are being
used interactively.
hivex/hivexsh.c
patch
|
blob
|
history
diff --git
a/hivex/hivexsh.c
b/hivex/hivexsh.c
index
d7d00bb
..
847954c
100644
(file)
--- a/
hivex/hivexsh.c
+++ b/
hivex/hivexsh.c
@@
-146,7
+146,8
@@
main (int argc, char *argv[])
char *buf = rl_gets (prompt_string);
if (!buf) {
quit = 1;
- printf ("\n");
+ if (is_tty)
+ printf ("\n");
break;
}