X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=fish%2Foptions.h;h=728df04a9d594db44d9dac4e38827f490ffe5710;hb=4402e6048fb2a56461f9e4d474fc2f1391248781;hp=9cb7f4bbb4f10b7964a866b605a971fcf530745a;hpb=2c4a7ef92a4583a1217213573ad406eb5d745990;p=libguestfs.git diff --git a/fish/options.h b/fish/options.h index 9cb7f4b..728df04 100644 --- a/fish/options.h +++ b/fish/options.h @@ -77,6 +77,16 @@ extern const char *program_name; /* 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 { @@ -90,7 +100,6 @@ struct drv { 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; }; }; @@ -104,6 +113,9 @@ 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); @@ -128,6 +140,8 @@ extern int add_libvirt_drives (const char *guest); 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; \ @@ -143,6 +157,8 @@ extern int add_libvirt_drives (const char *guest); exit (EXIT_FAILURE); \ } \ drv->type = drv_d; \ + drv->device = NULL; \ + drv->nr_drives = -1; \ drv->d.guest = optarg; \ drv->next = drvs; \ drvs = drv