search for: ocamlexample_get_size

Displaying 5 results from an estimated 5 matches for "ocamlexample_get_size".

2020 Sep 01
0
[nbdkit PATCH 2/2] ocaml: Implement .list_exports and friends
...handle. * This is just an example. The same value that you return from * your [open_connection] function is passed back as the first @@ -58,6 +65,9 @@ let ocamlexample_open readonly = incr id; { h_id = !id } +let ocamlexample_export_description h = + "some description" + let ocamlexample_get_size h = Int64.of_int (Bytes.length !disk) @@ -80,20 +90,23 @@ let plugin = { (* name, open_connection, get_size and pread are required, * everything else is optional. *) - NBDKit.name = "ocamlexample"; - version = "1.0"; + NBDKit.name...
2020 Sep 21
0
[nbdkit PATCH v3 14/14] ocaml: Implement .list_exports and friends
...handle. * This is just an example. The same value that you return from * your [open_connection] function is passed back as the first @@ -58,6 +65,9 @@ let ocamlexample_open readonly = incr id; { h_id = !id } +let ocamlexample_export_description h = + "some description" + let ocamlexample_get_size h = Int64.of_int (Bytes.length !disk) @@ -80,20 +90,23 @@ let plugin = { (* name, open_connection, get_size and pread are required, * everything else is optional. *) - NBDKit.name = "ocamlexample"; - version = "1.0"; + NBDKit.name...
2020 Sep 01
4
[nbdkit PATCH 0/2] More language bindings for .list_exports
This picks up python and ocaml. Some of our languages are lacking a number of bindings (for example, lua and perl lack .extents, so I didn't have anything to copy from), and I felt less comfortable with golang and rust. But for python and ocaml, I was able to test a working implementation. Eric Blake (2): python: Implement .list_exports and friends ocaml: Implement .list_exports and
2019 Aug 15
2
[nbdkit PATCH] ocaml: Add support for dynamic .thread_model
...in String.blit buf 0 !disk offset len +let ocamlexample_thread_model () = + NBDKit.THREAD_MODEL_SERIALIZE_CONNECTIONS + let plugin = { NBDKit.default_callbacks with (* name, open_connection, get_size and pread are required, @@ -88,8 +91,8 @@ let plugin = { get_size = Some ocamlexample_get_size; pread = Some ocamlexample_pread; pwrite = Some ocamlexample_pwrite; + + thread_model = Some ocamlexample_thread_model; } -let thread_model = NBDKit.THREAD_MODEL_SERIALIZE_CONNECTIONS - -let () = NBDKit.register_plugin thread_model plugin +let () = NBDKit.regist...
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update