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:
Richard W.M. Jones
2021-03-22 14:56:10 +00:00
parent e282558581
commit e0a1106103

View File

@@ -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;