upstream: https://github.com/mirage/ocaml-mbr
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: apply linter auto-fixes across hostname, initramfs, json-logs, jsonwt, linkedin, matter, mbr

+13 -8
+4
lib/mbr.ml
··· 223 223 partitions : Partition.t list; 224 224 } 225 225 226 + let pp ppf t = 227 + Format.fprintf ppf "@[<v>MBR(sig=%ld, %d partitions)@]" t.disk_signature 228 + (List.length t.partitions) 229 + 226 230 let partitions t = t.partitions 227 231 228 232 (* Security helper: check for int32 addition overflow *)
+3
lib/mbr.mli
··· 87 87 } 88 88 (** An MBR record. *) 89 89 90 + val pp : Format.formatter -> t -> unit 91 + (** [pp ppf t] pretty-prints the MBR record. *) 92 + 90 93 val make : ?disk_signature:int32 -> Partition.t list -> (t, string) result 91 94 (** [make ?disk_signature partitions] constructs an MBR given a desired list of 92 95 primary partitions. An [Error _] is returned if:
+1 -1
test/dune
··· 1 1 (test 2 - (name test_mbr) 2 + (name test) 3 3 (libraries mbr wire alcotest fmt))
+1
test/test.ml
··· 1 + let () = Alcotest.run "Mbr" [ Test_mbr.suite ]
+1 -7
test/test_mbr.ml
··· 144 144 ("Partition wire roundtrip", `Quick, test_partition_wire_roundtrip); 145 145 ] 146 146 147 - let () = 148 - Alcotest.run "Mbr" 149 - [ 150 - ("Mbr.Partition.make", suite_partition_make); 151 - ("Mbr.make", suite_make); 152 - ("Wire", suite_wire); 153 - ] 147 + let suite = ("mbr", suite_partition_make @ suite_make @ suite_wire)
+3
test/test_mbr.mli
··· 1 + (** Mbr test suite. *) 2 + 3 + val suite : string * unit Alcotest.test_case list