X-Git-Url: http://git.annexia.org/?p=libguestfs.git;a=blobdiff_plain;f=fish%2Ffish.c;h=90f3a10a2edb76663a1b54845dac7672d76c6296;hp=fbb26deff81dfa691e532ae1a7ac987f8bd3d5b4;hb=c9cc61940b41b1abb763a1932adfc3461372c10b;hpb=64a5ae0e969754c709974104a83e6d1dbb4c2764 diff --git a/fish/fish.c b/fish/fish.c index fbb26de..90f3a10 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -82,6 +82,7 @@ usage (void) " -h|--cmd-help cmd Display detailed help on 'cmd'\n" " -a image Add image\n" " -m dev[:mnt] Mount dev on mnt (if omitted, /)\n" + " -n|--no-sync Don't autosync\n" /*" --ro|-r All mounts are read-only\n"*/ " -v|--verbose Verbose messages\n" "For more information, see the manpage guestfish(1).\n"); @@ -96,6 +97,7 @@ main (int argc, char *argv[]) { "cmd-help", 2, 0, 'h' }, { "help", 0, 0, '?' }, { "mount", 1, 0, 'm' }, + { "no-sync", 0, 0, 'n' }, { "verbose", 0, 0, 'v' }, { 0, 0, 0, 0 } }; @@ -113,6 +115,8 @@ main (int argc, char *argv[]) exit (1); } + guestfs_set_autosync (g, 1); + for (;;) { c = getopt_long (argc, argv, options, long_options, NULL); if (c == -1) break; @@ -153,6 +157,10 @@ main (int argc, char *argv[]) mps = mp->next; break; + case 'n': + guestfs_set_autosync (g, 0); + break; + case 'v': verbose++; guestfs_set_verbose (g, verbose);