This repository has no description
0

Configure Feed

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

Fix zfs bindings

+10 -10
-2
shelter.opam
··· 39 39 ] 40 40 dev-repo: "git+https://github.com/username/reponame.git" 41 41 pin-depends:[ 42 - [ "zfs.dev" "git+https://github.com/patricoferris/ocaml-zfs" ] 43 - [ "void.dev" "git+https://github.com/quantifyearth/void" ] 44 42 [ "irmin.dev" "git+https://github.com/mirage/irmin#eio" ] 45 43 [ "ppx_irmin.dev" "git+https://github.com/mirage/irmin#eio" ] 46 44 [ "irmin-git.dev" "git+https://github.com/mirage/irmin#eio" ]
-2
shelter.opam.template
··· 1 1 pin-depends:[ 2 - [ "zfs.dev" "git+https://github.com/patricoferris/ocaml-zfs" ] 3 - [ "void.dev" "git+https://github.com/quantifyearth/void" ] 4 2 [ "irmin.dev" "git+https://github.com/mirage/irmin#eio" ] 5 3 [ "ppx_irmin.dev" "git+https://github.com/mirage/irmin#eio" ] 6 4 [ "irmin-git.dev" "git+https://github.com/mirage/irmin#eio" ]
+1 -1
vendor/zfs/src/function_description.ml
··· 91 91 92 92 let is_mounted = 93 93 foreign "is_mounted" 94 - (Types.libzfs_handle_t @-> string @-> ptr string @-> returning bool) 94 + (Types.libzfs_handle_t @-> string @-> ptr (ptr char) @-> returning bool) 95 95 96 96 let diff = 97 97 foreign "zfs_show_diffs"
+9 -5
vendor/zfs/src/zfs.ml
··· 112 112 113 113 let exists handle path (type_ : Types.t) = C.Functions.exists handle path type_ 114 114 115 + let null_string = Ctypes.(coerce (ptr void) (ptr char) null) 116 + 115 117 let is_mounted handle path = 116 - let where = Ctypes.allocate Ctypes.string "" in 117 - let v = C.Functions.is_mounted handle path where in 118 - if not v then None else Some (Ctypes.( !@ ) where) 119 - 120 - let null_string = Ctypes.(coerce (ptr void) (ptr char) null) 118 + let where = Ctypes.(coerce (ptr void) (ptr char) null) in 119 + let where_ptr = Ctypes.(allocate (ptr char) where) in 120 + let v = C.Functions.is_mounted handle path where_ptr in 121 + if not v then None else 122 + let v = Ctypes.( !@ ) where_ptr in 123 + let s = Ctypes.string_from_ptr v ~length:256 in 124 + Some s 121 125 122 126 let mount ?mount_opts ?(mount_flags = 0) dataset = 123 127 let res = C.Functions.mount dataset mount_opts mount_flags in