Displaying 20 results from an estimated 22 matches for "open_filter_so".
2020 Mar 23
0
[PATCH nbdkit 2/3] server: Inject API functions for Windows
..., program_name, name);
+ exit (EXIT_FAILURE);
+ }
+ functions_init (functions);
+#endif
*(void **) (&plugin_init) = dlsym (dl, "plugin_init");
if ((error = dlerror ()) != NULL) {
fprintf (stderr, "%s: %s: %s\n", program_name, name, error);
@@ -825,6 +885,7 @@ open_filter_so (struct backend *next, size_t i,
bool free_filename = false;
void *dl;
struct nbdkit_filter *(*filter_init) (void);
+ void *(*functions_init) (struct nbdkit_functions *);
char *error;
if (short_name) {
@@ -846,6 +907,18 @@ open_filter_so (struct backend *next, size_t i,
/* In...
2019 Aug 27
1
[PATCH nbdkit] server: Try hard to maintain invariant that fds 0, 1 and 2 are always open.
...mp; sockin != sockout)
- close (sockout);
+ close_or_nullify_fd (sockout);
gnutls_deinit (session);
conn->crypto_session = NULL;
diff --git a/server/main.c b/server/main.c
index 65025a6..65bef30 100644
--- a/server/main.c
+++ b/server/main.c
@@ -60,6 +60,7 @@ static 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; /* -...
2019 Jan 01
2
[PATCH nbdkit] server: Use bool for types which are really booleans.
...d);
char *error;
@@ -739,7 +740,7 @@ open_plugin_so (size_t i, const char *name, int short_name)
perror ("asprintf");
exit (EXIT_FAILURE);
}
- free_filename = 1;
+ free_filename = true;
}
dl = dlopen (filename, RTLD_NOW|RTLD_GLOBAL);
@@ -780,7 +781,7 @@ open_filter_so (struct backend *next, size_t i,
{
struct backend *ret;
char *filename = (char *) name;
- int free_filename = 0;
+ bool free_filename = false;
void *dl;
struct nbdkit_filter *(*filter_init) (void);
char *error;
@@ -792,7 +793,7 @@ open_filter_so (struct backend *next, size_t i,...
2018 Jan 17
0
[PATCH 7/9] Implement filters.
...main.c
@@ -64,7 +64,8 @@
static int is_short_name (const char *);
static char *make_random_fifo (void);
-static struct backend *open_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (size_t i, const char *filename, int short_name);
+static struct backend *open_filter_so (struct backend *next, size_t i, const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -120,6 +121,7 @@ static const struct option long_options[] = {
{ "export", 1, NULL, 'e' },
{...
2019 Nov 04
3
[PATCH nbdkit v2 0/2] Implement fuzzing using Clang's libFuzzer.
v1 was here:
https://www.redhat.com/archives/libguestfs/2019-November/msg00003.html
This version depends on:
https://www.redhat.com/archives/libguestfs/2019-November/msg00004.html
and this series:
https://www.redhat.com/archives/libguestfs/2019-November/msg00009.html
The delta has been reduced slightly because of changes made possible
by cleaning up and fixing the quit path in nbdkit. It's
2019 Nov 02
2
[PATCH nbdkit 0/2] Implement fuzzing using Clang's libFuzzer.
libFuzzer is Clang's fuzzer, and alternative to using AFL:
https://llvm.org/docs/LibFuzzer.html
I implemented an alternative method of fuzzing for libnbd earlier
today and it's pretty simple:
https://github.com/libguestfs/libnbd/commit/c19a6fbae9a21a7d4693418706c59e81ed256875
However it's considerably more difficult to use libFuzzer with
non-library code -- in this case nbdkit.
2020 Mar 23
6
[PATCH nbdkit 0/3] msys2 support for review
I pushed a few of the msys2 patches upstream. I changed the way that
$(SHARED_LDFLAGS) works so it's more to my liking, and the others were
pushed unchanged. Three patches remain which I'm posting on the
mailing list for proper review.
Rich.
2020 Aug 20
0
[PATCH nbdkit 12/13] wrapper: Port the wrapper to run on Windows.
...ir. */
if (asprintf (&filename,
- "%s/nbdkit-%s-plugin.so", plugindir, name) == -1) {
+ "%s/nbdkit-%s-plugin." SOEXT, plugindir, name) == -1) {
perror ("asprintf");
exit (EXIT_FAILURE);
}
@@ -872,7 +872,7 @@ open_filter_so (struct backend *next, size_t i,
if (short_name) {
/* Short names are rewritten relative to the filterdir. */
if (asprintf (&filename,
- "%s/nbdkit-%s-filter.so", filterdir, name) == -1) {
+ "%s/nbdkit-%s-filter." SOEXT, filterd...
2018 Jan 19
0
[PATCH nbdkit filters-v2 2/5] Introduce filters.
...main.c
@@ -64,7 +64,8 @@
static int is_short_name (const char *);
static char *make_random_fifo (void);
-static struct backend *open_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (size_t i, const char *filename, int short_name);
+static struct backend *open_filter_so (struct backend *next, size_t i, const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -120,6 +121,7 @@ static const struct option long_options[] = {
{ "export", 1, NULL, 'e' },
{...
2018 Jan 19
0
[PATCH nbdkit filters-v3 3/7] Introduce filters.
...main.c
@@ -64,7 +64,8 @@
static int is_short_name (const char *);
static char *make_random_fifo (void);
-static struct backend *open_plugin_so (const char *filename, int short_name);
+static struct backend *open_plugin_so (size_t i, const char *filename, int short_name);
+static struct backend *open_filter_so (struct backend *next, size_t i, const char *filename, int short_name);
static void start_serving (void);
static void set_up_signals (void);
static void run_command (void);
@@ -120,6 +121,7 @@ static const struct option long_options[] = {
{ "export", 1, NULL, 'e' },
{...
2020 Feb 12
5
[PATCH nbdkit 1/3] server: Rename global backend pointer to "top".
..., short_name);
+ top = open_plugin_so (0, filename, short_name);
i = 1;
while (filter_filenames) {
struct filter_filename *t = filter_filenames;
@@ -566,7 +566,7 @@ main (int argc, char *argv[])
filename = t->filename;
short_name = is_short_name (filename);
- backend = open_filter_so (backend, i++, filename, short_name);
+ top = open_filter_so (top, i++, filename, short_name);
filter_filenames = t->next;
free (t);
@@ -586,7 +586,7 @@ main (int argc, char *argv[])
printf ("\n");
b->usage (b);
}
- backend->free (backend);
+...
2019 Sep 01
11
[nbdkit PATCH 00/10] Avoid -Wshadow
While working on can_FOO caching, at one point I got confused by
whether 'readonly' meant the global set by -r or a local passed to
.open(). A quick attempt to compile with -Wshadow found several other
confusing points; this series gets us to the point that we can add
-Wshadow to builds with --enable-gcc-warnings.
Eric Blake (10):
server: Avoid -Wshadow warnings
guestfs: Avoid
2018 Jan 14
10
[PATCH nbdkit INCOMPLETE 0/6] Introduce filters to nbdkit.
This patch isn't complete (patch 6/6 isn't finished) so it's just for
discussion, although it does compile and run.
This introduces to nbdkit a concept of "filters" which can be placed
in front of plugins to modify their behaviour. Some examples where
you might use filters:
* Serve a subset of the data, such as (offset, range) or a
single partition from a disk image.
2018 Nov 14
3
[PATCH nbdkit v2 0/2] build: Replace ./nbdkit with a C program.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html
v2:
- Use stdbool for booleans.
- Use __attribute__((format(printf))).
- Don't abort on invalid options, exit with failure instead.
- Preserve long/short option choices in the output.
- Add '=' in long option output, ie. always use --longopt=arg.
- Add "--" parameter
2018 Nov 14
5
[PATCH nbdkit v3 0/4] build: Replace ./nbdkit with a C program.
v1 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00147.html
v2 was here:
https://www.redhat.com/archives/libguestfs/2018-November/msg00152.html
v3:
- Use optarg != NULL as a sentinel for has_arg.
- Moved some variable decls into the inner loop.
- Make nbdkit wrapper depend on config.status, so if srcdir or
builddir changes then we rebuild the wrapper. It
2018 Nov 13
3
[PATCH 0/2] build: Replace ./nbdkit with a C program.
This patch series solves the FreeBSD shebang problem in a completely
different way, and a few other things besides. I propose that we
replace ./nbdkit with a C program. The C program is a straightforward
translation of the shell script.
Some advantages of this approach are:
- We can parse options in exactly the same way as the real program.
- Use the more accurate ‘is_short_name’ test for
2018 Jan 19
9
[PATCH nbdkit filters-v3 0/7] Introduce filters.
This is still tentative and needs a lot of work, but:
- partition filter works, supporting MBR & GPT
- prepare and finalize methods fixed
- open method can now be changed (allowing readonly flag to be modified)
- thread_model can be limited
I believe I made most of the changes which were previously suggested
in email. I think the only one I didn't was preventing inclusion of
both
2018 Jan 19
10
[PATCH nbdkit filters-v2 0/5] Introduce filters.
Rebased filters patch. Requires current git master + the locks /
thread model fix
(https://www.redhat.com/archives/libguestfs/2018-January/msg00128.html)
So a few changes here since last time:
The "introduce filters" and "implement filters" patches are
squashed together.
I introduced a concept of .prepare and .finalize. These run before
and after the data serving phase
2018 Jan 17
14
[PATCH 0/9] Add filters to nbdkit.
The first three patches are identical to:
https://www.redhat.com/archives/libguestfs/2018-January/msg00079.html
"[PATCH nbdkit v2 0/3] Refactor plugin_* functions into a backend"
The rest of the patches add filters using the new filter API
previously described here:
https://www.redhat.com/archives/libguestfs/2018-January/msg00073.html
This needs a lot more testing -- and tests --
2018 Jan 19
16
[nbdkit PATCH v2 00/13] Add filters + FUA support to nbdkit
A combination of the work that both Rich and I have been doing
lately, where filters use only the new API with flags on every
command that the client can send over the wire (we can then
add support for more flags in nbdkit without having to add new
callbacks, as NBD adds more flags upstream).
Eric Blake (4):
protocol: Split flags from cmd field in requests
backend: Pass flags argument through