Displaying 2 results from an estimated 2 matches for "a9d6491a".
2019 Aug 13
3
[nbdkit PATCH 0/2] errno cleanup patches
I ran into these while trying to prepare patches to add
NBD_CMD_FLAG_FAST_ZERO, which will expose a new NBD_ENOTSUP wire
value.
Eric Blake (2):
plugins: Don't lose original error when emulating FUA
plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
docs/nbdkit-filter.pod | 11 ++++++-----
docs/nbdkit-plugin.pod | 12 +++++++-----
plugins/file/file.c | 16 +++++++++++-----
2019 Aug 13
0
[nbdkit PATCH 2/2] plugins: Permit ENOTSUP as synonym for EOPNOTSUPP
...dkit_set_error> or C<errno>), then C<.pwrite> will be used
+instead.
The callback must write the whole C<count> bytes if it can. The NBD
protocol doesn't allow partial writes (instead, these would be
diff --git a/plugins/file/file.c b/plugins/file/file.c
index 9df5001d..a9d6491a 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -73,6 +73,12 @@ static pthread_mutex_t lseek_lock = PTHREAD_MUTEX_INITIALIZER;
/* to enable: -D file.zero=1 */
int file_debug_zero;
+static bool
+file_is_enotsup (int err)
+{
+ return err == ENOTSUP || err == EOPNOTSUPP;
+}
+
static...