27 lines
452 B
OCaml
27 lines
452 B
OCaml
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
|