search for: part_get_gpt_guid

Displaying 20 results from an estimated 35 matches for "part_get_gpt_guid".

2018 Jan 15
6
[PATCH v2 0/3] copying gpt attributes
Hi all, Here is the latest version of the series addressing Pino's comments. Cédric Bosdonnat (3): daemon: make sgdisk_info_extract_uuid_field more generic New APIs: part_set_gpt_attributes and part_get_gpt_attributes resize: copy GPT partition flags daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++---------- daemon/parted.mli | 3 +++
2015 Feb 05
5
resize: Preserve GPT GUID so we don't break EFI bootloaders (RHBZ#1189284)
virt-resize didn't preserve the per-partition GPT GUID. Now that guests using UEFI are becoming common (basically it's the default on aarch64) we need to take into account that sometimes the partition GUID is used by the bootloader NVRAM variables to identify the boot partition, so it must be preserved across resize. This bug caused the 'virt-builder --size' option to fail on
2018 Jan 16
4
[PATCH v3 0/3] copy GPT attributes
Hi all, Here is v3 of the series, taking Richard's comments in account. Cédric Bosdonnat (3): daemon: make sgdisk_info_extract_uuid_field more generic New APIs: part_set_gpt_attributes and part_get_gpt_attributes resize: copy GPT partition flags daemon/parted.ml | 45 +++++++++++++++++++++++++++++++++++---------- daemon/parted.mli | 2 ++ generator/actions_core.ml
2018 Jan 10
6
[PATCH 0/3] Handle GPT attribute flags
Hi all, Here is the series fixing the bug I mentioned on IRC regarding the GPT attribute flags to copy to the new disk in a virt-resize. Cédric Bosdonnat (3): daemon: make sgdisk_info_extract_uuid_field more generic New APIs: part_set_gpt_attributes and part_get_gpt_attributes resize: copy GPT partition flags daemon/parted.ml | 34 +++++++++++++++++++++++++++-------
2018 Jan 15
0
[PATCH v2 1/3] daemon: make sgdisk_info_extract_uuid_field more generic
...ed.ml +++ b/daemon/parted.ml @@ -124,12 +124,11 @@ let part_get_parttype device = | _ -> failwithf "%s: cannot parse the output of parted" device -let rec part_get_gpt_type device partnum = - sgdisk_info_extract_uuid_field device partnum "Partition GUID code" -and part_get_gpt_guid device partnum = - sgdisk_info_extract_uuid_field device partnum "Partition unique GUID" +let extract_guid value = + (* The value contains only valid GUID characters. *) + String.sub value 0 (String.span value "-0123456789ABCDEF") -and sgdisk_info_extract_uuid_field device...
2018 Jan 16
0
[PATCH v3 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...value "0123456789ABCDEF") in + Int64.of_string ("0x" ^ str) + let sgdisk_info_extract_field device partnum field extractor = if partnum <= 0 then failwith "partition number must be >= 1"; @@ -179,3 +199,6 @@ let rec part_get_gpt_type device partnum = and part_get_gpt_guid device partnum = sgdisk_info_extract_field device partnum "Partition unique GUID" extract_guid +and part_get_gpt_attributes device partnum = + sgdisk_info_extract_field device partnum "Attribute flags" + extract_hex dif...
2018 Jan 15
0
[PATCH v2 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...value "0123456789ABCDEF") in + Int64.of_string ("0x" ^ str) + let sgdisk_info_extract_field device partnum field extractor = if partnum <= 0 then failwith "partition number must be >= 1"; @@ -179,3 +199,6 @@ let rec part_get_gpt_type device partnum = and part_get_gpt_guid device partnum = sgdisk_info_extract_field device partnum "Partition unique GUID" extract_guid +and part_get_gpt_attributes device partnum = + sgdisk_info_extract_field device partnum "Attribute flags" + extract_hex dif...
2018 Jan 10
0
[PATCH 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...uot;-A"; arg ] in + if r <> 0 then + failwithf "sgdisk: %s" err; + + udev_settle () let rec part_get_gpt_type device partnum = sgdisk_info_extract_field device partnum "Partition GUID code" @@ -132,6 +144,8 @@ let rec part_get_gpt_type device partnum = and part_get_gpt_guid device partnum = sgdisk_info_extract_field device partnum "Partition unique GUID" ("-" ^ hex_chars) +and part_get_gpt_attributes device partnum = + sgdisk_info_extract_field device partnum "Attribute flags" hex_chars and sgdisk_info_...
2018 Jan 10
0
[PATCH 1/3] daemon: make sgdisk_info_extract_uuid_field more generic
...ars = "0123456789ABCDEF" + let rec part_get_gpt_type device partnum = - sgdisk_info_extract_uuid_field device partnum "Partition GUID code" + sgdisk_info_extract_field device partnum "Partition GUID code" + ("-" ^ hex_chars) and part_get_gpt_guid device partnum = - sgdisk_info_extract_uuid_field device partnum "Partition unique GUID" + sgdisk_info_extract_field device partnum "Partition unique GUID" + ("-" ^ hex_chars) -and sgdisk_info_extract_uuid_field device partnum field = +an...
2015 Mar 30
1
[PATCH RFC] resize: add p_mbr_p_type as member of type partition
...List.filter (fun p -> parttype <> MBR || p.G.part_num <= 4_l) - parts in - let partitions = List.map ( fun ({ G.part_num = part_num } as part) -> @@ -491,14 +491,28 @@ read the man page virt-resize(1). | GPT -> try Some (g#part_get_gpt_guid "/dev/sda" part_num) with G.Error _ -> None in + let mbr_part_type = + let mbr_part_type_str = g#part_get_mbr_part_type "/dev/sda" part_num in + match mbr_part_type_str with + | "primary" -> PrimaryPartitio...
2018 Jan 28
0
[PATCH v3 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...2f..0f59d29 100644 --- a/daemon/parted.mli +++ b/daemon/parted.mli @@ -28,6 +28,8 @@ val part_list : string -> partition list val part_get_parttype : string -> string +val part_get_mbr_part_type : string -> int -> string + val part_get_gpt_type : string -> int -> string val part_get_gpt_guid : string -> int -> string val part_get_gpt_attributes : string -> int -> int64 diff --git a/generator/actions_core.ml b/generator/actions_core.ml index 544cb6e..307e414 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -9213,6 +9213,7 @@ All data will be zeroed,...
2020 Jun 30
2
[PATCH] daemon: inspect_fs_windows: Handle parted errors
....part_get_parttype device in + let typ = + try + Parted.part_get_parttype device + with Unix.Unix_error (Unix.EINVAL, _, _) -> "unknown" in if typ <> "gpt" then false else ( let guid = Parted.part_get_gpt_guid device partnum in -- 2.27.0.212.ge8ba1cc988-goog
2018 Jan 28
9
guestfs_list_filesystems: skip block devices which cannot hold file system
Initial discussion is here: https://www.redhat.com/archives/libguestfs/2018-January/msg00188.html. v2 was posted here: https://www.redhat.com/archives/libguestfs/2018-January/msg00246.html. v3 comparing to v2 is just a rebase with slightly changed commits comments.
2018 Jan 25
2
[PATCH v2 1/3] daemon: Reimplement 'part_get_mbr_part_type' API in OCaml.
...2f..0f59d29 100644 --- a/daemon/parted.mli +++ b/daemon/parted.mli @@ -28,6 +28,8 @@ val part_list : string -> partition list val part_get_parttype : string -> string +val part_get_mbr_part_type : string -> int -> string + val part_get_gpt_type : string -> int -> string val part_get_gpt_guid : string -> int -> string val part_get_gpt_attributes : string -> int -> int64 diff --git a/generator/actions_core.ml b/generator/actions_core.ml index 544cb6e..307e414 100644 --- a/generator/actions_core.ml +++ b/generator/actions_core.ml @@ -9213,6 +9213,7 @@ All data will be zeroed,...
2017 Jul 31
0
[PATCH v11 09/10] daemon: Implement inspection of Windows.
...d ( + fun part -> + let partnum = Devsparts.part_to_partnum part in + let device = Devsparts.part_to_dev part in + let typ = Parted.part_get_parttype device in + if typ <> "gpt" then false + else ( + let guid = Parted.part_get_gpt_guid device partnum in + String.lowercase_ascii guid = blob_guid + ) + ) partitions in + Some partition + with + | Not_found -> None + +(* Extracts the binary GUID stored in blob from Windows registry + * HKLM\SYSTYEM\MountedDevices\DosDevices value and converts it to a...
2018 Apr 09
0
[PATCH 3/3] daemon: autogenerate most of OCaml interfaces
...oundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val part_get_mbr_id : string -> int -> int -val part_list : string -> Structs.partition list - -val part_get_parttype : string -> string - -val part_get_gpt_type : string -> int -> string -val part_get_gpt_guid : string -> int -> string -val part_get_gpt_attributes : string -> int -> int64 -val part_set_gpt_attributes : string -> int -> int64 -> unit diff --git a/daemon/realpath.mli b/daemon/realpath.mli deleted file mode 100644 index 10b9ae565..000000000 --- a/daemon/realpath.mli +++...
2018 Apr 10
0
[PATCH v2 5/5] daemon: autogenerate OCaml interfaces
...oundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - *) - -val part_get_mbr_id : string -> int -> int -val part_list : string -> Structs.partition list - -val part_get_parttype : string -> string - -val part_get_gpt_type : string -> int -> string -val part_get_gpt_guid : string -> int -> string -val part_get_gpt_attributes : string -> int -> int64 -val part_set_gpt_attributes : string -> int -> int64 -> unit diff --git a/daemon/realpath.mli b/daemon/realpath.mli deleted file mode 100644 index 10b9ae565..000000000 --- a/daemon/realpath.mli +++...
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
2017 Jul 27
23
[PATCH v3 00/23] Reimplement many daemon APIs in OCaml.
I think this fixes everything mentioned: - Added the Optgroups module as suggested. - Remove command temporary files. - Replace command ~flags with ?fold_stdout_on_stderr. - Nest _with_mounted function. - Rebase & retest. Rich.
2017 Jul 21
27
[PATCH v2 00/23] Reimplement many daemon APIs in OCaml.
v1 was posted here: https://www.redhat.com/archives/libguestfs/2017-July/msg00098.html This series now depends on two small patches which I posted separately: https://www.redhat.com/archives/libguestfs/2017-July/msg00207.html https://www.redhat.com/archives/libguestfs/2017-July/msg00209.html v1 -> v2: - Previously changes to generator/daemon.ml were made incrementally through the patch