Displaying 3 results from an estimated 3 matches for "stdio_pread".
2020 Apr 14
0
[nbdkit PATCH v2 3/3] server: More tests of stdin/out handling
...bool check = stdio_check ();
+ assert (check == true);
+ return NBDKIT_HANDLE_NOT_NEEDED;
+}
+
+static int64_t
+stdio_get_size (void *handle)
+{
+ bool check = stdio_check ();
+ assert (check == true);
+ return 1024*1024;
+}
+
+#define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL
+
+static int
+stdio_pread (void *handle, void *buf, uint32_t count, uint64_t offset,
+ uint32_t flags)
+{
+ bool check = stdio_check ();
+ assert (check == true);
+ memset (buf, 0, count);
+ return 0;
+}
+
+static struct nbdkit_plugin plugin = {
+ .name = "stdio",
+ .version...
2020 Aug 05
2
[PATCH nbdkit 1/2] server: Call .get_ready before redirecting stdin/stdout to /dev/null.
...struct nbdkit_plugin plugin = {
.config = stdio_config,
.config_complete = stdio_config_complete,
.get_ready = stdio_get_ready,
+ .after_fork = stdio_after_fork,
.open = stdio_open,
.get_size = stdio_get_size,
.pread = stdio_pread,
--
2.27.0
2020 Apr 14
6
[nbdkit PATCH v2 0/3] more consistent stdin/out handling
In v2:
- use int instead of bool in the public header
- split the tests from the code
- don't overload test-layers; instead, add new tests
- add a missing fflush exposed by the new tests
- other minor cleanups
Eric Blake (3):
server: Add nbdkit_stdio_safe
server: Sanitize stdin/out before running plugin code
server: More tests of stdin/out handling
docs/nbdkit-plugin.pod |