summaryrefslogtreecommitdiff
path: root/src/rm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rm.c')
-rw-r--r--src/rm.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/rm.c b/src/rm.c
index 5baea153..c1a23d5f 100644
--- a/src/rm.c
+++ b/src/rm.c
@@ -1,5 +1,5 @@
/* 'rm' file deletion utility for GNU.
- Copyright (C) 1988-2014 Free Software Foundation, Inc.
+ Copyright (C) 1988-2015 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -132,7 +132,7 @@ usage (int status)
emit_try_help ();
else
{
- printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
+ printf (_("Usage: %s [OPTION]... [FILE]...\n"), program_name);
fputs (_("\
Remove (unlink) the FILE(s).\n\
\n\
@@ -180,7 +180,7 @@ Note that if you use rm to remove a file, it might be possible to recover\n\
some of its contents, given sufficient expertise and/or time. For greater\n\
assurance that the contents are truly unrecoverable, consider using shred.\n\
"), stdout);
- emit_ancillary_info ();
+ emit_ancillary_info (PROGRAM_NAME);
}
exit (status);
}
@@ -315,7 +315,7 @@ main (int argc, char **argv)
if (argc <= optind)
{
if (x.ignore_missing_files)
- exit (EXIT_SUCCESS);
+ return EXIT_SUCCESS;
else
{
error (0, 0, _("missing operand"));
@@ -332,25 +332,25 @@ main (int argc, char **argv)
quote ("/"));
}
- size_t n_files = argc - optind;
+ uintmax_t n_files = argc - optind;
char **file = argv + optind;
if (prompt_once && (x.recursive || 3 < n_files))
{
fprintf (stderr,
(x.recursive
- ? ngettext ("%s: remove %zu argument recursively? ",
- "%s: remove %zu arguments recursively? ",
+ ? ngettext ("%s: remove %"PRIuMAX" argument recursively? ",
+ "%s: remove %"PRIuMAX" arguments recursively? ",
select_plural (n_files))
- : ngettext ("%s: remove %zu argument? ",
- "%s: remove %zu arguments? ",
+ : ngettext ("%s: remove %"PRIuMAX" argument? ",
+ "%s: remove %"PRIuMAX" arguments? ",
select_plural (n_files))),
program_name, n_files);
if (!yesno ())
- exit (EXIT_SUCCESS);
+ return EXIT_SUCCESS;
}
enum RM_status status = rm (file, &x);
assert (VALID_STATUS (status));
- exit (status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS);
+ return status == RM_ERROR ? EXIT_FAILURE : EXIT_SUCCESS;
}