summaryrefslogtreecommitdiff
path: root/src/du.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/du.c')
-rw-r--r--src/du.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/du.c b/src/du.c
index 45339fefb..ab6190966 100644
--- a/src/du.c
+++ b/src/du.c
@@ -31,6 +31,7 @@
#include "argmatch.h"
#include "argv-iter.h"
#include "di-set.h"
+#include "die.h"
#include "error.h"
#include "exclude.h"
#include "fprintftime.h"
@@ -845,7 +846,7 @@ main (int argc, char **argv)
if (opt_threshold == 0 && *optarg == '-')
{
/* Do not allow -0, as this wouldn't make sense anyway. */
- error (EXIT_FAILURE, 0, _("invalid --threshold argument '-0'"));
+ die (EXIT_FAILURE, 0, _("invalid --threshold argument '-0'"));
}
}
break;
@@ -1022,8 +1023,8 @@ main (int argc, char **argv)
}
if (! (STREQ (files_from, "-") || freopen (files_from, "r", stdin)))
- error (EXIT_FAILURE, errno, _("cannot open %s for reading"),
- quoteaf (files_from));
+ die (EXIT_FAILURE, errno, _("cannot open %s for reading"),
+ quoteaf (files_from));
ai = argv_iter_init_stream (stdin);
@@ -1130,7 +1131,7 @@ main (int argc, char **argv)
di_set_free (di_mnt);
if (files_from && (ferror (stdin) || fclose (stdin) != 0) && ok)
- error (EXIT_FAILURE, 0, _("error reading %s"), quoteaf (files_from));
+ die (EXIT_FAILURE, 0, _("error reading %s"), quoteaf (files_from));
if (print_grand_total)
print_size (&tot_dui, _("total"));