X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=rescue%2Fvirt-rescue.c;h=f129b1c8e5e7d52ba217bb28d8b1cbb535a4f9ac;hb=30479a1190b2f1c2526301fd63182481b1dd6ad8;hp=6224ad7bb1ff47a3530910af6e5664cdbe13a6b0;hpb=d72815578f7b8fea9702902d8562430e8a007a46;p=libguestfs.git diff --git a/rescue/virt-rescue.c b/rescue/virt-rescue.c index 6224ad7..f129b1c 100644 --- a/rescue/virt-rescue.c +++ b/rescue/virt-rescue.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "progname.h" @@ -36,6 +37,7 @@ guestfs_h *g; int read_only = 0; +int live = 0; int verbose = 0; int keys_from_stdin = 0; int echo_keys = 0; @@ -74,6 +76,7 @@ usage (int status) " --selinux Enable SELinux\n" " -v|--verbose Verbose messages\n" " -V|--version Display version and exit\n" + " -w|--rw Mount read-write\n" " -x Trace libguestfs API calls\n" "For more information, see the manpage %s(1).\n"), program_name, program_name, program_name, @@ -92,6 +95,8 @@ main (int argc, char *argv[]) bindtextdomain (PACKAGE, LOCALEBASEDIR); textdomain (PACKAGE); + parse_config (); + enum { HELP_OPTION = CHAR_MAX + 1 }; static const char *options = "a:c:d:m:rvVx"; @@ -105,6 +110,7 @@ main (int argc, char *argv[]) { "memsize", 1, 0, 'm' }, { "network", 0, 0, 0 }, { "ro", 0, 0, 'r' }, + { "rw", 0, 0, 'w' }, { "selinux", 0, 0, 0 }, { "verbose", 0, 0, 'v' }, { "version", 0, 0, 'V' }, @@ -187,6 +193,10 @@ main (int argc, char *argv[]) OPTION_V; break; + case 'w': + OPTION_w; + break; + case 'x': OPTION_x; break; @@ -239,6 +249,7 @@ main (int argc, char *argv[]) assert (inspector == 0); assert (keys_from_stdin == 0); assert (echo_keys == 0); + assert (live == 0); /* Must be no extra arguments on the command line. */ if (optind != argc)