[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
[Libguestfs] [PATCH 5/12] hivexsh: Only print final \n when interactive.
- From: "Richard W.M. Jones" <rjones redhat com>
- To: libguestfs redhat com
- Subject: [Libguestfs] [PATCH 5/12] hivexsh: Only print final \n when interactive.
- Date: Wed, 3 Feb 2010 18:33:04 +0000
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine. Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/
>From 305a09bfbce16cbdb6f55586a2c8cda7501aefee Mon Sep 17 00:00:00 2001
From: Richard Jones <rjones redhat com>
Date: Wed, 3 Feb 2010 17:50:51 +0000
Subject: [PATCH 05/12] hivexsh: Only print final \n when interactive.
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 | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/hivex/hivexsh.c b/hivex/hivexsh.c
index d7d00bb..847954c 100644
--- 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;
}
--
1.6.5.2
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]