Displaying 9 results from an estimated 9 matches for "tmpdisk_config".
2020 Apr 07
0
[PATCH nbdkit v2] tmpdisk: Pass any parameters as shell variables to the command.
...t-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 (key, "label") == 0) {
- if (strcmp (value, "") == 0)
- label = NULL;
- else
- label = value;
- }
else if (strcmp (key, &quo...
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
2020 Apr 08
0
[PATCH nbdkit v3] tmpdisk: Pass any parameters as shell variables to the command.
...t-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 (key, "label") == 0) {
- if (strcmp (value, "") == 0)
- label = NULL;
- else
- label = value;
- }
else if (strcmp (key, &quo...
2020 Apr 04
0
[PATCH nbdkit 2/2] tmpdisk: Pass any parameters as shell variables to the command.
...t-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 (key, "label") == 0) {
- if (strcmp (value, "") == 0)
- label = NULL;
- else
- label = value;
- }
else if (strcmp (key, &quo...
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 Mar 16
1
[PATCH nbdkit] New tmpdisk plugin.
Unfinished (needs tests). This is my attempt to make a
"remote tmpfs" plugin as outlined in this prior email:
https://www.redhat.com/archives/libguestfs/2020-March/msg00134.html
Although it would be possible to construct something a bit like this
using existing plugins and filters (perhaps with some new features in
those filters) I think it may be nicer to have a dedicated plugin for
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 Mar 17
2
[PATCH nbdkit v3] New tmpdisk plugin.
v2 was here:
https://www.redhat.com/archives/libguestfs/2020-March/msg00154.html
v3:
- Micro-optimize tmpdir.
- Quote $disk in default command shell fragment.
- Don't redirect mkfs output to /dev/null. Instead use
exec </dev/null >/dev/null before the shell fragment.
We may want to do this in other places where we run
external shell scripts, or more generally for all
2020 Mar 17
2
[PATCH nbdkit v2] New tmpdisk plugin.
...\"$type\" $extra $disk >/dev/null\n"
+ "else\n"
+ " mkfs -t \"$type\" $extra $labelopt \"$label\" $disk >/dev/null\n"
+ "fi\n";
+static const char *label = NULL;
+static const char *type = "ext4";
+
+static int
+tmpdisk_config (const char *key, const char *value)
+{
+ if (strcmp (key, "command") == 0) {
+ command = value;
+ }
+ else if (strcmp (key, "label") == 0) {
+ if (strcmp (value, "") == 0)
+ label = NULL;
+ else
+ label = value;
+ }
+ else if (strcmp (key, &quo...