[Libguestfs] [PATCH 1/3] daemon: make sgdisk_info_extract_uuid_field more generic
Pino Toscano
ptoscano at redhat.com
Fri Jan 12 15:28:06 UTC 2018
On Wednesday, 10 January 2018 13:07:49 CET Cédric Bosdonnat wrote:
> 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)
IMHO a better option here would be to pass as parameter, instead of the
allowed characters (which is an implementation of the extract_uuid
function), the function itself. This would bring this code much like
as it was the old C version of it, and even help for patch #2 of this
series.
The sgdisk_info_extract_uuid_field -> sgdisk_info_extract_field
renaming is OK.
--
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/libguestfs/attachments/20180112/bbba7c7f/attachment.sig>
More information about the Libguestfs
mailing list