X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=daemon%2Fdaemon.h;h=489c38d4bd6636199bb2d641eef2b1c91ec639b1;hb=d469db9398942723d2e2ae27989de63bce9cff8d;hp=b4f99a81a1d8a4a94cca1b778aa1d7465d61e55f;hpb=ffc01285ee4289da90983a3320873f27b3d31c4d;p=libguestfs.git diff --git a/daemon/daemon.h b/daemon/daemon.h index b4f99a8..489c38d 100644 --- a/daemon/daemon.h +++ b/daemon/daemon.h @@ -134,6 +134,9 @@ extern int e2prog (char *name); /* Massive hack for RHEL 5. */ /*-- in lvm.c --*/ extern int lv_canonical (const char *device, char **ret); +/*-- in lvm-filter.c --*/ +extern void copy_lvm (void); + /*-- in proto.c --*/ extern void main_loop (int sock) __attribute__((noreturn)); @@ -209,6 +212,18 @@ is_zero (const char *buffer, size_t size) return 1; } +/* Helper for building up short lists of arguments. Your code has to + * define MAX_ARGS to a suitable value. + */ +#define ADD_ARG(argv,i,v) \ + do { \ + if ((i) >= MAX_ARGS) { \ + fprintf (stderr, "%s: %d: internal error: exceeded MAX_ARGS (%zu) when constructing the command line\n", __FILE__, __LINE__, (size_t) MAX_ARGS); \ + abort (); \ + } \ + (argv)[(i)++] = (v); \ + } while (0) + /* Helper for functions that need a root filesystem mounted. * NB. Cannot be used for FileIn functions. */