search for: nbdkit_vdebug

Displaying 20 results from an estimated 59 matches for "nbdkit_vdebug".

Did you mean: nbdkit_debug
2020 Aug 18
0
[PATCH nbdkit 8/9] include: Prefix all exports with NBDKIT_DLLEXPORT.
...n NBDKIT_DLLEXPORT void nbdkit_error (const char *msg, ...) + ATTRIBUTE_FORMAT_PRINTF (1, 2); +extern NBDKIT_DLLEXPORT void nbdkit_verror (const char *msg, va_list args) ATTRIBUTE_FORMAT_PRINTF (1, 0); -extern void nbdkit_debug (const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); -extern void nbdkit_vdebug (const char *msg, va_list args) +extern NBDKIT_DLLEXPORT void nbdkit_debug (const char *msg, ...) + ATTRIBUTE_FORMAT_PRINTF (1, 2); +extern NBDKIT_DLLEXPORT void nbdkit_vdebug (const char *msg, va_list args) ATTRIBUTE_FORMAT_PRINTF (1, 0); -extern char *nbdkit_absolute_path (const char *path)...
2020 Feb 16
0
[nbdkit PATCH v4 1/4] server: Export nbdkit_set_dlopen_prefix function
...lt;umask(2)> of C<0022>. diff --git a/include/nbdkit-common.h b/include/nbdkit-common.h index 50f3dd4f..44abce5e 100644 --- a/include/nbdkit-common.h +++ b/include/nbdkit-common.h @@ -83,6 +83,8 @@ extern void nbdkit_debug (const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern void nbdkit_vdebug (const char *msg, va_list args) ATTRIBUTE_FORMAT_PRINTF (1, 0); +extern int nbdkit_set_dlopen_prefix (const char *newdir); + extern char *nbdkit_absolute_path (const char *path); extern int64_t nbdkit_parse_size (const char *str); extern int nbdkit_parse_bool (const char *str); diff --git a/...
2020 Mar 23
0
[PATCH nbdkit 1/3] include: Function indirection for PE DLL
...+{ + _nbdkit_functions.verror (msg, args); +} +static void nbdkit_debug (const char *msg, ...) + ATTRIBUTE_FORMAT_PRINTF (1, 2); +static void nbdkit_debug (const char *msg, ...) +{ + va_list args; + va_start (args, msg); + _nbdkit_functions.vdebug (msg, args); + va_end (args); +} +static void nbdkit_vdebug (const char *msg, va_list args) + ATTRIBUTE_FORMAT_PRINTF (1, 0); +static void nbdkit_vdebug (const char *msg, va_list args) +{ + _nbdkit_functions.vdebug (msg, args); +} + +static char *nbdkit_absolute_path (const char *path) +{ + return _nbdkit_functions.absolute_path (path); +} +static int64_...
2017 Nov 17
0
[nbdkit PATCH 1/4] errors: Avoid interleaved errors from parallel threads
...; + +static void +lock (void) +{ + int r = pthread_mutex_lock(&errors_lock); + assert(!r); +} + +static void +unlock (void) +{ + int r = pthread_mutex_unlock(&errors_lock); + assert(!r); +} + +/* Called with lock taken. */ static void prologue (const char *type) { @@ -69,11 +89,13 @@ nbdkit_vdebug (const char *fs, va_list args) if (!verbose) return; + lock (); prologue ("debug"); vfprintf (stderr, fs, args); fprintf (stderr, "\n"); + unlock (); errno = err; } @@ -88,6 +110,7 @@ nbdkit_debug (const char *fs, ...) if (!verbose) return; +...
2019 Jan 02
0
[PATCH nbdkit v2 2/2] include: Only use attribute((format)) on GCC or Clang.
...ar *msg, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern void nbdkit_verror (const char *msg, va_list args); -extern void nbdkit_debug (const char *msg, ...) - __attribute__((__format__ (__printf__, 1, 2))); +extern void nbdkit_debug (const char *msg, ...) ATTRIBUTE_FORMAT_PRINTF (1, 2); extern void nbdkit_vdebug (const char *msg, va_list args); extern char *nbdkit_absolute_path (const char *path); -- 2.19.2
2019 Dec 12
0
[PATCH nbdkit 4/7] server: Allow -D nbdkit.* debug flags for the core server.
...erver. */ + apply_debug_flags (NULL, "nbdkit"); + /* Check all debug flags were used, and free them. */ free_debug_flags (); diff --git a/server/nbdkit.syms b/server/nbdkit.syms index 390972e..96c22c0 100644 --- a/server/nbdkit.syms +++ b/server/nbdkit.syms @@ -67,6 +67,8 @@ nbdkit_vdebug; nbdkit_verror; + nbdkit_debug_*; + # Everything else is hidden. local: *; }; -- 2.23.0
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.
2018 Jan 23
3
[nbdkit PATCH 0/2] Miscellaneous patches
These are relatively independent enough from my ongoing work to add FUA support that I'll post them now. Eric Blake (2): todo: More items include: Properly decorate attributes in public headers TODO | 15 ++++++++++++++- include/nbdkit-common.h | 4 ++-- 2 files changed, 16 insertions(+), 3 deletions(-) -- 2.14.3
2020 Mar 23
0
[PATCH nbdkit 2/3] server: Inject API functions for Windows
...me not implemented on this platform"); + return -1; +} + +static void init_functions () +{ + functions = malloc (sizeof *functions); + if (functions == NULL) { + perror ("malloc"); + exit (EXIT_FAILURE); + } + functions->verror = nbdkit_verror; + functions->vdebug = nbdkit_vdebug; + functions->absolute_path = nbdkit_absolute_path; + functions->parse_size = nbdkit_parse_size; + functions->parse_bool = nbdkit_parse_bool; + functions->parse_int = nbdkit_parse_int; + functions->parse_unsigned = nbdkit_parse_unsigned; + functions->parse_int8_t = nbdkit_pa...
2020 Mar 25
0
Re: nbdkit / mingw support
...into the same library, although it's a bit awkward. The quit flag is still more awkward because you have to move a lot of quit pipe handling code into the library which has knock-on effects all over. Rich. ---------------------------------------------------------------------- server/debug.c:nbdkit_vdebug (const char *fs, va_list args) server/debug.c:nbdkit_debug (const char *fs, ...) server/extents.c:nbdkit_extents_new (uint64_t start, uint64_t end) server/extents.c:nbdkit_extents_free (struct nbdkit_extents *exts) server/extents.c:nbdkit_extents_count (const struct nbdkit_extents *exts) server/ext...
2018 Nov 29
6
[nbdkit PATCH 0/3] Fix %m usage on BSD
Our use of "%m" in various error messages is testament to the project's initial life on Linux - but other than Cygwin, I know of no other platforms supporting that glibc extension. We COULD audit the code and manually turn "%m" into "%s"/strerror(errno), but that's a lot of churn. Instead, let's fix the few outliers that can't be easily wrapped, then
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...nger > that the code would break on the rarely tested 32 bit platform. (Potentially) widening casts aren't a problem, although I do share your concern that 32-bit platforms are not tested as frequently. >>> +++ b/include/nbdkit-common.h >>> @@ -84,6 +84,28 @@ extern void nbdkit_vdebug (const char *msg, va_list args); >>> extern char *nbdkit_absolute_path (const char *path); >>> extern int64_t nbdkit_parse_size (const char *str); >>> extern int nbdkit_parse_bool (const char *str); >>> +extern int nbdkit_parse_int (const char *what, const cha...
2020 Apr 14
0
[nbdkit PATCH v2 1/3] server: Add nbdkit_stdio_safe
...nt nbdkit_nanosleep (unsigned sec, unsigned nsec); diff --git a/server/nbdkit.syms b/server/nbdkit.syms index 111223f2..20c390a9 100644 --- a/server/nbdkit.syms +++ b/server/nbdkit.syms @@ -65,6 +65,7 @@ nbdkit_realpath; nbdkit_set_error; nbdkit_shutdown; + nbdkit_stdio_safe; nbdkit_vdebug; nbdkit_verror; diff --git a/server/public.c b/server/public.c index 3fd11253..4bb1f2e0 100644 --- a/server/public.c +++ b/server/public.c @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2013-2019 Red Hat Inc. + * Copyright (C) 2013-2020 Red Hat Inc. * * Redistribution and use in source and...
2020 Mar 24
2
Re: nbdkit / mingw support
On 3/24/20 3:12 PM, Eric Blake wrote: >> (For non-mingw platforms) this breaks the source API promises rather >> seriously, so if I understand your proposal correctly I don't think >> this is a good idea.  It's possibly something we can consider for >> internal plugins, or for the V3 API. > > How does it break API to request that someone link against a
2020 Apr 04
0
[nbdkit PATCH 1/2] server: Add nbdkit_stdio_safe
...program_name); exit (EXIT_FAILURE); } diff --git a/server/nbdkit.syms b/server/nbdkit.syms index 111223f2..20c390a9 100644 --- a/server/nbdkit.syms +++ b/server/nbdkit.syms @@ -65,6 +65,7 @@ nbdkit_realpath; nbdkit_set_error; nbdkit_shutdown; + nbdkit_stdio_safe; nbdkit_vdebug; nbdkit_verror; diff --git a/server/public.c b/server/public.c index 3fd11253..f19791bc 100644 --- a/server/public.c +++ b/server/public.c @@ -1,5 +1,5 @@ /* nbdkit - * Copyright (C) 2013-2019 Red Hat Inc. + * Copyright (C) 2013-2020 Red Hat Inc. * * Redistribution and use in source and...
2020 Mar 26
9
[PATCH nbdkit 5/9 patch split 1/5] Create libnbdkit.so.
This is the previous 5/9 patch posted earlier today, split into reviewable chunks. This passes bisection with -x 'make && make check', but I didn't work very hard on the commit messages, so I refer you back to the original patch to explain how it works: https://www.redhat.com/archives/libguestfs/2020-March/msg00248.html Rich.
2018 Apr 12
4
[nbdkit PATCH v3 0/2] Add nbdkit_realpath
Hi, this is the v3 of my series for nbdkit_realpath; this series adds an extra documentation update to nbdkit_absolute_path, documenting when it can only be used, and then adds nbdkit_realpath. Thanks, Pino Toscano (2): docs: improve documentation of nbdkit_absolute_path plugin: add and use nbdkit_realpath docs/nbdkit-plugin.pod | 24 +++++++++++++++++++++++- include/nbdkit-common.h
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 5/5] server: Indirect slow path, non-self-contained functions through the server.
...nbdkit_parse_bool; nbdkit_parse_int16_t; nbdkit_parse_int32_t; @@ -58,8 +60,11 @@ nbdkit_parse_uint64_t; nbdkit_parse_uint8_t; nbdkit_parse_unsigned; + nbdkit_peer_name; nbdkit_read_password; nbdkit_realpath; + nbdkit_set_error; + nbdkit_shutdown; nbdkit_vdebug; nbdkit_verror; -- 2.25.0
2018 Feb 14
2
[nbdkit PATCH v2] plugin: add and use nbdkit_realpath
...urns C<NULL>. + +The returned string must be freed by the caller. + =head1 CALLBACKS =head2 C<.name> diff --git a/include/nbdkit-common.h b/include/nbdkit-common.h index 5e69579..693213f 100644 --- a/include/nbdkit-common.h +++ b/include/nbdkit-common.h @@ -60,6 +60,7 @@ extern void nbdkit_vdebug (const char *msg, va_list args); extern char *nbdkit_absolute_path (const char *path); extern int64_t nbdkit_parse_size (const char *str); extern int nbdkit_read_password (const char *value, char **password); +extern char *nbdkit_realpath (const char *path); #ifdef __cplusplus } diff --git a...
2018 Feb 13
3
[nbdkit PATCH] plugin: add and use nbdkit_realpath
...urns C<NULL>. + +The returned string must be freed by the caller. + =head1 CALLBACKS =head2 C<.name> diff --git a/include/nbdkit-common.h b/include/nbdkit-common.h index 5e69579..693213f 100644 --- a/include/nbdkit-common.h +++ b/include/nbdkit-common.h @@ -60,6 +60,7 @@ extern void nbdkit_vdebug (const char *msg, va_list args); extern char *nbdkit_absolute_path (const char *path); extern int64_t nbdkit_parse_size (const char *str); extern int nbdkit_read_password (const char *value, char **password); +extern char *nbdkit_realpath (const char *path); #ifdef __cplusplus } diff --git a...