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

Configure Feed

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

fix(fuzz): formatting and remaining fuzz dune rule fixes

+2 -1
+2 -1
lib/mbr.ml
··· 22 22 let err_bad_signature s1 s2 = 23 23 Error (Fmt.str "Invalid signature: %02x %02x <> 0x55 0xaa" s1 s2) 24 24 25 + let err_too_small n = Error (Fmt.str "MBR too small: %d < 512" n) 26 + 25 27 (* Binary reading helpers - little-endian *) 26 28 let u8 s off = Char.code (Bytes.get s off) 27 29 let u16_le s off = u8 s off lor (u8 s (off + 1) lsl 8) ··· 306 308 307 309 (* MBR layout constants *) 308 310 let sizeof = 512 309 - let err_too_small n = Error (Fmt.str "MBR too small: %d < %d" n sizeof) 310 311 let bootstrap_code1_offset = 0 311 312 let bootstrap_code1_len = 218 312 313 let original_physical_drive_offset = 220