Displaying 3 results from an estimated 3 matches for "e049864a".
2020 Aug 07
0
[nbdkit PATCH 1/4] file: Forbid non-regular, non-block file names
...own the road when trying to
use .pread; let's move the failure sooner to .open.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
plugins/file/file.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/plugins/file/file.c b/plugins/file/file.c
index dc99f992..e049864a 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -189,7 +189,16 @@ file_open (int readonly)
return NULL;
}
- h->is_block_device = S_ISBLK (statbuf.st_mode);
+ if (S_ISBLK (statbuf.st_mode))
+ h->is_block_device = true;
+ else if (S_ISREG (statbuf.st_mode))
+ h-&...
2020 Aug 07
0
[nbdkit PATCH 2/4] file: Add .list_exports support
...a $(LIBGUESTFS_LIBS)
-TESTS += test-file-extents.sh
-EXTRA_DIST += test-file-extents.sh
+TESTS += test-file-extents.sh test-file-dir.sh
+EXTRA_DIST += test-file-extents.sh test-file-dir.sh
# floppy plugin test.
TESTS += test-floppy.sh
diff --git a/plugins/file/file.c b/plugins/file/file.c
index e049864a..4afcad11 100644
--- a/plugins/file/file.c
+++ b/plugins/file/file.c
@@ -43,6 +43,7 @@
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <errno.h>
+#include <dirent.h>
#include <pthread.h>
@@ -66,9 +67,11 @@
#endif
static char *filename = NULL;
+static cha...
2020 Aug 07
8
[nbdkit PATCH 0/4] More .list_exports uses
Here's changes to the file plugin (which I'm happy with) and a new
exportname filter (which is still at RFC stage; I need to finish
implementing strict mode in .open, and add tests).
I also discovered that we really want .list_exports and .open to know
when they are used on plaintext vs. tls clients for --tls=on, and we
may want to split out a new .default_export callback rather than