summaryrefslogtreecommitdiff
path: root/coreutils
diff options
context:
space:
mode:
Diffstat (limited to 'coreutils')
-rw-r--r--coreutils/chroot.c6
-rw-r--r--coreutils/date.c10
-rw-r--r--coreutils/md5sum.c8
-rw-r--r--coreutils/pwd.c2
-rw-r--r--coreutils/touch.c4
-rw-r--r--coreutils/tr.c2
-rw-r--r--coreutils/uudecode.c4
-rw-r--r--coreutils/uuencode.c2
8 files changed, 18 insertions, 20 deletions
diff --git a/coreutils/chroot.c b/coreutils/chroot.c
index 1c64e08..95aed3d 100644
--- a/coreutils/chroot.c
+++ b/coreutils/chroot.c
@@ -47,8 +47,7 @@ int chroot_main(int argc, char **argv)
argv++;
if (chroot(*argv) || (chdir("/"))) {
- fatalError("chroot: cannot change root directory to %s: %s\n",
- *argv, strerror(errno));
+ fatalError("cannot change root directory to %s: %s\n", *argv, strerror(errno));
}
argc--;
@@ -62,8 +61,7 @@ int chroot_main(int argc, char **argv)
prog = "/bin/sh";
execlp(prog, prog, NULL);
}
- fatalError("chroot: cannot execute %s: %s\n",
- prog, strerror(errno));
+ fatalError("cannot execute %s: %s\n", prog, strerror(errno));
}
diff --git a/coreutils/date.c b/coreutils/date.c
index 9e8e3f3..bc6d131 100644
--- a/coreutils/date.c
+++ b/coreutils/date.c
@@ -66,7 +66,7 @@ struct tm *date_conv_time(struct tm *tm_time, const char *t_string)
&(tm_time->tm_min), &(tm_time->tm_year));
if (nr < 4 || nr > 5) {
- fatalError(invalid_date, "date", t_string);
+ fatalError(invalid_date, t_string);
}
/* correct for century - minor Y2K problem here? */
@@ -150,7 +150,7 @@ struct tm *date_conv_ftime(struct tm *tm_time, const char *t_string)
}
- fatalError(invalid_date, "date", t_string);
+ fatalError(invalid_date, t_string);
}
@@ -186,7 +186,7 @@ int date_main(int argc, char **argv)
case 'u':
utc = 1;
if (putenv("TZ=UTC0") != 0)
- fatalError(memory_exhausted, "date");
+ fatalError(memory_exhausted);
break;
case 'd':
use_arg = 1;
@@ -236,12 +236,12 @@ int date_main(int argc, char **argv)
/* Correct any day of week and day of year etc fields */
tm = mktime(&tm_time);
if (tm < 0)
- fatalError(invalid_date, "date", date_str);
+ fatalError(invalid_date, date_str);
/* if setting time, set it */
if (set_time) {
if (stime(&tm) < 0) {
- fatalError("date: can't set date.\n");
+ fatalError("can't set date.\n");
}
}
}
diff --git a/coreutils/md5sum.c b/coreutils/md5sum.c
index f4a8b99..e6f1c86 100644
--- a/coreutils/md5sum.c
+++ b/coreutils/md5sum.c
@@ -708,13 +708,13 @@ static int md5_file(const char *filename,
} else {
fp = fopen(filename, OPENOPTS(binary));
if (fp == NULL) {
- errorMsg("md5sum: %s: %s\n", filename, strerror(errno));
+ errorMsg("%s: %s\n", filename, strerror(errno));
return FALSE;
}
}
if (md5_stream(fp, md5_result)) {
- errorMsg("md5sum: %s: %s\n", filename, strerror(errno));
+ errorMsg("%s: %s\n", filename, strerror(errno));
if (fp != stdin)
fclose(fp);
@@ -722,7 +722,7 @@ static int md5_file(const char *filename,
}
if (fp != stdin && fclose(fp) == EOF) {
- errorMsg("md5sum: %s: %s\n", filename, strerror(errno));
+ errorMsg("%s: %s\n", filename, strerror(errno));
return FALSE;
}
@@ -746,7 +746,7 @@ static int md5_check(const char *checkfile_name)
} else {
checkfile_stream = fopen(checkfile_name, "r");
if (checkfile_stream == NULL) {
- errorMsg("md5sum: %s: %s\n", checkfile_name, strerror(errno));
+ errorMsg("%s: %s\n", checkfile_name, strerror(errno));
return FALSE;
}
}
diff --git a/coreutils/pwd.c b/coreutils/pwd.c
index 87553b3..f0c923b 100644
--- a/coreutils/pwd.c
+++ b/coreutils/pwd.c
@@ -31,7 +31,7 @@ extern int pwd_main(int argc, char **argv)
char buf[BUFSIZ + 1];
if (getcwd(buf, sizeof(buf)) == NULL)
- fatalError("pwd: %s\n", strerror(errno));
+ fatalError("%s\n", strerror(errno));
printf("%s\n", buf);
return(TRUE);
diff --git a/coreutils/touch.c b/coreutils/touch.c
index f52bb02..ac27542 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -70,12 +70,12 @@ extern int touch_main(int argc, char **argv)
if (create == FALSE && errno == ENOENT)
exit(TRUE);
else {
- fatalError("touch: %s", strerror(errno));
+ fatalError("%s", strerror(errno));
}
}
close(fd);
if (utime(*argv, NULL)) {
- fatalError("touch: %s", strerror(errno));
+ fatalError("%s", strerror(errno));
}
argc--;
argv++;
diff --git a/coreutils/tr.c b/coreutils/tr.c
index 5a8116d..293bbce 100644
--- a/coreutils/tr.c
+++ b/coreutils/tr.c
@@ -189,7 +189,7 @@ extern int tr_main(int argc, char **argv)
complement(input);
if (argv[index] != NULL) {
if (*argv[index] == '\0')
- fatalError("tr: STRING2 cannot be empty\n");
+ fatalError("STRING2 cannot be empty\n");
expand(argv[index], output);
map(input, output);
}
diff --git a/coreutils/uudecode.c b/coreutils/uudecode.c
index ac33762..12a71a5 100644
--- a/coreutils/uudecode.c
+++ b/coreutils/uudecode.c
@@ -286,7 +286,7 @@ static int decode (const char *inname,
&& (freopen (outname, "w", stdout) == NULL
|| chmod (outname, mode & (S_IRWXU | S_IRWXG | S_IRWXO))
)) {
- errorMsg("uudeoce %s: %s %s\n", outname, inname, strerror(errno)); /* */
+ errorMsg("%s: %s %s\n", outname, inname, strerror(errno)); /* */
return FALSE;
}
@@ -340,7 +340,7 @@ int uudecode_main (int argc,
if (decode (argv[optind], outname) != 0)
exit_status = FALSE;
} else {
- errorMsg("uudecode: %s: %s\n", argv[optind], strerror(errno));
+ errorMsg("%s: %s\n", argv[optind], strerror(errno));
exit_status = FALSE;
}
optind++;
diff --git a/coreutils/uuencode.c b/coreutils/uuencode.c
index e4fc1a0..e107a01 100644
--- a/coreutils/uuencode.c
+++ b/coreutils/uuencode.c
@@ -217,7 +217,7 @@ int uuencode_main (int argc,
case 2:
/* Optional first argument is input file. */
if (!freopen (argv[optind], "r", stdin) || fstat (fileno (stdin), &sb)) {
- errorMsg("uuencode: %s: %s\n", argv[optind], strerror(errno));
+ errorMsg("%s: %s\n", argv[optind], strerror(errno));
exit FALSE;
}
mode = sb.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO);