mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
update all NEED_ROOT uses
run this command:
git grep -l -w NEED_ROOT|xargs perl -pi -e \
's/(NEED_ROOT) \((.*?)\)/$1 (return $2)/'
This commit is contained in:
@@ -37,7 +37,7 @@ do_stat (char *path)
|
||||
guestfs_int_stat *ret;
|
||||
struct stat statbuf;
|
||||
|
||||
NEED_ROOT (NULL);
|
||||
NEED_ROOT (return NULL);
|
||||
ABS_PATH (path, return NULL);
|
||||
|
||||
CHROOT_IN;
|
||||
@@ -79,7 +79,7 @@ do_lstat (char *path)
|
||||
guestfs_int_stat *ret;
|
||||
struct stat statbuf;
|
||||
|
||||
NEED_ROOT (NULL);
|
||||
NEED_ROOT (return NULL);
|
||||
ABS_PATH (path, return NULL);
|
||||
|
||||
CHROOT_IN;
|
||||
@@ -121,7 +121,7 @@ do_statvfs (char *path)
|
||||
guestfs_int_statvfs *ret;
|
||||
struct statvfs statbuf;
|
||||
|
||||
NEED_ROOT (NULL);
|
||||
NEED_ROOT (return NULL);
|
||||
ABS_PATH (path, return NULL);
|
||||
|
||||
CHROOT_IN;
|
||||
|
||||
Reference in New Issue
Block a user