diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-08-04 14:36:55 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-11 09:28:58 +0100 |
commit | a05623cd71fe4f179c9fd61a1a3e327c35290e56 (patch) | |
tree | 17e1fac3075abf56894714369ae44ade92a5cb7f /fish/fish.c | |
parent | 7d6f76709e71b38e0bc4f018c4d873a32ffe19da (diff) | |
download | libguestfs-a05623cd71fe4f179c9fd61a1a3e327c35290e56.tar.gz libguestfs-a05623cd71fe4f179c9fd61a1a3e327c35290e56.tar.xz libguestfs-a05623cd71fe4f179c9fd61a1a3e327c35290e56.zip |
fish: Add --network option.
This enables the libguestfs user network, and is the equivalent of the
'virt-rescue --network' option.
Diffstat (limited to 'fish/fish.c')
-rw-r--r-- | fish/fish.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fish/fish.c b/fish/fish.c index 9bb8c90f..d0e2d8a9 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -125,8 +125,9 @@ usage (int status) " --listen Listen for remote commands\n" " --live Connect to a live virtual machine\n" " -m|--mount dev[:mnt[:opts]] Mount dev on mnt (if omitted, /)\n" - " -n|--no-sync Don't autosync\n" + " --network Enable network\n" " -N|--new type Create prepared disk (test1.img, ...)\n" + " -n|--no-sync Don't autosync\n" " --pipe-error Pipe commands can detect write errors\n" " --progress-bars Enable progress bars even when not interactive\n" " --no-progress-bars Disable progress bars\n" @@ -190,6 +191,7 @@ main (int argc, char *argv[]) { "listen", 0, 0, 0 }, { "live", 0, 0, 0 }, { "mount", 1, 0, 'm' }, + { "network", 0, 0, 0 }, { "new", 1, 0, 'N' }, { "no-dest-paths", 0, 0, 'D' }, { "no-sync", 0, 0, 'n' }, @@ -286,6 +288,8 @@ main (int argc, char *argv[]) live = 1; } else if (STREQ (long_options[option_index].name, "pipe-error")) { pipe_error = 1; + } else if (STREQ (long_options[option_index].name, "network")) { + guestfs_set_network (g, 1); } else { fprintf (stderr, _("%s: unknown long option: %s (%d)\n"), program_name, long_options[option_index].name, option_index); |