fish: fuse: Add -m dev:mnt:opts to allow mount options to be specified.
[libguestfs.git] / fish / fish.c
index b62c098..65a0c1d 100644 (file)
@@ -99,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 <<EOF\n"
-             "  cmd\n"
-             "  ...\n"
-             "  EOF\n"
              "Options:\n"
              "  -h|--cmd-help        List available commands\n"
              "  -h|--cmd-help cmd    Display detailed help on 'cmd'\n"
@@ -126,7 +117,7 @@ usage (int status)
              "  --keys-from-stdin    Read passphrases from stdin\n"
              "  --listen             Listen for remote commands\n"
              "  --live               Connect to a live virtual machine\n"
-             "  -m|--mount dev[:mnt] Mount dev on mnt (if omitted, /)\n"
+             "  -m|--mount dev[:mnt[:opts]] Mount dev on mnt (if omitted, /)\n"
              "  -n|--no-sync         Don't autosync\n"
              "  -N|--new type        Create prepared disk (test1.img, ...)\n"
              "  --progress-bars      Enable progress bars even when not interactive\n"
@@ -136,11 +127,21 @@ usage (int status)
              "  --selinux            Enable SELinux support\n"
              "  -v|--verbose         Verbose messages\n"
              "  -V|--version         Display version and exit\n"
+             "  -w|--rw              Mount read-write\n"
              "  -x                   Echo each command before executing it\n"
+             "\n"
+             "To examine a disk image, ISO, hard disk, filesystem etc:\n"
+             "  %s [--ro|--rw] -i -a /path/to/disk.img\n"
+             "or\n"
+             "  %s [--ro|--rw] -i -d name-of-libvirt-domain\n"
+             "\n"
+             "--ro recommended to avoid any writes to the disk image.  If -i option fails\n"
+             "run again without -i and use 'run' + 'list-filesystems' + 'mount' cmds.\n"
+             "\n"
              "For more information, see the manpage %s(1).\n"),
              program_name, program_name, program_name,
              program_name, program_name, program_name,
-             program_name, program_name, program_name);
+             program_name);
   }
   exit (status);
 }
@@ -499,7 +500,8 @@ main (int argc, char *argv[])
     : (optind >= 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) {