search for: last_var

Displaying 3 results from an estimated 3 matches for "last_var".

Did you mean: last_val
2020 Apr 08
0
[PATCH nbdkit v3] tmpdisk: Pass any parameters as shell variables to the command.
...p"; -static int64_t size = -1; -static const char *label = NULL; -static const char *type = "ext4"; +static int64_t requested_size = -1; /* size parameter on the 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; + fre...
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 Aug 14
2
[PATCH nbdkit] New ondemand plugin.
...tic char *dir; /* dir parameter */ +static DIR *exportsdir; /* opened exports dir */ +static int64_t requested_size = -1; /* size parameter on the 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. + */ +extern const char *command; + +static void +ondemand_unload (void) +{ + struct var *v, *v_next; + + for (v = vars; v != NULL; v = v_next) { + v_next = v->next; + free (v); + } + + closedir...