search for: part_list

Displaying 20 results from an estimated 102 matches for "part_list".

2017 Jul 14
0
[PATCH 20/27] daemon: Reimplement ‘part_list’ API in OCaml.
...| 1 + 4 files changed, 60 insertions(+), 56 deletions(-) diff --git a/daemon/parted.c b/daemon/parted.c index a1e5c81cf..125aec60b 100644 --- a/daemon/parted.c +++ b/daemon/parted.c @@ -387,62 +387,6 @@ do_part_get_parttype (const char *device) return r; } -guestfs_int_partition_list * -do_part_list (const char *device) -{ - CLEANUP_FREE char *out = print_partition_table (device, true); - if (!out) - return NULL; - - CLEANUP_FREE_STRING_LIST char **lines = split_lines (out); - - if (!lines) - return NULL; - - guestfs_int_partition_list *r; - - /* lines[0] is "BYT;", lines...
2016 Jun 13
1
[PATCH] v2v: Fix get_firmware_bootable_device.
I'm going to push this because it's a test blocker, but FYI. Rich.
2018 Apr 09
0
[PATCH 2/3] daemon: use the structs from the Structs module
...a/daemon/inspect_fs_windows.ml b/daemon/inspect_fs_windows.ml index e9d056cd9..8b2aad8d3 100644 --- a/daemon/inspect_fs_windows.ml +++ b/daemon/inspect_fs_windows.ml @@ -372,10 +372,10 @@ and map_registry_disk_blob devices blob = let offset = int_of_le64 offset in let partitions = Parted.part_list device in let partition = - List.find (fun { Parted.part_start = s } -> s = offset) partitions in + List.find (fun { Structs.part_start = s } -> s = offset) partitions in (* Construct the full device name. *) - Some (sprintf "%s%ld" device partition.Parted.p...
2018 Apr 10
0
[PATCH v2 2/5] daemon: use the structs from the Structs module
...a/daemon/inspect_fs_windows.ml b/daemon/inspect_fs_windows.ml index e9d056cd9..8b2aad8d3 100644 --- a/daemon/inspect_fs_windows.ml +++ b/daemon/inspect_fs_windows.ml @@ -372,10 +372,10 @@ and map_registry_disk_blob devices blob = let offset = int_of_le64 offset in let partitions = Parted.part_list device in let partition = - List.find (fun { Parted.part_start = s } -> s = offset) partitions in + List.find (fun { Structs.part_start = s } -> s = offset) partitions in (* Construct the full device name. *) - Some (sprintf "%s%ld" device partition.Parted.p...
2014 Sep 22
1
Re: [PATCH v3 3/7] resize: add function find_partitions
.../resize/resize.ml > +++ b/resize/resize.ml > @@ -446,14 +446,15 @@ read the man page virt-resize(1). > | MBR_ID _ | GPT_Type _ | No_ID -> false > in > > - let partitions : partition list = > + let find_partitions part_type = > let parts = Array.to_list (g#part_list "/dev/sda") in > > - if List.length parts = 0 then > - error (f_"the source disk has no partitions"); > - > (* Filter out logical partitions. See note above. *) > let parts = > + match part_type with > + (* for GPT, all part...
2016 Jun 10
0
Re: [PATCH 1/2] v2v: fill the list of the EFI system partitions
...table_device g = > if g#last_errno () <> G.Errno.errno_EINVAL then raise exn; > debug "%s (ignored)" msg; > false > - and is_uefi_bootable_device dev = > - parttype_is_gpt dev && ( > - let partitions = Array.to_list (g#part_list dev) in > - List.exists (is_uefi_ESP dev) partitions > - ) > + and is_uefi_bootable_part dev part = > + parttype_is_gpt dev && is_uefi_ESP dev part > in > let devices = Array.to_list (g#list_devices ()) in > - List.exists is_uefi_bootable_device devic...
2014 Sep 09
2
CoreOS support
Hello, is CoreOS supported by libguestfs? I was trying to run several commands some were successful others ended up with an error: for example virt-df was OK but when I tried to do virt-resize I got the following error message: root@ny2proxd03:/var/lib/vz/images/100# virt-resize --expand /dev/sda3 vm-100-disk-1.qcow2 vm-100-disk-1.qcow2.resized Examining vm-100-disk-1.qcow2 ... 100%
2017 Mar 13
2
virt-customize fail to inject firstboot script when running it from script.
...: device_index "/dev/sda" libguestfs: trace: device_index = 0 libguestfs: trace: part_to_partnum "/dev/sda1" libguestfs: trace: part_to_partnum = 1 libguestfs: trace: part_to_dev "/dev/sda1" libguestfs: trace: part_to_dev = "/dev/sda" libguestfs: trace: part_list "/dev/sda" libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }> libguestfs: trace: is_dir &quo...
2017 Mar 14
0
Re: virt-customize fail to inject firstboot script when running it from script.
...quot; > libguestfs: trace: device_index = 0 > libguestfs: trace: part_to_partnum "/dev/sda1" > libguestfs: trace: part_to_partnum = 1 > libguestfs: trace: part_to_dev "/dev/sda1" > libguestfs: trace: part_to_dev = "/dev/sda" > libguestfs: trace: part_list "/dev/sda" > libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }> > libguestfs: trace: i...
2014 Sep 22
13
[PATCH v3 0/7] add support to resize MBR logical partitions
Hi Rich, This is v3 series to add support for resizing MBR logical partitions. changes to v2: 1. remove p_part_num 2. remove filter_parts 3. name the function calculate_target_partitions 4. remove the code to restart guest introduced in v2 changes to v1: 1. spit the patches so it's easier to review 2. fix the parted error caused by unaligned logical partitions 3. extend the
2012 Dec 15
1
virt-resize Fatal error: exception Guestfs.Error("e2fsck_f
...msdos" /home/solusvm/kvm/template/linux-ubuntu-12.04-server-x86_64-min-gen2-v1.gz size 1073741824 bytes /dev/vg0/kvm105_img size 42949672960 bytes partition table type: msdos libguestfs: trace: pvs_full libguestfs: trace: pvs_full = <struct guestfs_lvm_pv_list *> libguestfs: trace: part_list "/dev/sda" libguestfs: trace: part_list = <struct guestfs_partition_list *> libguestfs: trace: part_get_bootable "/dev/sda" 1 libguestfs: trace: part_get_bootable = 1 libguestfs: trace: part_get_mbr_id "/dev/sda" 1 libguestfs: trace: part_get_mbr_id = 131 l...
2011 Dec 26
1
Another virt-p2v blew up
...| ... guestfsd: main_loop: proc 7 (list_devices) took 0.00 seconds guestfsd: main_loop: new request, len 0x40 libguestfs: recv_from_daemon: 48 bytes: 20 00 f5 f5 | 00 00 00 04 | 00 00 01 14 | 00 00 00 01 | 00 12 34 3f | ... libguestfs: trace: pread_device = "c\xc0c\xc0" libguestfs: trace: part_list "/dev/sda" libguestfs: send_to_daemon: 56 bytes: 00 00 00 34 | 20 00 f5 f5 | 00 00 00 04 | 00 00 00 d5 | 00 00 00 00 | ... guestfsd: main_loop: proc 276 (pread_device) took 0.00 seconds guestfsd: main_loop: new request, len 0x34 parted -s -m /dev/null parted -m -- /dev/sda unit b print li...
2014 Sep 22
0
[PATCH v3 3/7] resize: add function find_partitions
...e.ml index 8f2105c..cfd02fc 100644 --- a/resize/resize.ml +++ b/resize/resize.ml @@ -446,14 +446,15 @@ read the man page virt-resize(1). | MBR_ID _ | GPT_Type _ | No_ID -> false in - let partitions : partition list = + let find_partitions part_type = let parts = Array.to_list (g#part_list "/dev/sda") in - if List.length parts = 0 then - error (f_"the source disk has no partitions"); - (* Filter out logical partitions. See note above. *) let parts = + match part_type with + (* for GPT, all partitions are regarded as Primary Partition...
2014 Sep 22
0
[PATCH v3 6/7] resize: add partition type LogicalPartition
...@ -75,6 +75,7 @@ and partition_id = type partition_type = | PrimaryPartition + | LogicalPartition let rec debug_partition p = eprintf "%s:\n" p.p_name; @@ -449,13 +450,15 @@ read the man page virt-resize(1). let find_partitions part_type = let parts = Array.to_list (g#part_list "/dev/sda") in - (* Filter out logical partitions. See note above. *) let parts = match part_type with (* for GPT, all partitions are regarded as Primary Partition, * e.g. there is no Extended Partition or Logical Partition. *) | PrimaryPartition -&...
2014 Sep 26
0
[PATCH v4 1/7] resize: add function find_partitions
...ot; p.p_name; eprintf "\tpartition data: %ld %Ld-%Ld (%Ld bytes)\n" @@ -443,14 +446,15 @@ read the man page virt-resize(1). | MBR_ID _ | GPT_Type _ | No_ID -> false in - let partitions : partition list = + let find_partitions part_type = let parts = Array.to_list (g#part_list "/dev/sda") in - if List.length parts = 0 then - error (f_"the source disk has no partitions"); - (* Filter out logical partitions. See note above. *) let parts = + match part_type with + (* for GPT, all partitions are regarded as Primary Partition...
2014 Oct 08
0
[PATCH V5 1/4] resize: add partition type LogicalPartition
...@ -75,6 +75,7 @@ and partition_id = type partition_type = | PrimaryPartition + | LogicalPartition let rec debug_partition p = eprintf "%s:\n" p.p_name; @@ -449,13 +450,15 @@ read the man page virt-resize(1). let find_partitions part_type = let parts = Array.to_list (g#part_list "/dev/sda") in - (* Filter out logical partitions. See note above. *) let parts = match part_type with (* for GPT, all partitions are regarded as Primary Partition, * e.g. there is no Extended Partition or Logical Partition. *) | PrimaryPartition -&...
2017 Mar 14
2
Re: virt-customize fail to inject firstboot script when running it from script.
...guestfs: trace: device_index = 0 >> libguestfs: trace: part_to_partnum "/dev/sda1" >> libguestfs: trace: part_to_partnum = 1 >> libguestfs: trace: part_to_dev "/dev/sda1" >> libguestfs: trace: part_to_dev = "/dev/sda" >> libguestfs: trace: part_list "/dev/sda" >> libguestfs: trace: part_list = <struct guestfs_partition_list(2) = [0]{part_num: 1, part_start: 1048576, part_end: 500170751, part_size: 499122176, } [1]{part_num: 2, part_start: 500170752, part_end: 10736369663, part_size: 10236198912, }> >> libguestfs: tr...
2015 Mar 13
2
[PATCH] part-list: add support for show partition type
...XT_CMD(str_sfdisk, sfdisk); GUESTFSD_EXT_CMD(str_sgdisk, sgdisk); +#ifndef PARTED_NO_M +# define PARTED_NO_M 0 +#endif + /* Notes: * * Parted 1.9 sends error messages to stdout, hence use of the @@ -451,11 +455,7 @@ do_part_get_parttype (const char *device) guestfs_int_partition_list * do_part_list (const char *device) { - int parted_has_m_opt = test_parted_m_opt (); - if (parted_has_m_opt == -1) - return NULL; - - CLEANUP_FREE char *out = print_partition_table (device, parted_has_m_opt); + CLEANUP_FREE char *out = print_partition_table (device, PARTED_NO_M); if (!out) return...
2018 Apr 09
5
[PATCH 0/3] daemon: generate almost all the API OCaml interfaces
Hi, as a followup for the signature fix for mount_vfs [1], here it is a patch series to generate automatically most of the OCaml interfaces of daemon actions. Only the Lvm and Mount modules are left with hand-written interfaces. [1] https://www.redhat.com/archives/libguestfs/2018-April/msg00059.html Thanks, Pino Toscano (3): daemon: directly use Optgroups daemon: use the structs from the
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...ng LVs on the source disk. This is only * used if the user gave the --lv-expand option. @@ -453,18 +462,9 @@ read the man page virt-resize(1). | MBR_ID _ | GPT_Type _ | No_ID -> false in - let find_partitions part_type = + let find_partitions () = let parts = Array.to_list (g#part_list "/dev/sda") in - (* Filter out logical partitions. See note above. *) - let parts = - match part_type with - (* for GPT, all partitions are regarded as Primary Partition, - * e.g. there is no Extended Partition or Logical Partition. *) - | PrimaryPartition -&...