X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Ffish.c;h=c4fdf79927f87b5e9a569ab72d6e9d6c9a08f8ab;hb=b8e1dee73a1deef1bfd5937e2abfbe9afef7b1ef;hp=4a960dc0ad18e3a8e8832aa69b1d105fea0ae2a6;hpb=c3887285abbb3606822626ba396a51cb5df80d43;p=libguestfs.git diff --git a/fish/fish.c b/fish/fish.c index 4a960dc..c4fdf79 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -1,5 +1,5 @@ /* guestfish - the filesystem interactive shell - * Copyright (C) 2009-2010 Red Hat Inc. + * Copyright (C) 2009-2011 Red Hat Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -74,6 +74,7 @@ static int override_progress_bars = -1; guestfs_h *g; int read_only = 0; +int live = 0; int quit = 0; int verbose = 0; int remote_control_listen = 0; @@ -98,18 +99,9 @@ usage (int status) fprintf (stdout, _("%s: guest filesystem shell\n" "%s lets you edit virtual machine filesystems\n" - "Copyright (C) 2009-2010 Red Hat Inc.\n" + "Copyright (C) 2009-2011 Red Hat Inc.\n" "Usage:\n" " %s [--options] cmd [: cmd : cmd ...]\n" - " %s [--ro] -i -a disk-image\n" - " %s [--ro] -i -d libvirt-domain\n" - "or for interactive use:\n" - " %s\n" - "or from a shell script:\n" - " %s <= argc && isatty (0)); if (progress_bars) - guestfs_set_progress_callback (g, progress_callback, NULL); + guestfs_set_event_callback (g, progress_callback, + GUESTFS_EVENT_PROGRESS, 0, NULL); /* Interactive, shell script, or command(s) on the command line? */ if (optind >= argc) { @@ -678,7 +687,10 @@ parse_command_line (char *buf, int *exit_on_error_rtn) int r; const size_t argv_len = sizeof pcmd.argv / sizeof pcmd.argv[0]; - pcmd.pipe = NULL; + /* Note that pcmd.pipe must be set to NULL for correct usage. Other + * fields do not need to be, but this silences a gcc warning. + */ + memset (&pcmd, 0, sizeof pcmd); again: /* Skip any initial whitespace before the command. */