mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-21 22:53:37 +00:00
daemon: Don't return bogus failure from readdir.
This was returning "readdir: Invalid argument" which is actually impossible (readdir(3) cannot fail with EINVAL). It turns out that the problem is just errno from some other place leaking out.
This commit is contained in:
@@ -55,8 +55,7 @@ do_list_disk_labels (void)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
errno = 0;
|
||||
while ((d = readdir (dir)) != NULL) {
|
||||
while (errno = 0, (d = readdir (dir)) != NULL) {
|
||||
CLEANUP_FREE char *path = NULL;
|
||||
char *rawdev;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user