scan_dir(): Print error reason if lstat() failed.
authorAndre Noll <maan@systemlinux.org>
Thu, 5 Jun 2008 16:56:58 +0000 (18:56 +0200)
committerAndre Noll <maan@systemlinux.org>
Thu, 5 Jun 2008 16:56:58 +0000 (18:56 +0200)
create.c

index 638ba19..5c243d8 100644 (file)
--- a/create.c
+++ b/create.c
@@ -143,8 +143,8 @@ static int scan_dir(char *dirname, uint64_t *parent_dir_num)
                if (!strcmp(entry->d_name, ".."))
                        continue;
                if (lstat(entry->d_name, &s) == -1) {
-                       WARNING_LOG("lstat error for %s/%s\n", dirname,
-                               entry->d_name);
+                       WARNING_LOG("lstat error for %s/%s (%s)\n",
+                               dirname, entry->d_name, strerror(errno));
                        continue;
                }
                m = s.st_mode;