search for: tmpdisk_unload

Displaying 6 results from an estimated 6 matches for "tmpdisk_unload".

Did you mean: tmpdisk_load
2020 Apr 04
0
[PATCH nbdkit 2/2] tmpdisk: Pass any parameters as shell variables to the command.
...*type = "ext4"; + +/* Shell variables. */ +static struct var { + struct var *next; + const char *key, *value; +} *vars; /* This comes from default-command.c which is generated from * default-command.sh.in. @@ -70,29 +74,49 @@ tmpdisk_load (void) tmpdir = s; } +static void +tmpdisk_unload (void) +{ + struct var *v, *v_next; + + for (v = vars; v != NULL; v = v_next) { + v_next = v->next; + free (v); + } +} + static int tmpdisk_config (const char *key, const char *value) { if (strcmp (key, "command") == 0) { command = value; } - else if (strcmp (ke...
2020 Apr 07
0
[PATCH nbdkit v2] tmpdisk: Pass any parameters as shell variables to the command.
...ter on the command line */ + +/* Shell variables. */ +static struct var { + struct var *next; + const char *key, *value; +} *vars; /* This comes from default-command.c which is generated from * default-command.sh.in. @@ -70,29 +75,49 @@ tmpdisk_load (void) tmpdir = s; } +static void +tmpdisk_unload (void) +{ + struct var *v, *v_next; + + for (v = vars; v != NULL; v = v_next) { + v_next = v->next; + free (v); + } +} + static int tmpdisk_config (const char *key, const char *value) { if (strcmp (key, "command") == 0) { command = value; } - else if (strcmp (ke...
2020 Apr 08
0
[PATCH nbdkit v3] tmpdisk: Pass any parameters as shell variables to the command.
...command line */ + +/* Shell variables. */ +static struct var { + struct var *next; + const char *key, *value; +} *vars, *last_var; /* This comes from default-command.c which is generated from * default-command.sh.in. @@ -70,29 +76,61 @@ tmpdisk_load (void) tmpdir = s; } +static void +tmpdisk_unload (void) +{ + struct var *v, *v_next; + + for (v = vars; v != NULL; v = v_next) { + v_next = v->next; + free (v); + } +} + static int tmpdisk_config (const char *key, const char *value) { if (strcmp (key, "command") == 0) { command = value; } - else if (strcmp (ke...
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 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 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