search for: eval_load

Displaying 7 results from an estimated 7 matches for "eval_load".

2020 Feb 10
3
[nbdkit PATCH] eval: Allow user override of 'missing'
...*/ + if (missing && strcmp (script, missing) == 0 && unlink (script) == -1) { + nbdkit_error ("unlink: %m"); + return NULL; + } + fp = fopen (script, "w"); if (fp == NULL) { nbdkit_error ("fopen: %s: %m", script); @@ -216,7 +222,7 @@ eval_load (void) /* To make things easier, create a "missing" script which always * exits with code 2. If a method is missing we call this script - * instead. It could even be overridden by the user. + * instead. It can even be overridden by the user. */ missing = create_scrip...
2020 Apr 15
0
[PATCH nbdkit 8/9] eval, sh: Set $tmpdir before running the command, instead of globally.
...b/plugins/eval/eval.c @@ -50,7 +50,7 @@ #include "call.h" #include "methods.h" -static char tmpdir[] = "/tmp/nbdkitevalXXXXXX"; +char tmpdir[] = "/tmp/nbdkitevalXXXXXX"; static char *missing; static const char *known_methods[] = { @@ -218,11 +218,6 @@ eval_load (void) nbdkit_error ("mkdtemp: /tmp: %m"); exit (EXIT_FAILURE); } - /* Set $tmpdir for the script. */ - if (setenv ("tmpdir", tmpdir, 1) == -1) { - nbdkit_error ("setenv: tmpdir=%s: %m", tmpdir); - exit (EXIT_FAILURE); - } nbdkit_debug (&quot...
2020 Feb 10
0
Re: [nbdkit PATCH] eval: Allow user override of 'missing'
...ript, missing) == 0 && unlink (script) == -1) { > + nbdkit_error ("unlink: %m"); > + return NULL; > + } > + > fp = fopen (script, "w"); > if (fp == NULL) { > nbdkit_error ("fopen: %s: %m", script); > @@ -216,7 +222,7 @@ eval_load (void) > > /* To make things easier, create a "missing" script which always > * exits with code 2. If a method is missing we call this script > - * instead. It could even be overridden by the user. > + * instead. It can even be overridden by the user. >...
2020 Sep 21
0
[nbdkit PATCH v3 06/14] api: Add .export_description
...;, "flush", "get_ready", @@ -380,45 +381,46 @@ eval_config_complete (void) #define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL static struct nbdkit_plugin plugin = { - .name = "eval", - .version = PACKAGE_VERSION, - .load = eval_load, - .unload = eval_unload, + .name = "eval", + .version = PACKAGE_VERSION, + .load = eval_load, + .unload = eval_unload, - .dump_plugin = sh_dump_plugin, + .dump_plugin = sh_dump_plugin, - .config...
2020 Apr 15
18
[PATCH nbdkit 0/9] Generic vector, and pass $nbdkit_stdio_safe to shell scripts.
This was a rather longer trip around the houses than I anticipated! The basic purpose of the patch series is to set $nbdkit_stdio_safe to "0" or "1" in sh and eval plugin scripts. To do that, I ended up adding a nicer way to manipulate environ lists, and to do that, I ended up adding a whole generic vector implementation which is applicable in a lot of different places.
2020 Aug 27
10
[nbdkit PATCH v2 0/8] exportname filter
This is a revision of my .default_export work, plus new work on .export_descriptions and a new exportname filter. I think it is now ready to check in. Things I'd still like in 1.22: - the file plugin should implement .list_exports (patch already posted, but it needs rebasing on this series) - the ext2 filter should override .list_exports when in exportname mode - the nbd plugin should be
2020 Sep 21
18
[nbdkit PATCH v3 00/14] exportname filter
It's been several weeks since I posted v2 (I got distracted by improving libnbd to better test things, which in turn surfaced some major memory leak problems in nbdsh that are now fixed). Many of the patches are minor rebases from v2, with the biggest changes being fallout from: - patch 2: rename nbdkit_add_default_export to nbdkit_use_default_export - overall: this missed 1.22, so update