Displaying 13 results from an estimated 13 matches for "exit_with_par".
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
...lt;stdlib.h>
+#include <stdbool.h>
#include <string.h>
#include <fcntl.h>
#include <unistd.h>
@@ -75,26 +76,26 @@ static unsigned int get_socket_activation (void);
static int is_config_key (const char *key, size_t len);
struct debug_flag *debug_flags; /* -D */
-int exit_with_parent; /* --exit-with-parent */
+bool exit_with_parent; /* --exit-with-parent */
const char *exportname; /* -e */
-int foreground; /* -f */
+bool foreground; /* -f */
const char *ipaddr; /* -i */
enum log_to log_to = LOG_TO_DEFAU...
2018 Jun 28
1
[nbdkit PATCH] main: More idiomatic use of getopt_long
...n and use in source and binary forms, with or without
@@ -109,44 +109,55 @@ struct backend *backend;
static char *random_fifo_dir = NULL;
static char *random_fifo = NULL;
-enum { HELP_OPTION = CHAR_MAX + 1 };
+enum {
+ HELP_OPTION = CHAR_MAX + 1,
+ DUMP_CONFIG_OPTION,
+ DUMP_PLUGIN_OPTION,
+ EXIT_WITH_PARENT_OPTION,
+ FILTER_OPTION,
+ RUN_OPTION,
+ SELINUX_LABEL_OPTION,
+ TLS_OPTION,
+ TLS_CERTIFICATES_OPTION,
+ TLS_VERIFY_PEER_OPTION,
+};
static const char *short_options = "e:fg:i:nop:P:rst:u:U:vV";
static const struct option long_options[] = {
- { "help", 0, NUL...
2019 Aug 27
1
[PATCH nbdkit] server: Try hard to maintain invariant that fds 0, 1 and 2 are always open.
...struct backend *open_filter_so (struct backend *next, size_t i, const cha
static void start_serving (void);
static void write_pidfile (void);
static bool is_config_key (const char *key, size_t len);
+static void open_std_file_descriptors (void);
struct debug_flag *debug_flags; /* -D */
bool exit_with_parent; /* --exit-with-parent */
@@ -149,6 +150,13 @@ main (int argc, char *argv[])
size_t i;
const char *magic_config_key;
+ /* Ensures that fds 0, 1 and 2 are open (on /dev/null if nothing
+ * else). This is so that nbdkit and plugins can assume these file
+ * descriptors are a...
2018 Sep 08
0
[PATCH nbdkit v2 2/6] main: Tighten up characters permitted in config keys.
....c
@@ -72,6 +72,7 @@ static void fork_into_background (void);
static uid_t parseuser (const char *);
static gid_t parsegroup (const char *);
static unsigned int get_socket_activation (void);
+static int is_config_key (const char *key, size_t len);
struct debug_flag *debug_flags; /* -D */
int exit_with_parent; /* --exit-with-parent */
@@ -694,7 +695,7 @@ main (int argc, char *argv[])
magic_config_key = backend->magic_config_key (backend);
for (i = 0; optind < argc; ++i, ++optind) {
p = strchr (argv[optind], '=');
- if (p) { /* key=value */
+...
2018 Sep 10
0
[PATCH nbdkit v3 2/6] main: Tighten up characters permitted in config keys.
....c
@@ -72,6 +72,7 @@ static void fork_into_background (void);
static uid_t parseuser (const char *);
static gid_t parsegroup (const char *);
static unsigned int get_socket_activation (void);
+static int is_config_key (const char *key, size_t len);
struct debug_flag *debug_flags; /* -D */
int exit_with_parent; /* --exit-with-parent */
@@ -694,7 +695,7 @@ main (int argc, char *argv[])
magic_config_key = backend->magic_config_key (backend);
for (i = 0; optind < argc; ++i, ++optind) {
p = strchr (argv[optind], '=');
- if (p) { /* key=value */
+...
2018 Jan 23
1
[PATCH nbdkit] Change the default protocol to newstyle.
...exportname
+for the newstyle protocol. Use the I<-o> or I<--oldstyle> flag to
+force the oldstyle protocol.
Some common clients and the protocol they require:
diff --git a/src/main.c b/src/main.c
index e5d9093..67cbbde 100644
--- a/src/main.c
+++ b/src/main.c
@@ -80,7 +80,7 @@ int exit_with_parent; /* --exit-with-parent */
const char *exportname; /* -e */
int foreground; /* -f */
const char *ipaddr; /* -i */
-int newstyle; /* -n */
+int newstyle = 1; /* 0 = -o, 1 = -n */
char *pidfile; /* -P...
2020 Jul 22
2
[nbdkit PATCH] server: Reinstate limited use of -e/-exportname.
...e
* different syntax, so try to guess which one we need.
diff --git a/server/main.c b/server/main.c
index d815fe12..2f0aaf07 100644
--- a/server/main.c
+++ b/server/main.c
@@ -79,6 +79,7 @@ static bool is_config_key (const char *key, size_t len);
struct debug_flag *debug_flags; /* -D */
bool exit_with_parent; /* --exit-with-parent */
+const char *export_name; /* -e */
bool foreground; /* -f */
const char *ipaddr; /* -i */
enum log_to log_to = LOG_TO_DEFAULT; /* --log */
@@ -344,7 +345,7 @@ main (int argc, char *argv[])
break;
case 'e'...
2018 Aug 12
13
[PATCH nbdkit 00/10] FreeBSD support.
With these patches, a majority of tests pass. The notable
things which are still broken:
- Because FreeBSD links /home -> /usr/home, $(pwd) gives a different
result from realpath(2). Therefore some tests which implicitly
rely on (eg) a plugin which calls nbdkit_realpath internally and
then checking that path against $(pwd) fail.
- Shebangs (#!) don't seem to work the same way
2020 Jul 21
3
[PATCH nbdkit] server: Deprecate the -e/--exportname parameter.
...different syntax, so try to guess which one we need.
*/
diff --git a/server/main.c b/server/main.c
index c432f5bd..d815fe12 100644
--- a/server/main.c
+++ b/server/main.c
@@ -79,7 +79,6 @@ static bool is_config_key (const char *key, size_t len);
struct debug_flag *debug_flags; /* -D */
bool exit_with_parent; /* --exit-with-parent */
-const char *exportname; /* -e */
bool foreground; /* -f */
const char *ipaddr; /* -i */
enum log_to log_to = LOG_TO_DEFAULT; /* --log */
@@ -345,13 +344,7 @@ main (int argc, char *argv[])
break;
case 'e...
2018 Sep 08
8
[PATCH nbdkit v2 0/6] plugins: Implement magic config key.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2:
- As discussed in the patch review, tighten up the characters
permitted in keys.
- Update documentation to note that relative paths can be made
safe by prefixing with ./ and absolute paths do not need any
extra steps.
- I pushed patch 1/6 from the v1 series since it was just a trivial
2018 Sep 10
7
[PATCH nbdkit v3 0/6] plugins: Implement magic config key.
v1: https://www.redhat.com/archives/libguestfs/2018-September/msg00024.html
v2: https://www.redhat.com/archives/libguestfs/2018-September/msg00034.html
v3:
- Fixed is_config_key zero length test.
- Fixed is_config_key so it uses strspn and is not O(n^2).
- Changed >= 1.7 to >= 1.8 in the documentation.
Rich.
2020 Aug 18
15
[PATCH nbdkit 0/9] Port to Windows.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw
This is the port to Windows using native Windows APIs (not MSYS or
Cygwin).
This patch series is at the point where it basically now works. I can
run the server with the memory plugin, and access it remotely using
guestfish, creating filesystems and so on without any apparent
problems.
Nevertheless there are many
2020 Aug 20
15
[PATCH nbdkit 0/13] Port to Windows without using a separate library.
Also available here:
https://github.com/rwmjones/nbdkit/tree/2020-windows-mingw-nolib
After a lot of work I have made the port to Windows work without using
a separate library. Instead, on Windows only, we build an "import
library" (library of stubs) which resolves references to nbdkit_*
functions in the main program and fixes up the plugin, basically the
first technique outlined in