search for: reflection_config_help

Displaying 9 results from an estimated 9 matches for "reflection_config_help".

2019 Sep 17
1
Re: [PATCH nbdkit 1/4] Add reflection plugin.
...IMO: > > $ nbdkit --exit-with-parent reflection mode=exportname & > $ nbdsh -u 'nbd://localhost/hello' -c - <<'EOF' Or even: ( # subshell to allow us to alter the parent with exec nbdkit --exit-with-parent ... & exec nbdsh ... ) >>> +#define reflection_config_help \ >>> + "mode=MODE Plugin mode." >>> + >> >> Worth listing the valid values of MODE, or the fact that this parameter >> is optional because it defaults to exportname? > > OK. I didn't see '(default exportname)' in git; could be a...
2019 Sep 28
2
[PATCH nbdkit 1/2] common/include: Add function for subtracting struct timeval.
--- common/include/test-tvdiff.c | 75 +++++++++++++++++++++++++++++------- common/include/tvdiff.h | 13 ++++++- 2 files changed, 74 insertions(+), 14 deletions(-) diff --git a/common/include/test-tvdiff.c b/common/include/test-tvdiff.c index 9cbcfc0..abefb2e 100644 --- a/common/include/test-tvdiff.c +++ b/common/include/test-tvdiff.c @@ -36,7 +36,6 @@ #include <stdlib.h> #include
2019 Sep 28
0
[PATCH nbdkit 2/2] reflection: Add mode for reflecting server time.
...mode = MODE_UPTIME; + else if (strcasecmp (value, "conntime") == 0) + mode = MODE_CONNTIME; else { nbdkit_error ("unknown mode: '%s'", value); return -1; @@ -90,7 +111,8 @@ reflection_config (const char *key, const char *value) } #define reflection_config_help \ - "mode=exportname|base64exportname|address Plugin mode (default exportname)." + "mode=exportname|base64exportname|address|time|uptime\n" \ + " Plugin mode (default exportname)." /* Provide a way to detect if the base64 fea...
2019 Sep 16
2
Re: [PATCH nbdkit 1/4] Add reflection plugin.
...e") == 0) { Do we want to be nice and allow 'export-name' as an [undocumented] alternative spelling? > + mode = MODE_EXPORTNAME; > + } > + else if (strcasecmp (value, "base64exportname") == 0) { similarly for 'base64-export-name' > +#define reflection_config_help \ > + "mode=MODE Plugin mode." > + Worth listing the valid values of MODE, or the fact that this parameter is optional because it defaults to exportname? > +/* Create the per-connection handle. > + * > + * This is a rather unusual plugin because it has to parse data...
2019 Sep 28
0
[PATCH nbdkit v2 2/4] Rename nbdkit-reflection-plugin to nbdkit-info-plugin.
...g (const char *key, const char *value) +info_config (const char *key, const char *value) { if (strcmp (key, "mode") == 0) { if (strcasecmp (value, "exportname") == 0 || @@ -89,15 +89,15 @@ reflection_config (const char *key, const char *value) return 0; } -#define reflection_config_help \ +#define info_config_help \ "mode=exportname|base64exportname|address Plugin mode (default exportname)." /* Provide a way to detect if the base64 feature is supported. */ static void -reflection_dump_plugin (void) +info_dump_plugin (void) { #ifdef HAVE_BASE64 - printf ("...
2019 Sep 17
0
Re: [PATCH nbdkit 1/4] Add reflection plugin.
...'export-name' as an [undocumented] > alternative spelling? OK. > > + mode = MODE_EXPORTNAME; > > + } > > + else if (strcasecmp (value, "base64exportname") == 0) { > > similarly for 'base64-export-name' OK. > > > +#define reflection_config_help \ > > + "mode=MODE Plugin mode." > > + > > Worth listing the valid values of MODE, or the fact that this parameter > is optional because it defaults to exportname? OK. > > +++ b/tests/test-reflection-base64.sh > > > + > > +requires nbdsh -...
2019 Sep 15
0
[PATCH nbdkit 1/4] Add reflection plugin.
...out base64 support"); + return -1; +#endif + } + else { + nbdkit_error ("unknown mode: '%s'", value); + return -1; + } + } + else { + nbdkit_error ("unknown parameter '%s'", key); + return -1; + } + + return 0; +} + +#define reflection_config_help \ + "mode=MODE Plugin mode." + +/* Provide a way to detect if the base64 feature is supported. */ +static void +reflection_dump_plugin (void) +{ +#ifdef HAVE_BASE64 + printf ("reflection_base64=yes\n"); +#endif +} + +/* Per-connection handle. */ +struct handle { + void *da...
2019 Sep 15
13
[PATCH nbdkit 0/4] Reflection plugin, peer name.
This series is based on my blog posting here: https://rwmj.wordpress.com/2019/09/13/nbdkit-supports-exportnames/ It depends on the fix for realloc: https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00103 This series adds a fun plugin, and also an semi-related feature I've long thought to be desirable. You can consider patches 1 & 4, and patches 2 & 3 as forming
2019 Sep 28
9
[PATCH nbdkit v2 0/4] info: Add mode for sending back server time.
v1 was: https://www.redhat.com/archives/libguestfs/2019-September/thread.html#00361 v2: - Adds a patch to rename the reflection plugin to the info plugin. - Adds tests. Rich.