search for: einvalid

Displaying 2 results from an estimated 2 matches for "einvalid".

Did you mean: invalid
2020 May 19
1
[PATCH nbdkit] sh: Don't need to cast parameter of ascii_is* to (unsigned char).
...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 *argv0, char *ebuf, size_t len) else do skip++; - while (ascii_isspace ((unsigned char) ebuf[skip])); + while (ascii_isspace (ebuf[skip])); } whil...
2019 Jul 02
1
[nbdkit PATCH] sh: Parse a larger number of error messages
...) == 0) { err = ESHUTDOWN; - skip = 10; + skip = 9; } else { /* Default to EIO. */ @@ -300,6 +305,18 @@ handle_script_error (char *ebuf, size_t len) skip = 0; } + if (skip && ebuf[skip]) { + if (!isspace ((unsigned char) ebuf[skip])) { + /* Treat 'EINVALID' as EIO, not EINVAL */ + err = EIO; + skip = 0; + } + else + do + skip++; + while (isspace ((unsigned char) ebuf[skip])); + } + while (len > 0 && ebuf[len-1] == '\n') ebuf[--len] = '\0'; @@ -311,8 +328,8 @@ handle_script_erro...