X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=3f798fda1299c5dbb67bf318973e8c6acf99bcf4;hb=9ef4d50bc49bd8443937cc972711320488239a24;hp=61a84050df4f2dd047ed52bf49bcf49e2a3afdcb;hpb=3f3d881dc339888784bd4c30228cbb25daaf0e5d;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 61a8405..3f798fd 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -69,7 +69,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; @@ -324,7 +323,7 @@ main (int argc, char *argv[]) exit (EXIT_SUCCESS); case 'x': - echo_commands = 1; + guestfs_set_trace (g, 1); break; case HELP_OPTION: @@ -380,6 +379,8 @@ main (int argc, char *argv[]) strcat (cmd, " -v"); if (!guestfs_get_autosync (g)) strcat (cmd, " -n"); + if (guestfs_get_trace (g)) + strcat (cmd, " -x"); if (verbose) fprintf (stderr, @@ -805,13 +806,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];