MTE unikernel with Mkernel+Mnet+Vifu
This commit is contained in:
parent
76662bf23c
commit
a23e59dfca
31 changed files with 535 additions and 376 deletions
27
src/fat.ml
Normal file
27
src/fat.ml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
module Fat = Mfat.Make (struct
|
||||
include Mkernel.Block
|
||||
|
||||
let read = atomic_read
|
||||
let write = atomic_write
|
||||
end)
|
||||
|
||||
module Sfn = Mfat.Sfn
|
||||
module Spath = Mfat.Spath
|
||||
include Fat
|
||||
|
||||
type entry = Mfat.entry = {
|
||||
name: Sfn.t;
|
||||
is_dir: bool;
|
||||
size: int32;
|
||||
}
|
||||
|
||||
let create blk =
|
||||
match Fat.create blk with
|
||||
| Error (`Msg e) -> Fmt.failwith "FAT file system failure: %s." e
|
||||
| Ok fs -> fs
|
||||
|
||||
type t = Mkernel.Block.t Mfat.t
|
||||
|
||||
module type FS = sig
|
||||
val t : t
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue