search for: sh_unload

Displaying 5 results from an estimated 5 matches for "sh_unload".

2019 Sep 05
2
[PATCH nbdkit] Ban use of stack Variable Length Arrays (VLAs).
...t;-Wall -Wshadow -Werror" + WARNINGS_CFLAGS="-Wall -Wshadow -Wvla -Werror" AC_SUBST([WARNINGS_CFLAGS]) fi diff --git a/plugins/sh/sh.c b/plugins/sh/sh.c index c73b08b..acb50c4 100644 --- a/plugins/sh/sh.c +++ b/plugins/sh/sh.c @@ -74,8 +74,7 @@ sh_load (void) static void sh_unload (void) { - const size_t tmpdir_len = strlen (tmpdir); - char cmd[7 + tmpdir_len + 1]; /* "rm -rf " + tmpdir + \0 */ + CLEANUP_FREE char *cmd = NULL; /* Run the unload method. Ignore all errors. */ if (script) { @@ -85,8 +84,8 @@ sh_unload (void) } /* Delete the tempor...
2019 Sep 05
0
Re: [PATCH nbdkit] Ban use of stack Variable Length Arrays (VLAs).
...r current list; we may reach the point where we need to probe at configure time on which options we can safely use, instead of merely open-coding a list, but we'll deal with that when it breaks the build. > +++ b/plugins/sh/sh.c > @@ -74,8 +74,7 @@ sh_load (void) > static void > sh_unload (void) > { > - const size_t tmpdir_len = strlen (tmpdir); > - char cmd[7 + tmpdir_len + 1]; /* "rm -rf " + tmpdir + \0 */ > + CLEANUP_FREE char *cmd = NULL; > > /* Run the unload method. Ignore all errors. */ > if (script) { > @@ -85,8 +84,8 @@ sh_unlo...
2020 Sep 21
0
[nbdkit PATCH v3 06/14] api: Add .export_description
...+++ b/plugins/sh/sh.c @@ -284,46 +284,47 @@ sh_config_complete (void) #define THREAD_MODEL NBDKIT_THREAD_MODEL_PARALLEL static struct nbdkit_plugin plugin = { - .name = "sh", - .version = PACKAGE_VERSION, - .load = sh_load, - .unload = sh_unload, + .name = "sh", + .version = PACKAGE_VERSION, + .load = sh_load, + .unload = sh_unload, - .dump_plugin = sh_dump_plugin, + .dump_plugin = sh_dump_plugin, - .config = sh_config, - .config_complete = sh_...
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