inspector: Rewrite virt-inspector in C.
[libguestfs.git] / fish / options.h
index b0bbdeb..155aad8 100644 (file)
@@ -69,6 +69,8 @@ extern guestfs_h *g;
 extern int read_only;
 extern int verbose;
 extern int inspector;
+extern int keys_from_stdin;
+extern int echo_keys;
 extern const char *libvirt_uri;
 extern const char *program_name;
 
@@ -102,6 +104,12 @@ struct mp {
 /* in inspect.c */
 extern void inspect_mount (void);
 extern void print_inspect_prompt (void);
+/* (low-level inspection functions, used by virt-inspector only) */
+extern void inspect_do_decrypt (void);
+extern void inspect_mount_root (const char *root);
+
+/* in key.c */
+extern char *read_key (const char *param);
 
 /* in options.c */
 extern char add_drives (struct drv *drv, char next_drive);
@@ -180,6 +188,13 @@ extern int add_libvirt_drives (const char *guest);
     exit (EXIT_SUCCESS);                                                \
   }
 
+#define OPTION_w                                                        \
+  if (read_only) {                                                      \
+    fprintf (stderr, _("%s: cannot mix --ro and --rw options\n"),       \
+             program_name);                                             \
+    exit (EXIT_FAILURE);                                                \
+  }
+
 #define OPTION_x                                \
   guestfs_set_trace (g, 1)