diff --git a/daemon/lvm.c b/daemon/lvm.c index 6d8d675db..261573882 100644 --- a/daemon/lvm.c +++ b/daemon/lvm.c @@ -146,34 +146,7 @@ do_vgs (void) guestfs_int_lvm_pv_list * do_pvs_full (void) { - guestfs_int_lvm_pv_list *r; - size_t i; - char *din, *dout; - - r = parse_command_line_pvs (); - if (r == NULL) - /* parse_command_line_pvs has already called reply_with_error */ - return NULL; - - /* The pv_name fields contain device names which must be reverse - * translated. The problem here is that the generator does not have - * a "FMountable" field type in types.mli. - */ - for (i = 0; i < r->guestfs_int_lvm_pv_list_len; ++i) { - din = r->guestfs_int_lvm_pv_list_val[i].pv_name; - if (din) { - dout = reverse_device_name_translation (din); - if (!dout) { - /* reverse_device_name_translation has already called reply_with_error*/ - /* XXX memory leak here */ - return NULL; - } - r->guestfs_int_lvm_pv_list_val[i].pv_name = dout; - free (din); - } - } - - return r; + return parse_command_line_pvs (); } guestfs_int_lvm_vg_list * diff --git a/generator/structs.ml b/generator/structs.ml index e5ed71ecd..fcacade65 100644 --- a/generator/structs.ml +++ b/generator/structs.ml @@ -35,7 +35,7 @@ type struc = { * we have to pull out the LVM columns separately here. *) let lvm_pv_cols = [ - "pv_name", FString; + "pv_name", FDevice; "pv_uuid", FUUID; "pv_fmt", FString; "pv_size", FBytes;