search for: ebuf

Displaying 19 results from an estimated 19 matches for "ebuf".

Did you mean: buf
2019 Jul 02
1
[nbdkit PATCH] sh: Parse a larger number of error messages
...f69523c1..585bd32c 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -42,6 +42,7 @@ #include <poll.h> #include <sys/types.h> #include <sys/wait.h> +#include <ctype.h> #include <nbdkit-plugin.h> @@ -267,32 +268,36 @@ static void handle_script_error (char *ebuf, size_t len) { int err; - size_t skip; + size_t skip = 0; char *p; - if (strcmp (ebuf, "EPERM ") == 0) { + if (strncasecmp (ebuf, "EPERM", 5) == 0) { err = EPERM; - skip = 6; + skip = 5; } - else if (strcmp (ebuf, "EIO ") == 0) { + else if (...
2023 Aug 30
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...-130,6 +131,7 @@ debug_call (const char **argv) */ static int call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ + bool *pipe_full, /* set if wbuf not fully written */ string *rbuf, /* read from stdout */ string *ebuf, /* read from stderr */ const char **argv) /* script + parameters */ @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ r = write (pfds[0].fd, wbuf, wbuflen); if (r == -1) { if (errno == E...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...onst char **argv) > */ > static int > call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > + bool *pipe_full, /* set if wbuf not fully written */ > string *rbuf, /* read from stdout */ > string *ebuf, /* read from stderr */ > const char **argv) /* script + parameters */ > @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > r = write (pfds[0].fd, wbuf, wbuflen); > if (r == -1) { &gt...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...onst char **argv) > */ > static int > call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > + bool *pipe_full, /* set if wbuf not fully written */ > string *rbuf, /* read from stdout */ > string *ebuf, /* read from stderr */ > const char **argv) /* script + parameters */ > @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > r = write (pfds[0].fd, wbuf, wbuflen); > if (r == -1) { &gt...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...*/ > > static int > > call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > > + bool *pipe_full, /* set if wbuf not fully written */ > > string *rbuf, /* read from stdout */ > > string *ebuf, /* read from stderr */ > > const char **argv) /* script + parameters */ > > @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > > r = write (pfds[0].fd, wbuf, wbuflen); > >...
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...t; */ >> static int >> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ >> + bool *pipe_full, /* set if wbuf not fully written */ >> string *rbuf, /* read from stdout */ >> string *ebuf, /* read from stderr */ >> const char **argv) /* script + parameters */ >> @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ >> r = write (pfds[0].fd, wbuf, wbuflen); >> if...
2023 Aug 31
2
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...atic int > >> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >> + bool *pipe_full, /* set if wbuf not fully written */ > >> string *rbuf, /* read from stdout */ > >> string *ebuf, /* read from stderr */ > >> const char **argv) /* script + parameters */ > >> @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >> r = write (pfds[0].fd, wbuf, wbuflen); &gt...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...static int >>> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ >>> + bool *pipe_full, /* set if wbuf not fully written */ >>> string *rbuf, /* read from stdout */ >>> string *ebuf, /* read from stderr */ >>> const char **argv) /* script + parameters */ >>> @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ >>> r = write (pfds[0].fd, wbuf, wbuflen); >&g...
2020 May 19
1
[PATCH nbdkit] common/include: Add locale-safe ascii_strcasecmp and ascii_strncasecmp.
...lugins/sh/call.c +++ b/plugins/sh/call.c @@ -48,6 +48,7 @@ #include <nbdkit-plugin.h> #include "ascii-ctype.h" +#include "ascii-string.h" #include "cleanup.h" #include "utils.h" @@ -383,48 +384,48 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) } /* Recognize the errno values that match NBD protocol errors */ - if (strncasecmp (ebuf, "EPERM", 5) == 0) { + if (ascii_strncasecmp (ebuf, "EPERM", 5) == 0) { err = EPERM; skip = 5; } - else if (strncasecmp (ebuf, "EIO", 3) == 0)...
2020 May 19
1
[PATCH nbdkit] sh: Don't need to cast parameter of ascii_is* to (unsigned char).
...7d47e4b003bd84fec69. --- plugins/sh/call.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/sh/call.c b/plugins/sh/call.c index b2d4a794..741022b6 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -443,7 +443,7 @@ handle_script_error (const char *argv0, char *ebuf, size_t len) } if (skip && ebuf[skip]) { - if (!ascii_isspace ((unsigned char) ebuf[skip])) { + if (!ascii_isspace (ebuf[skip])) { /* Treat 'EINVALID' as EIO, not EINVAL */ err = EIO; skip = 0; @@ -451,7 +451,7 @@ handle_script_error (const char *a...
2023 Aug 31
0
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >>>> + bool *pipe_full, /* set if wbuf not fully written */ > >>>> string *rbuf, /* read from stdout */ > >>>> string *ebuf, /* read from stderr */ > >>>> const char **argv) /* script + parameters */ > >>>> @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >>>> r = write (pfds[0]...
2023 Aug 31
1
[nbdkit PATCH] sh: Allow pwrite to not consume all data
...t;>> call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >>> + bool *pipe_full, /* set if wbuf not fully written */ > >>> string *rbuf, /* read from stdout */ > >>> string *ebuf, /* read from stderr */ > >>> const char **argv) /* script + parameters */ > >>> @@ -275,15 +277,8 @@ call3 (const char *wbuf, size_t wbuflen, /* sent to stdin (can be NULL) */ > >>> r = write (pfds[0].fd, wbuf, w...
2006 Sep 12
1
openssh (OpenBSD) , bsdauth and tis authsrv
nuqneH, I've tried using TIS authsrv authentication via bsd auth and found it quite limited. The most important restriction it does not log ip and fqdn of the remote peer, nor the application name, to the authentication server. It does not matter much for TIS authsrv, but since other applications do provide such information, our authsrv version uses it for extra authentication restrictions.
2007 Sep 07
1
"bug" and patch: quadratic running time for strsplit(..., fixed=TRUE) (PR#9902)
...++ src/main/character.c (working copy) @@ -357,7 +357,7 @@ int i, j, len, tlen, ntok, slen; int extended_opt, cflags, fixed_opt, perl_opt; char *pt = NULL; - const char *buf, *split = "", *bufp, *laststart; + const char *buf, *split = "", *bufp, *laststart, *ebuf = NULL; regex_t reg; regmatch_t regmatch[1]; pcre *re_pcre = NULL; @@ -419,7 +419,8 @@ if(fixed_opt) { /* This is UTF-8 safe since it compares whole strings */ laststart = buf; - for(bufp = buf; bufp - buf < strlen(buf); bufp++) { + ebuf = buf + strlen(buf); + for(b...
2018 Sep 10
1
question on nbdkit sh plugin
...he script's stdin and read from the script's + * stdout and stderr. It returns the raw error code and does no error + * processing. + */ +static int +call3 (const char *wbuf, size_t wbuflen, /* sent to stdin */ + char **rbuf, size_t *rbuflen, /* read from stdout */ + char **ebuf, size_t *ebuflen, /* read from stderr */ + const char **argv) /* script + parameters */ +{ ... + + execvp (argv[0], (char **) argv); + perror (argv[0]); + _exit (EXIT_FAILURE); + } perror() is not async-safe, but since nbdkit may be multithreaded, calling a non-...
2019 Aug 23
1
[nbdkit PATCH 1/3] server: Add internal support for NBDKIT_FLAG_FAST_ZERO
...= EOPNOTSUPP; break; /* Other errno values that server/protocol.c treats specially */ case 9: err = EROFS; break; diff --git a/plugins/sh/call.c b/plugins/sh/call.c index b86e7c9c..ab43e5ea 100644 --- a/plugins/sh/call.c +++ b/plugins/sh/call.c @@ -347,7 +347,6 @@ handle_script_error (char *ebuf, size_t len) err = ESHUTDOWN; skip = 9; } - /* Necessary for .zero support */ else if (strncasecmp (ebuf, "ENOTSUP", 7) == 0) { err = ENOTSUP; skip = 7; -- 2.21.0
2013 Jul 15
0
Re: libvrtd-1.1.0 crashes when attempting to start some (but not all) LXC containers
...timized out> nttyFDs = 1 ttyFDs = 0x7fe458001790 i = <optimized out> logfile = 0x7fe458000ad0 "/var/log/libvirt/lxc/dwj-hfax-dev.log" logfd = -1 nveths = 0 veths = 0x0 handshakefds = {-1, -1} pos = -1 ebuf = "\000\000\000\000\344\177\000\000\020\000\000\000\000\000\000\000\376\377\377\377\377\377\377\377\000\000\000\000\000\000\000\000\377\377\377\377", '\000' <repeats 12 times>"\364, \377\377\377\377\377\377\377\220Y|u\344\177\000\000\034\313\376t\344\177\000\000\000\000...
2013 Jul 15
3
Re: libvrtd-1.1.0 crashes when attempting to start some (but not all) LXC containers
On Mon, Jul 15, 2013 at 3:18 AM, Michal Privoznik <mprivozn@redhat.com>wrote: > > Interesting. If you are still able to reproduce the crash, can you try to > get the line number within virSecurityManagerGenLabel where the crash > happened? I think it's the STREQ line (440 linenr). Question is whether > model or name is NULL. > > I'll try. I'm not sure why
2019 Aug 23
22
cross-project patches: Add NBD Fast Zero support
This is a cover letter to a series of patches being proposed in tandem to four different projects: - nbd: Document a new NBD_CMD_FLAG_FAST_ZERO command flag - qemu: Implement the flag for both clients and server - libnbd: Implement the flag for clients - nbdkit: Implement the flag for servers, including the nbd passthrough client If you want to test the patches together, I've pushed a