Displaying 2 results from an estimated 2 matches for "nbdkit_dll_public".
2023 Sep 03
1
[PATCH nbdkit] server: Move size parsing code (nbdkit_parse_size) to common/include
This is the first part of a pair of patch series which aim to let us
use nbdkit_parse_size (or rather, an equivalent common function) in
nbdcopy, so we can write:
nbdcopy --request-size=32M ...
We can't do that now which was annoying me earlier in the week.
This commit creates a new function called human_size_parse which is
basically nbdkit_parse_size, and turns nbdkit_parse_size into a
2023 May 07
2
[PATCH nbdkit] server: Add -D nbdkit.environ=1 to dump the environment
...N> can be in the range 0 (no logging) to 99.
diff --git a/server/main.c b/server/main.c
index 1df5d69ac..7b6adc3cc 100644
--- a/server/main.c
+++ b/server/main.c
@@ -210,6 +210,26 @@ dump_config (void)
#endif
}
+#ifndef WIN32
+
+/* -D nbdkit.environ=1 to dump the environment at start up. */
+NBDKIT_DLL_PUBLIC int nbdkit_debug_environ;
+
+#ifndef HAVE_ENVIRON_DECL
+extern char **environ;
+#endif
+
+static void
+dump_environment (void)
+{
+ size_t i;
+
+ for (i = 0; environ[i]; ++i)
+ nbdkit_debug ("%s", environ[i]);
+}
+
+#endif /* !WIN32 */
+
int
main (int argc, char *argv[])
{
@@ -662...