Displaying 7 results from an estimated 7 matches for "parse_common_tail".
2020 Mar 26
0
[PATCH nbdkit 5/9 patch split 2/5] lib: Move code for parsing, passwords and paths into libnbdkit.so.
...- nbdkit_error ("cannot resolve a null or empty path");
- return NULL;
- }
-
- ret = realpath (path, NULL);
- if (ret == NULL) {
- nbdkit_error ("realpath: %s: %m", path);
- return NULL;
- }
-
- return ret;
-}
-
-/* Common code for parsing integers. */
-#define PARSE_COMMON_TAIL \
- if (errno != 0) { \
- nbdkit_error ("%s: could not parse number: \"%s\": %m", \
- what, str); \
- r...
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...<limits.h>
> +#include <ctype.h>
> #include <termios.h>
> #include <errno.h>
> #include <poll.h>
> @@ -108,6 +109,223 @@ nbdkit_realpath (const char *path)
> return ret;
> }
>
> +/* Common code for parsing integers. */
> +#define PARSE_COMMON_TAIL \
> + if (errno != 0) { \
> + nbdkit_error ("%s: could not parse number: \"%s\": %m", \
> + what, str);...
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...;string.h>
#include <unistd.h>
#include <limits.h>
+#include <ctype.h>
#include <termios.h>
#include <errno.h>
#include <poll.h>
@@ -108,6 +109,223 @@ nbdkit_realpath (const char *path)
return ret;
}
+/* Common code for parsing integers. */
+#define PARSE_COMMON_TAIL \
+ if (errno != 0) { \
+ nbdkit_error ("%s: could not parse number: \"%s\": %m", \
+ what, str); \
+ r...
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.
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...str, int *rp)
> > +{
> > + long r;
> > + char *end;
> > +
> > + errno = 0;
> > + r = strtol (str, &end, 0);
> > +#if INT_MAX != LONG_MAX
> > + if (r < INT_MIN || r > INT_MAX)
> > + errno = ERANGE;
> > +#endif
> > + PARSE_COMMON_TAIL;
> > +}
>
> Looks correct.
I actually compiled this and ran the tests with -m32 and -m64. It
took several rounds to get it right.
> > +#endif
> > + if (r < SSIZE_MIN || r > SSIZE_MAX)
> > + errno = ERANGE;
> > +#endif
> > + PARSE_COMMON_TAIL;...
2019 Sep 23
2
[PATCH nbdkit v2] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...;string.h>
#include <unistd.h>
#include <limits.h>
+#include <ctype.h>
#include <termios.h>
#include <errno.h>
#include <poll.h>
@@ -108,6 +109,191 @@ nbdkit_realpath (const char *path)
return ret;
}
+/* Common code for parsing integers. */
+#define PARSE_COMMON_TAIL \
+ if (errno != 0) { \
+ nbdkit_error ("%s: could not parse number: \"%s\": %m", \
+ what, str); \
+ r...
2020 Mar 26
15
[PATCH nbdkit 0/9] Create libnbdkit.so
This creates libnbdkit.so as discussed in the following thread:
https://www.redhat.com/archives/libguestfs/2020-March/thread.html#00203
test-delay-shutdown.sh fails for unclear reasons.
This series starts by reverting "tests: Don't strand hung nbdkit
processes" which is because several other tests fail randomly unless I
revert this patch. I didn't investigate this yet so it