Skip to content

Commit

Permalink
reintroduced "skip when unable to stat" feature for Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
rolinh committed Oct 3, 2013
1 parent 3352577 commit 7313de5
Showing 1 changed file with 5 additions and 17 deletions.
22 changes: 5 additions & 17 deletions src/dfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -504,23 +504,11 @@ fetch_info(struct list *lst)
while ((entbuf = getmntent(mtab)) != NULL) {
/* get infos from statvfs */
if (statvfs(entbuf->mnt_dir, &vfsbuf) == -1) {
/*
* show warning when permission denied or when it
* cannot be stated because of connexion problem for a
* remote file system
*/
if (errno == EACCES || errno == ENOTCONN) {
(void)fprintf(stderr, _("WARNING: %s was skipped "
"because it could not be stated"),
entbuf->mnt_dir);
perror(" ");
} else {
(void)fprintf(stderr, "Error while stating %s",
entbuf->mnt_dir);
perror(" ");
exit(EXIT_FAILURE);
/* NOTREACHED */
}
/* display a warning when a FS cannot be stated */
(void)fprintf(stderr, _("WARNING: %s was skipped "
"because it could not be stated"),
entbuf->mnt_dir);
perror(" ");
} else {
#else /* BSD */
if ((nummnt = getmntinfo(&entbuf, MNT_NOWAIT)) <= 0)
Expand Down

0 comments on commit 7313de5

Please sign in to comment.