diff options
author | Richard Jones <rjones@redhat.com> | 2010-09-10 13:26:10 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-09-10 13:26:10 +0100 |
commit | c359347dd42c9f5b875630537ee3641264826b89 (patch) | |
tree | 6bd0b2115716e351826bd9bffcfef3c82067113a /fish/glob.c | |
parent | b033b55558503a1920c5b7cc1a7e1365749585e0 (diff) | |
download | libguestfs-c359347dd42c9f5b875630537ee3641264826b89.tar.gz libguestfs-c359347dd42c9f5b875630537ee3641264826b89.tar.xz libguestfs-c359347dd42c9f5b875630537ee3641264826b89.zip |
fish: glob should only print commands when trace mode is enabled.
Diffstat (limited to 'fish/glob.c')
-rw-r--r-- | fish/glob.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fish/glob.c b/fish/glob.c index 2731b2f9..1a18b370 100644 --- a/fish/glob.c +++ b/fish/glob.c @@ -140,12 +140,14 @@ glob_issue (char *cmd, int argc, argv[argc] = NULL; again: - printf ("%s", argv[0]); - for (i = 1; i < argc; ++i) { - argv[i] = globs[i][posn[i]]; - printf (" %s", argv[i]); + if (guestfs_get_trace (g)) { + printf ("%s", argv[0]); + for (i = 1; i < argc; ++i) { + argv[i] = globs[i][posn[i]]; + printf (" %s", argv[i]); + } + printf ("\n"); } - printf ("\n"); if (issue_command (argv[0], &argv[1], NULL) == -1) *r = -1; /* ... but don't exit */ |