search for: fail_stmt

Displaying 9 results from an estimated 9 matches for "fail_stmt".

2017 Apr 20
6
[PATCH 0/5] generator: daemon: Various simplifications to stubs code.
This is a series of simplifications to the stubs code. It's all refactoring, there is no functional change. Rich.
2012 Jul 21
5
[PATCH 1/5] mount: add a macro to resolve path or device
.../daemon/daemon.h +++ b/daemon/daemon.h @@ -336,6 +336,24 @@ is_zero (const char *buffer, size_t size) } \ } while (0) +/* Helper for functions which need either a root(/sysroot) path, + * OR a /dev/ device which exists. + */ +#define DUP_RESOLVE_DEVICE_OR_PATH(path,buf,cancel_stmt,fail_stmt) \ + do { \ + int is_dev; \ + is_dev = STREQLEN (path, "/dev/", 5); \ + buf = is_dev ? strdup (path)...
2012 Jul 23
3
[PATCH V2 1/4] mount: add a macro to resolve path or device
...45..f7d0c75 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -336,6 +336,22 @@ is_zero (const char *buffer, size_t size) } \ } while (0) +/* Same as REQUIRE_ROOT_OR_RESOLVE_DEVICE but this strdup's the result. */ +#define STRDUP_RESOLVE_DEVICE_OR_PATH(path,buf,cancel_stmt,fail_stmt) \ + do { \ + int is_dev; \ + is_dev = STREQLEN (path, "/dev/", 5); \ + buf = is_dev ? strdup (path)...
2013 Aug 24
67
[PATCH 00/67] Proposed patches for libguestfs 1.22.6.
In the kernel and qemu communities it is routine for patches that will be backported to stable branches to be posted for review. I'm proposing we do the same for libguestfs stable branches. All of the attached have been tested with 'make check-release'. Rich.
2009 Aug 12
23
[PATCH 0/23] factor and const-correctness
This started as a simple warning-elimination change. I'll get back to that series shortly ;-) It turned into a factorization and constification exercise during which I got a taste of ocaml. Thanks to Rich Jones for help with a few snippets in generator.ml. The overall result is that many previously-manually-maintained bits from daemon/*.c functions are now hoisted into the automatically-
2009 Nov 09
1
use STREQ(a,b), not strcmp(a,b) == 0
...rc/generator.ml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/daemon/daemon.h b/daemon/daemon.h index 3f4c480..1cdb480 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -164,7 +164,7 @@ extern void reply (xdrproc_t xdrp, char *ret); */ #define RESOLVE_DEVICE(path,fail_stmt) \ do { \ - if (strncmp ((path), "/dev/", 5) != 0) { \ + if (STRNEQLEN ((path), "/dev/", 5)) { \ reply_with_error ("%s: %s: expecting a device name", __func__, (path)); \ fail_stmt; \ } \ diff --git a/daemon/g...
2013 Jan 24
3
[REVIEW ONLY] Mountable patches
These 3 patches implement support for APIs which must accept a mountable, but don't update apis which must return mountables. Matt
2013 Feb 07
12
[PATCH 01/12] generator: Add new Mountable argument type
This type is initially identical to Device. --- generator/bindtests.ml | 2 +- generator/c.ml | 7 +++++-- generator/csharp.ml | 6 ++++-- generator/daemon.ml | 4 ++-- generator/erlang.ml | 6 +++--- generator/fish.ml | 8 ++++---- generator/gobject.ml | 11 ++++++----- generator/haskell.ml | 11 +++++++---- generator/java.ml | 10 +++++-----
2017 Jul 24
6
[PATCH 0/2] daemon: Replace GUESTFSD_EXT_CMD with --print-external-commands.
Replace GUESTFSD_EXT_CMD with a command line option ‘./guestfsd --print-external-commands’