search for: 5e8df151

Displaying 7 results from an estimated 7 matches for "5e8df151".

2020 Apr 04
4
[PATCH nbdkit 0/2] Generalize the tmpdisk plugin.
Patch 1/2 is uncontroversial. Patch 2/2 is an interesting idea I had to generalize this plugin. It already uses a complete embedded shell script to do most of the work. What if, instead of making special cases for "type" and "label" params, we simply turn any other plugin parameters into script variables? This part of it works fine. However there is another problem which is
2020 Apr 04
0
[PATCH nbdkit 1/2] tmpdisk: Generate the default command from a shell script fragment.
...';' >> $@-t + mv $@-t $@ plugin_LTLIBRARIES = nbdkit-tmpdisk-plugin.la nbdkit_tmpdisk_plugin_la_SOURCES = \ + default-command.c \ tmpdisk.c \ $(top_srcdir)/include/nbdkit-plugin.h \ $(NULL) diff --git a/plugins/tmpdisk/tmpdisk.c b/plugins/tmpdisk/tmpdisk.c index a5aacc9d..5e8df151 100644 --- a/plugins/tmpdisk/tmpdisk.c +++ b/plugins/tmpdisk/tmpdisk.c @@ -55,24 +55,10 @@ static int64_t size = -1; static const char *label = NULL; static const char *type = "ext4"; -static const char *command = - "labelopt='-L'\n" - "case \"$type\&quot...
2020 Apr 04
0
[PATCH nbdkit 2/2] tmpdisk: Pass any parameters as shell variables to the command.
...-ip-filter(1)>, L<nbdkit-limit-filter(1)>, L<nbdkit-linuxdisk-plugin(1)>, L<nbdkit-memory-plugin(1)>, +L<nbdkit-sh-plugin(1)>, L<nbdkit-loop(1)>, L<nbdkit-tls(1)>, L<mkfs(8)>. diff --git a/plugins/tmpdisk/tmpdisk.c b/plugins/tmpdisk/tmpdisk.c index 5e8df151..56dbb4cd 100644 --- a/plugins/tmpdisk/tmpdisk.c +++ b/plugins/tmpdisk/tmpdisk.c @@ -52,8 +52,12 @@ static const char *tmpdir = "/var/tmp"; static int64_t size = -1; -static const char *label = NULL; -static const char *type = "ext4"; + +/* Shell variables. */ +static struct...
2020 Apr 07
0
[PATCH nbdkit v2] tmpdisk: Pass any parameters as shell variables to the command.
...-ip-filter(1)>, L<nbdkit-limit-filter(1)>, L<nbdkit-linuxdisk-plugin(1)>, L<nbdkit-memory-plugin(1)>, +L<nbdkit-sh-plugin(1)>, L<nbdkit-loop(1)>, L<nbdkit-tls(1)>, L<mkfs(8)>. diff --git a/plugins/tmpdisk/tmpdisk.c b/plugins/tmpdisk/tmpdisk.c index 5e8df151..38f003b1 100644 --- a/plugins/tmpdisk/tmpdisk.c +++ b/plugins/tmpdisk/tmpdisk.c @@ -42,6 +42,7 @@ #include <fcntl.h> #include <errno.h> #include <sys/types.h> +#include <sys/stat.h> #include <sys/wait.h> #define NBDKIT_API_VERSION 2 @@ -51,9 +52,13 @@ #include...
2020 Apr 08
0
[PATCH nbdkit v3] tmpdisk: Pass any parameters as shell variables to the command.
....sh \ test-truncate2.sh \ test-truncate3.sh \ @@ -800,6 +801,7 @@ endif HAVE_PERL # tmpdisk plugin test. LIBGUESTFS_TESTS += test-tmpdisk +TESTS += test-tmpdisk-command.sh test_tmpdisk_SOURCES = \ test-tmpdisk.c \ diff --git a/plugins/tmpdisk/tmpdisk.c b/plugins/tmpdisk/tmpdisk.c index 5e8df151..6d8efc08 100644 --- a/plugins/tmpdisk/tmpdisk.c +++ b/plugins/tmpdisk/tmpdisk.c @@ -41,7 +41,9 @@ #include <unistd.h> #include <fcntl.h> #include <errno.h> +#include <assert.h> #include <sys/types.h> +#include <sys/stat.h> #include <sys/wait.h> #de...
2020 Apr 08
2
[PATCH nbdkit v3] tmpdisk: Generalize the tmpdisk plugin.
v2 was here: https://www.redhat.com/archives/libguestfs/2020-April/msg00075.html In v3: - Add [VAR=VALUE ...] to manual. - Various minor improvements to the manual. - Work (at least, in theory - not tested) with block devices or symlinks. I didn't document this because it's hard to ensure these files or block devices would be cleaned up, so here be dragons. - Remove O_NOCTTY. -
2020 Apr 07
2
[PATCH nbdkit v2] tmpdisk: Generalize the tmpdisk plugin
An evolution of v1 here: https://www.redhat.com/archives/libguestfs/2020-April/msg00035.html I want to generalize the tmpdisk plugin, particularly so you can use commands like ‘qemu-img create’ or even ‘virt-builder’. (Actually virt-builder really works - I tested it - but of course it causes a 30+ second delay when connecting to the server.) You can now use commands such as: nbdkit tmpdisk