Removed the error count from sys_rstat() as this can easily happen with
links and can be regarded as an harmless error (maybe it should directly test for broken links, though). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9523 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -450,13 +450,10 @@ do_dir(int argc, char **argv)
|
|||||||
if (err == 0)
|
if (err == 0)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
err = sys_rstat(1, dirfd, dent->d_name, &st, 1);
|
err = sys_rstat(1, dirfd, dent->d_name, &st, 1);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
|
// may happen for unresolvable links
|
||||||
printf("stat failed for: %s (%Ld)\n", dent->d_name, dent->d_ino);
|
printf("stat failed for: %s (%Ld)\n", dent->d_name, dent->d_ino);
|
||||||
if (max_err-- <= 0)
|
|
||||||
break;
|
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -470,9 +467,9 @@ do_dir(int argc, char **argv)
|
|||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (err != 0) {
|
if (err != 0)
|
||||||
printf("readdir failed on: %s\n", dent->d_name);
|
printf("readdir failed on: %s\n", dent->d_name);
|
||||||
}
|
|
||||||
printf("%ld files in directory!\n",count);
|
printf("%ld files in directory!\n",count);
|
||||||
|
|
||||||
sys_closedir(1, dirfd);
|
sys_closedir(1, dirfd);
|
||||||
|
|||||||
Reference in New Issue
Block a user