Displaying 2 results from an estimated 2 matches for "51de178".
Did you mean:
516178
2018 Apr 05
1
[nbdkit PATCH] nbd: Fix gcc warning and off-by-one in socket name length
...s what you want - too
bad newer gcc is now rendering even valid uses of strncpy as a
source of complaints]
Signed-off-by: Eric Blake <eblake@redhat.com>
---
plugins/nbd/nbd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index 51de178..a4a1f12 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -100,7 +100,7 @@ nbd_config_complete (void)
nbdkit_error ("you must supply the socket=<SOCKNAME> parameter after the plugin name on the command line");
return -1;
}
- if (strlen (sockname) >= sizeof...
2018 Mar 22
1
[nbdkit PATCH] plugins: Add .can_zero callback
...+ if (r == -1)
+ *err = emulate ? EOPNOTSUPP : get_error (p);
+ if (r == 0 || *err != EOPNOTSUPP)
+ goto done;
+ }
assert (p->plugin.pwrite || p->plugin._pwrite_old);
flags &= ~NBDKIT_FLAG_MAY_TRIM;
diff --git a/plugins/nbd/nbd.c b/plugins/nbd/nbd.c
index dd84b04..51de178 100644
--- a/plugins/nbd/nbd.c
+++ b/plugins/nbd/nbd.c
@@ -618,6 +618,14 @@ nbd_can_trim (void *handle)
return h->flags & NBD_FLAG_SEND_TRIM;
}
+static int
+nbd_can_zero (void *handle)
+{
+ struct handle *h = handle;
+
+ return h->flags & NBD_FLAG_SEND_WRITE_ZEROES;
+}
+
stati...