diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-08 09:04:28 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-08 09:04:28 +0100 |
commit | 8e007581c91a5193e6aec0f6f9aeb379a935c9d4 (patch) | |
tree | 33b93a637e117326a76e37b645d9054be3e1ec0e /fish/fish.c | |
parent | 94775c53f163926ef99e6c6b8ab67b402935301d (diff) | |
download | libguestfs-8e007581c91a5193e6aec0f6f9aeb379a935c9d4.tar.gz libguestfs-8e007581c91a5193e6aec0f6f9aeb379a935c9d4.tar.xz libguestfs-8e007581c91a5193e6aec0f6f9aeb379a935c9d4.zip |
fish: Make '-x' option enable traces instead of using separate echo path.
Previously we had separate code paths for echoing commands (-x)
and tracing (guestfs_set_trace). This just unifies that so that
the guestfish -x option enables tracing.
Diffstat (limited to 'fish/fish.c')
-rw-r--r-- | fish/fish.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/fish/fish.c b/fish/fish.c index a36ec09a..2e8c7516 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -72,7 +72,6 @@ guestfs_h *g; int read_only = 0; int quit = 0; int verbose = 0; -int echo_commands = 0; int remote_control_listen = 0; int remote_control = 0; int exit_on_error = 1; @@ -361,7 +360,7 @@ main (int argc, char *argv[]) exit (EXIT_SUCCESS); case 'x': - echo_commands = 1; + guestfs_set_trace (g, 1); break; case HELP_OPTION: @@ -857,13 +856,6 @@ issue_command (const char *cmd, char *argv[], const char *pipecmd) /* This counts the commands issued, starting at 1. */ command_num++; - if (echo_commands) { - printf ("%s", cmd); - for (i = 0; argv[i] != NULL; ++i) - printf (" %s", argv[i]); - printf ("\n"); - } - /* For | ... commands. Annoyingly we can't use popen(3) here. */ if (pipecmd) { int fd[2]; |