[Libguestfs] [PATCH 2/3] New APIs: part_set_gpt_attributes and part_get_gpt_attributes
Pino Toscano
ptoscano at redhat.com
Fri Jan 12 15:36:13 UTC 2018
On Wednesday, 10 January 2018 13:07:50 CET Cédric Bosdonnat wrote:
> + { defaults with
> + name = "part_set_gpt_attributes"; added = (1, 21, 1);
> + style = RErr, [String (Device, "device"); Int "partnum"; String (PlainString, "attributes")], [];
> + impl = OCaml "Parted.part_set_gpt_attributes";
> + optional = Some "gdisk";
> + tests = [
> + InitGPT, Always, TestLastFail (
> + [["part_set_gpt_attributes"; "/dev/sda"; "1"; "foo"]]), [];
> + InitGPT, Always, TestResultString (
> + [["part_set_gpt_attributes"; "/dev/sda"; "1";
> + "0000000000000004"];
> + ["part_get_gpt_attributes"; "/dev/sda"; "1"]],
> + "0000000000000004"), [];
> + ];
Considering that the attribute flags look like a 64bit value, and they
seem to behave like proper flags, I would expose them as Int64/RInt64
in these new get/set APIs. Handling strings with number is not very
convenient for the users of the APIs, anyway.
--
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/a1c1d469/attachment.sig>
More information about the Libguestfs
mailing list