Displaying 5 results from an estimated 5 matches for "extract_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 +++
2018 Jan 15
0
[PATCH v2 1/3] daemon: make sgdisk_info_extract_uuid_field more generic
...nnot 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 partnum field =
+let sgdisk_info_extract_field device partnum field extractor =
if partnum <= 0 then failwith &q...
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 16
0
[PATCH v3 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...settle ();
+
+ let arg = sprintf "%d:=:%LX" partnum attributes in
+ let r, _, err =
+ commandr ~fold_stdout_on_stderr:true
+ "sgdisk" [ device; "-A"; arg ] in
+ if r <> 0 then
+ failwithf "sgdisk: %s" err;
+
+ udev_settle ()
+
let extract_guid value =
(* The value contains only valid GUID characters. *)
String.sub value 0 (String.span value "-0123456789ABCDEF")
+let extract_hex value =
+ (* The value contains only valid numeric characters. *)
+ let str = String.sub value 0 (String.span value "0123456789ABCDEF&quo...
2018 Jan 15
0
[PATCH v2 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
...attributes in
+ let arg = string_of_int partnum ^ ":=:" ^ hex in
+ let r, _, err =
+ commandr ~fold_stdout_on_stderr:true
+ "sgdisk" [ device; "-A"; arg ] in
+ if r <> 0 then
+ failwithf "sgdisk: %s" err;
+
+ udev_settle ()
+
let extract_guid value =
(* The value contains only valid GUID characters. *)
String.sub value 0 (String.span value "-0123456789ABCDEF")
+let extract_hex value =
+ (* The value contains only valid numeric characters. *)
+ let str = String.sub value 0 (String.span value "0123456789ABCDEF&quo...