summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
Diffstat (limited to 'kexec')
-rw-r--r--kexec/arch/ppc64/fs2dt.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/kexec/arch/ppc64/fs2dt.c b/kexec/arch/ppc64/fs2dt.c
index 8e24f18..bdb6d5a 100644
--- a/kexec/arch/ppc64/fs2dt.c
+++ b/kexec/arch/ppc64/fs2dt.c
@@ -326,9 +326,12 @@ static void putnode(void)
dt++;
numlist = scandir(pathname, &namelist, 0, comparefunc);
- if (numlist == 0)
+ if (numlist < 0)
die("unrecoverable error: could not scan \"%s\": %s\n",
pathname, strerror(errno));
+ if (numlist == 0)
+ die("unrecoverable error: no directory entries in \"%s\"",
+ pathname);
basename = strrchr(pathname,'/');