Reynir Björnsson
c84535962f
* mft_entry.b, mft_entry.u are runtime fields. We expect them to be zeroed. * add a type mft with version and mft_entries * add pretty printers a la solo5-elftool query-manifest
19 lines
481 B
OCaml
19 lines
481 B
OCaml
let hex_dump file =
|
|
Owee_buf.map_binary file
|
|
|> Solo5_elftool.foo
|
|
|> Result.iter (fun mft ->
|
|
Fmt.pr "%a\n" Solo5_elftool.pp_mft mft)
|
|
|
|
let file =
|
|
let doc = "Solo5 executable" in
|
|
Cmdliner.Arg.(required & pos 0 (some file) None &
|
|
info ~doc ~docv:"EXECUTABLE" [])
|
|
|
|
let hex_dump_cmd =
|
|
let doc = "hexdump solo5 manifest" in
|
|
Cmdliner.Term.(
|
|
pure hex_dump $ file,
|
|
info ~doc "query-manifest")
|
|
|
|
let () =
|
|
ignore (Cmdliner.Term.eval hex_dump_cmd)
|