/* List of drives added via -a, -d or -N options. */
struct drv {
struct drv *next;
+
+ char *device; /* Device name inside the appliance (eg. /dev/sda).
+ * This is filled in when we add the drives in
+ * add_drives. Note that guests (-d option) may
+ * have multiple drives, in which case this is the
+ * first drive, and nr_drives is the number of
+ * drives used.
+ */
+ int nr_drives; /* number of drives for this guest */
+
enum { drv_a, drv_d, drv_N } type;
union {
struct {
char *filename; /* disk filename (testX.img) */
void *data; /* prepared type */
void (*data_free)(void*); /* function to free 'data' */
- char *device; /* device inside the appliance */
} N;
};
};
/* 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);
exit (EXIT_FAILURE); \
} \
drv->type = drv_a; \
+ drv->device = NULL; \
+ drv->nr_drives = -1; \
drv->a.filename = optarg; \
drv->a.format = format; \
drv->next = drvs; \
exit (EXIT_FAILURE); \
} \
drv->type = drv_d; \
+ drv->device = NULL; \
+ drv->nr_drives = -1; \
drv->d.guest = optarg; \
drv->next = drvs; \
drvs = drv