git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
inspector: Fix inspector/Makefile.am
[libguestfs.git]
/
daemon
/
readdir.c
diff --git
a/daemon/readdir.c
b/daemon/readdir.c
index
e3851db
..
ab42dfd
100644
(file)
--- a/
daemon/readdir.c
+++ b/
daemon/readdir.c
@@
-28,7
+28,7
@@
#include "actions.h"
guestfs_int_dirent_list *
#include "actions.h"
guestfs_int_dirent_list *
-do_readdir (char *path)
+do_readdir (c
onst c
har *path)
{
guestfs_int_dirent_list *ret;
guestfs_int_dirent v;
{
guestfs_int_dirent_list *ret;
guestfs_int_dirent v;
@@
-36,9
+36,6
@@
do_readdir (char *path)
struct dirent *d;
int i;
struct dirent *d;
int i;
- NEED_ROOT (NULL);
- ABS_PATH (path, NULL);
-
ret = malloc (sizeof *ret);
if (ret == NULL) {
reply_with_perror ("malloc");
ret = malloc (sizeof *ret);
if (ret == NULL) {
reply_with_perror ("malloc");
@@
-63,7
+60,7
@@
do_readdir (char *path)
guestfs_int_dirent *p;
p = realloc (ret->guestfs_int_dirent_list_val,
guestfs_int_dirent *p;
p = realloc (ret->guestfs_int_dirent_list_val,
- sizeof (guestfs_int_dirent) * (i+1));
+
sizeof (guestfs_int_dirent) * (i+1));
v.name = strdup (d->d_name);
if (!p || !v.name) {
reply_with_perror ("allocate");
v.name = strdup (d->d_name);
if (!p || !v.name) {
reply_with_perror ("allocate");