aboutsummaryrefslogtreecommitdiff
path: root/coreutils/head.c
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-07-14 01:51:25 +0000
committerMatt Kraai <kraai@debian.org>2000-07-14 01:51:25 +0000
commitd537a95fdbc0b4a5f38edea8593b4c085fdd7fcb (patch)
tree62127f20fc07758e445d8c4e186306cbe83d77b1 /coreutils/head.c
parent4ac6cb534d78d63d7b0a206118c56bad7024b9f8 (diff)
downloadbusybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.gz
busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.tar.bz2
busybox-w32-d537a95fdbc0b4a5f38edea8593b4c085fdd7fcb.zip
Use errorMsg rather than fprintf.
Diffstat (limited to 'coreutils/head.c')
-rw-r--r--coreutils/head.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/coreutils/head.c b/coreutils/head.c
index f42f4837d..b82678dc2 100644
--- a/coreutils/head.c
+++ b/coreutils/head.c
@@ -75,7 +75,7 @@ int head_main(int argc, char **argv)
75 case 'h': 75 case 'h':
76 usage(head_usage); 76 usage(head_usage);
77 default: 77 default:
78 fprintf(stderr, "head: invalid option -- %c\n", opt); 78 errorMsg("invalid option -- %c\n", opt);
79 usage(head_usage); 79 usage(head_usage);
80 } 80 }
81 } else { 81 } else {
@@ -95,8 +95,7 @@ int head_main(int argc, char **argv)
95 95
96 src = fopen(argv[i], "r"); 96 src = fopen(argv[i], "r");
97 if (!src) { 97 if (!src) {
98 fprintf(stderr, "head: %s: %s\n", argv[i], 98 errorMsg("%s: %s\n", argv[i], strerror(errno));
99 strerror(errno));
100 } else { 99 } else {
101 /* emulating GNU behaviour */ 100 /* emulating GNU behaviour */
102 if (need_headers) { 101 if (need_headers) {
@@ -112,4 +111,4 @@ int head_main(int argc, char **argv)
112 return(0); 111 return(0);
113} 112}
114 113
115/* $Id: head.c,v 1.11 2000/06/19 17:25:39 andersen Exp $ */ 114/* $Id: head.c,v 1.12 2000/07/14 01:51:25 kraai Exp $ */