Displaying 3 results from an estimated 3 matches for "fileops_read_only_callbacks".
2020 Apr 09
6
[PATCH nbdkit v2 0/3] Implement fileops.
Needs some work still, see in particular the commit message
for patch 3.
Rich.
2020 Apr 09
0
[PATCH nbdkit v2 1/3] file: Move file operators to a new common/fileops mini-library.
...and .trim efficiently.
+ *
+ * To use it:
+ *
+ * - your plugin must define and use NBDKIT_API_VERSION == 2
+ *
+ * - your plugin per-connection handle must either have type ‘struct
+ * fileops *’, or include ‘struct fileops’ as the first member
+ *
+ * - add FILEOPS_READ_WRITE_CALLBACKS or
+ * FILEOPS_READ_ONLY_CALLBACKS to your ‘struct nbdkit_plugin’
+ *
+ * - call init_fileops from your .open callback, and close_fileops
+ * from your .close callback
+ *
+ * - optionally call fileops_dump_plugin from your .dump_plugin
+ * callback if you have one
+ *
+ * - the fileops mini-library is linked statically into the...
2020 Apr 09
0
[PATCH nbdkit v2 2/3] iso: Implement this plugin using fileops (read-only).
....get_size = iso_get_size,
+ .close = iso_close,
.can_multi_conn = iso_can_multi_conn,
- .can_cache = iso_can_cache,
- .pread = iso_pread,
- .errno_is_preserved = 1,
+
+ /* This bulk of this plugin is implemented in common/fileops/fileops.c */
+ FILEOPS_READ_ONLY_CALLBACKS
};
NBDKIT_REGISTER_PLUGIN(plugin)
--
2.25.0