diff options
author | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-08-11 12:45:00 +0100 |
---|---|---|
committer | Dimitri John Ledkov <xnox@ubuntu.com> | 2016-08-11 12:45:00 +0100 |
commit | ffd998be34a1a3d208106d051e85058ff9ac9667 (patch) | |
tree | 3f93a4a7362dcbdbadf5086e9404dc58ea22200a /cmds-fi-du.c | |
parent | 3d69435ee3292b4b1db2d61c4784789d75883821 (diff) |
Imported Upstream version 4.7
Diffstat (limited to 'cmds-fi-du.c')
-rw-r--r-- | cmds-fi-du.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/cmds-fi-du.c b/cmds-fi-du.c index 12855a51..ec8e550f 100644 --- a/cmds-fi-du.c +++ b/cmds-fi-du.c @@ -389,8 +389,14 @@ static int du_walk_dir(struct du_dir_ctxt *ctxt, struct rb_root *shared_extents) dirfd(dirstream), shared_extents, &tot, &shr, 0); - if (ret) + if (ret == -ENOTTY) { + continue; + } else if (ret) { + fprintf(stderr, + "failed to walk dir/file: %s :%s\n", + entry->d_name, strerror(-ret)); break; + } ctxt->bytes_total += tot; ctxt->bytes_shared += shr; @@ -537,7 +543,6 @@ int cmd_filesystem_du(int argc, char **argv) unit_mode = get_unit_mode_from_arg(&argc, argv, 1); - optind = 1; while (1) { static const struct option long_options[] = { { "summarize", no_argument, NULL, 's'}, |