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