#ifdef HAVE_AUGEAS
char *buf;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (root, return -1);
if (aug) {
int r;
int len;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
if (strcasecmp (csumtype, "crc") == 0)
char *err;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (file1, return -1);
ABS_PATH (file2, return -1);
int dev_ok, dev_pts_ok, proc_ok, selinux_ok, sys_ok;
/* We need a root filesystem mounted to do this. */
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
/* Conveniently, argv is already a NULL-terminated argv-style array
* of parameters, so we can pass it straight in to our internal
char *err;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (src, return -1);
ABS_PATH (dest, return -1);
if (strncmp ((path), "/dev/", 5) == 0) \
RESOLVE_DEVICE ((path), fail_stmt); \
else { \
- NEED_ROOT (fail_stmt); \
+ NEED_ROOT (return fail_stmt); \
ABS_PATH ((path),fail_stmt); \
} \
} while (0)
int r;
char *out, *err;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
r = command (&out, &err, "df", NULL);
if (r == -1) {
int r;
char *out, *err;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
r = command (&out, &err, "df", "-h", NULL);
if (r == -1) {
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
int r;
char *buf, *err;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
if (strcmp (path, "/") == 0) {
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
int r;
struct stat buf;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
{
char *r;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (template, return NULL);
CHROOT_IN;
char *out, *err;
char *buf;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
/* Make the path relative to /sysroot. */
{
int fd, r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
int fd;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
int alloc, size, r, max;
char *buf, *buf2;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
size_t len = 0;
ssize_t n;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
int r;
struct stat buf;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
{
int fd;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
if (size == 0)
struct stat statbuf;
char *r;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
FILE *fp;
char line[256];
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
if (strcmp (method, "gzip") == 0 || strcmp (method, "compress") == 0)
char *sysrootdir;
char str[PATH_MAX];
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (dir, return NULL);
sysrootdir = sysroot_path (dir);
int r;
glob_t buf;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (pattern, return NULL); /* Required so chroot can be used. */
/* glob(3) in glibc never calls chdir, so this seems to be safe: */
int r;
char **lines;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
/* Make the path relative to /sysroot. */
char *err;
char *buf;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (root, return -1);
if (asprintf_nowarn (&buf, "--root-directory=%R", root) == -1) {
int r;
char **lines;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
/* Make the path relative to /sysroot. */
int r;
char *out, *err;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
buf = sysroot_path (path);
int size = 0, alloc = 0;
size_t len;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
/* "zcat /sysroot/<path> | cpio --quiet -it", but path must be quoted. */
{
FILE *fp;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
if (max_events < 0) {
reply_with_error ("inotify_init: max_events < 0");
char *ret;
char link[PATH_MAX];
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
char *buf_linkname;
char *buf_target;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (linkname, return -1);
/* but target does not need to be absolute */
DIR *dir;
struct dirent *d;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
char *buf, *mp;
char *error;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (file, return -1);
/* We have to prefix /sysroot on both the filename and the mountpoint. */
{
int r;
- /* NEED_ROOT (-1); - we don't want this test for this call. */
+ /* NEED_ROOT (return -1); - we don't want this test for this call. */
ABS_PATH (path, return -1);
CHROOT_IN;
{
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
CHROOT_IN;
struct dirent *d;
int i;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
ret = malloc (sizeof *ret);
{
char *ret;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
char *err;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (file, return -1);
/* Make the path relative to /sysroot. */
char *err;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (dir, return -1);
/* Make the path relative to /sysroot. */
guestfs_int_stat *ret;
struct stat statbuf;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
guestfs_int_stat *ret;
struct stat statbuf;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
guestfs_int_statvfs *ret;
struct statvfs statbuf;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;
char *out, *err;
char **lines;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
buf = sysroot_path (path);
char *buf;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
buf = sysroot_path (path);
char *buf;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
buf = sysroot_path (path);
char *buf;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
buf = sysroot_path (path);
char *cmd;
char buf[GUESTFS_MAX_CHUNK_SIZE];
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (dir, return -1);
/* "tar -C /sysroot%s -cf - ." but we have to quote the dir. */
char *cmd;
char buf[GUESTFS_MAX_CHUNK_SIZE];
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (dir, return -1);
/* "tar -C /sysroot%s -zcf - ." but we have to quote the dir. */
char *out, *err;
int r;
- NEED_ROOT (-1);
+ NEED_ROOT (return -1);
ABS_PATH (path, return -1);
/* Make the path relative to /sysroot. */
int i, j;
guestfs_int_xattr_list *r = NULL;
- NEED_ROOT (NULL);
+ NEED_ROOT (return NULL);
ABS_PATH (path, return NULL);
CHROOT_IN;