Inline owee unix dependent code
Then we can publish in unikernel-repo the unix-free owee fork
This commit is contained in:
parent
49ca776d33
commit
be2dfa9aad
1 changed files with 10 additions and 1 deletions
11
lib/model.ml
11
lib/model.ml
|
@ -59,7 +59,16 @@ let build_artifacts build (module Db : CONN) =
|
|||
List.map snd
|
||||
|
||||
let solo5_manifest datadir file =
|
||||
let buf = Owee_buf.map_binary Fpath.(to_string (datadir // artifact_path file)) in
|
||||
(* inlined from Owee_buf.map_binary *)
|
||||
let path = Fpath.(to_string (datadir // artifact_path file)) in
|
||||
let fd = Unix.openfile path [Unix.O_RDONLY] 0 in
|
||||
let len = Unix.lseek fd 0 Unix.SEEK_END in
|
||||
let buf =
|
||||
Bigarray.array1_of_genarray
|
||||
(Unix.map_file fd Bigarray.int8_unsigned
|
||||
Bigarray.c_layout false [|len|]) in
|
||||
Unix.close fd;
|
||||
(* end of inlined code *)
|
||||
Solo5_elftool.query_manifest buf |> Result.to_option
|
||||
|
||||
let platforms_of_job id (module Db : CONN) =
|
||||
|
|
Loading…
Reference in a new issue