aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai <kraai@debian.org>2000-12-18 03:08:29 +0000
committerMatt Kraai <kraai@debian.org>2000-12-18 03:08:29 +0000
commit0dab82997777bffb95d01d68e1628ee79207a03d (patch)
treecd56722ced55fd4b08049a0717cbbb9df5e9113f
parentbfa7967c4a18c9a7addbe853cf9f736ac34b4e5b (diff)
downloadbusybox-w32-0dab82997777bffb95d01d68e1628ee79207a03d.tar.gz
busybox-w32-0dab82997777bffb95d01d68e1628ee79207a03d.tar.bz2
busybox-w32-0dab82997777bffb95d01d68e1628ee79207a03d.zip
Add missing newlines to error messages.
-rw-r--r--coreutils/cut.c7
-rw-r--r--coreutils/touch.c4
-rw-r--r--cut.c7
-rw-r--r--lsmod.c8
-rw-r--r--modutils/lsmod.c8
-rw-r--r--networking/wget.c4
-rw-r--r--touch.c4
-rw-r--r--utility.c2
-rw-r--r--wget.c4
9 files changed, 25 insertions, 23 deletions
diff --git a/coreutils/cut.c b/coreutils/cut.c
index 6e0fe83fc..8b319962d 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -188,7 +188,7 @@ extern int cut_main(int argc, char **argv)
188 case 'f': 188 case 'f':
189 /* make sure they didn't ask for two types of lists */ 189 /* make sure they didn't ask for two types of lists */
190 if (part != 0) { 190 if (part != 0) {
191 error_msg_and_die("only one type of list may be specified"); 191 error_msg_and_die("only one type of list may be specified\n");
192 } 192 }
193 part = (char)opt; 193 part = (char)opt;
194 decompose_list(optarg); 194 decompose_list(optarg);
@@ -213,8 +213,9 @@ extern int cut_main(int argc, char **argv)
213 } 213 }
214 214
215 if (supress_non_delimited_lines && part != 'f') { 215 if (supress_non_delimited_lines && part != 'f') {
216 error_msg_and_die("suppressing non-delimited lines makes sense 216 error_msg_and_die("suppressing non-delimited lines makes sense"
217 only when operating on fields\n"); 217 " only when operating on fields\n");
218
218 } 219 }
219 220
220 if (delim != '\t' && part != 'f') { 221 if (delim != '\t' && part != 'f') {
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 59800b2a0..1b03075e8 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -58,12 +58,12 @@ extern int touch_main(int argc, char **argv)
58 if (create == FALSE && errno == ENOENT) 58 if (create == FALSE && errno == ENOENT)
59 return EXIT_SUCCESS; 59 return EXIT_SUCCESS;
60 else { 60 else {
61 error_msg_and_die("%s", strerror(errno)); 61 perror_msg_and_die("%s", *argv);
62 } 62 }
63 } 63 }
64 close(fd); 64 close(fd);
65 if (utime(*argv, NULL)) { 65 if (utime(*argv, NULL)) {
66 error_msg_and_die("%s", strerror(errno)); 66 perror_msg_and_die("%s", *argv);
67 } 67 }
68 argc--; 68 argc--;
69 argv++; 69 argv++;
diff --git a/cut.c b/cut.c
index 6e0fe83fc..8b319962d 100644
--- a/cut.c
+++ b/cut.c
@@ -188,7 +188,7 @@ extern int cut_main(int argc, char **argv)
188 case 'f': 188 case 'f':
189 /* make sure they didn't ask for two types of lists */ 189 /* make sure they didn't ask for two types of lists */
190 if (part != 0) { 190 if (part != 0) {
191 error_msg_and_die("only one type of list may be specified"); 191 error_msg_and_die("only one type of list may be specified\n");
192 } 192 }
193 part = (char)opt; 193 part = (char)opt;
194 decompose_list(optarg); 194 decompose_list(optarg);
@@ -213,8 +213,9 @@ extern int cut_main(int argc, char **argv)
213 } 213 }
214 214
215 if (supress_non_delimited_lines && part != 'f') { 215 if (supress_non_delimited_lines && part != 'f') {
216 error_msg_and_die("suppressing non-delimited lines makes sense 216 error_msg_and_die("suppressing non-delimited lines makes sense"
217 only when operating on fields\n"); 217 " only when operating on fields\n");
218
218 } 219 }
219 220
220 if (delim != '\t' && part != 'f') { 221 if (delim != '\t' && part != 'f') {
diff --git a/lsmod.c b/lsmod.c
index f957d2d00..4c50bf4bd 100644
--- a/lsmod.c
+++ b/lsmod.c
@@ -83,7 +83,7 @@ extern int lsmod_main(int argc, char **argv)
83 module_names = xmalloc(bufsize = 256); 83 module_names = xmalloc(bufsize = 256);
84 deps = xmalloc(bufsize); 84 deps = xmalloc(bufsize);
85 if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) { 85 if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) {
86 error_msg_and_die("QM_MODULES: %s\n", strerror(errno)); 86 perror_msg_and_die("QM_MODULES");
87 } 87 }
88 88
89 printf("Module Size Used by\n"); 89 printf("Module Size Used by\n");
@@ -94,7 +94,7 @@ extern int lsmod_main(int argc, char **argv)
94 continue; 94 continue;
95 } 95 }
96 /* else choke */ 96 /* else choke */
97 error_msg_and_die("module %s: QM_INFO: %s\n", mn, strerror(errno)); 97 perror_msg_and_die("module %s: QM_INFO", mn);
98 } 98 }
99 while (query_module(mn, QM_REFS, deps, bufsize, &count)) { 99 while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
100 if (errno == ENOENT) { 100 if (errno == ENOENT) {
@@ -102,7 +102,7 @@ extern int lsmod_main(int argc, char **argv)
102 continue; 102 continue;
103 } 103 }
104 if (errno != ENOSPC) { 104 if (errno != ENOSPC) {
105 error_msg_and_die("module %s: QM_REFS: %s", mn, strerror(errno)); 105 error_msg_and_die("module %s: QM_REFS", mn);
106 } 106 }
107 deps = xrealloc(deps, bufsize = count); 107 deps = xrealloc(deps, bufsize = count);
108 } 108 }
@@ -153,7 +153,7 @@ extern int lsmod_main(int argc, char **argv)
153 close(fd); 153 close(fd);
154 return 0; 154 return 0;
155 } 155 }
156 error_msg_and_die("/proc/modules: %s\n", strerror(errno)); 156 perror_msg_and_die("/proc/modules");
157 return 1; 157 return 1;
158} 158}
159 159
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index f957d2d00..4c50bf4bd 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -83,7 +83,7 @@ extern int lsmod_main(int argc, char **argv)
83 module_names = xmalloc(bufsize = 256); 83 module_names = xmalloc(bufsize = 256);
84 deps = xmalloc(bufsize); 84 deps = xmalloc(bufsize);
85 if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) { 85 if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) {
86 error_msg_and_die("QM_MODULES: %s\n", strerror(errno)); 86 perror_msg_and_die("QM_MODULES");
87 } 87 }
88 88
89 printf("Module Size Used by\n"); 89 printf("Module Size Used by\n");
@@ -94,7 +94,7 @@ extern int lsmod_main(int argc, char **argv)
94 continue; 94 continue;
95 } 95 }
96 /* else choke */ 96 /* else choke */
97 error_msg_and_die("module %s: QM_INFO: %s\n", mn, strerror(errno)); 97 perror_msg_and_die("module %s: QM_INFO", mn);
98 } 98 }
99 while (query_module(mn, QM_REFS, deps, bufsize, &count)) { 99 while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
100 if (errno == ENOENT) { 100 if (errno == ENOENT) {
@@ -102,7 +102,7 @@ extern int lsmod_main(int argc, char **argv)
102 continue; 102 continue;
103 } 103 }
104 if (errno != ENOSPC) { 104 if (errno != ENOSPC) {
105 error_msg_and_die("module %s: QM_REFS: %s", mn, strerror(errno)); 105 error_msg_and_die("module %s: QM_REFS", mn);
106 } 106 }
107 deps = xrealloc(deps, bufsize = count); 107 deps = xrealloc(deps, bufsize = count);
108 } 108 }
@@ -153,7 +153,7 @@ extern int lsmod_main(int argc, char **argv)
153 close(fd); 153 close(fd);
154 return 0; 154 return 0;
155 } 155 }
156 error_msg_and_die("/proc/modules: %s\n", strerror(errno)); 156 perror_msg_and_die("/proc/modules");
157 return 1; 157 return 1;
158} 158}
159 159
diff --git a/networking/wget.c b/networking/wget.c
index 50b9aeec7..dbc283698 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -159,7 +159,7 @@ int wget_main(int argc, char **argv)
159 */ 159 */
160 if (do_continue) { 160 if (do_continue) {
161 if (fstat(fileno(output), &sbuf) < 0) 161 if (fstat(fileno(output), &sbuf) < 0)
162 error_msg_and_die("fstat()"); 162 perror_msg_and_die("fstat()");
163 if (sbuf.st_size > 0) 163 if (sbuf.st_size > 0)
164 beg_range = sbuf.st_size; 164 beg_range = sbuf.st_size;
165 else 165 else
@@ -514,7 +514,7 @@ progressmeter(int flag)
514 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 514 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
515 * SUCH DAMAGE. 515 * SUCH DAMAGE.
516 * 516 *
517 * $Id: wget.c,v 1.13 2000/12/09 16:55:35 andersen Exp $ 517 * $Id: wget.c,v 1.14 2000/12/18 03:08:29 kraai Exp $
518 */ 518 */
519 519
520 520
diff --git a/touch.c b/touch.c
index 59800b2a0..1b03075e8 100644
--- a/touch.c
+++ b/touch.c
@@ -58,12 +58,12 @@ extern int touch_main(int argc, char **argv)
58 if (create == FALSE && errno == ENOENT) 58 if (create == FALSE && errno == ENOENT)
59 return EXIT_SUCCESS; 59 return EXIT_SUCCESS;
60 else { 60 else {
61 error_msg_and_die("%s", strerror(errno)); 61 perror_msg_and_die("%s", *argv);
62 } 62 }
63 } 63 }
64 close(fd); 64 close(fd);
65 if (utime(*argv, NULL)) { 65 if (utime(*argv, NULL)) {
66 error_msg_and_die("%s", strerror(errno)); 66 perror_msg_and_die("%s", *argv);
67 } 67 }
68 argc--; 68 argc--;
69 argv++; 69 argv++;
diff --git a/utility.c b/utility.c
index 4654daec4..9b805ae7d 100644
--- a/utility.c
+++ b/utility.c
@@ -1470,7 +1470,7 @@ extern char * xstrndup (const char *s, int n) {
1470 char *t; 1470 char *t;
1471 1471
1472 if (s == NULL) 1472 if (s == NULL)
1473 error_msg_and_die("xstrndup bug"); 1473 error_msg_and_die("xstrndup bug\n");
1474 1474
1475 t = xmalloc(n+1); 1475 t = xmalloc(n+1);
1476 strncpy(t,s,n); 1476 strncpy(t,s,n);
diff --git a/wget.c b/wget.c
index 50b9aeec7..dbc283698 100644
--- a/wget.c
+++ b/wget.c
@@ -159,7 +159,7 @@ int wget_main(int argc, char **argv)
159 */ 159 */
160 if (do_continue) { 160 if (do_continue) {
161 if (fstat(fileno(output), &sbuf) < 0) 161 if (fstat(fileno(output), &sbuf) < 0)
162 error_msg_and_die("fstat()"); 162 perror_msg_and_die("fstat()");
163 if (sbuf.st_size > 0) 163 if (sbuf.st_size > 0)
164 beg_range = sbuf.st_size; 164 beg_range = sbuf.st_size;
165 else 165 else
@@ -514,7 +514,7 @@ progressmeter(int flag)
514 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 514 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
515 * SUCH DAMAGE. 515 * SUCH DAMAGE.
516 * 516 *
517 * $Id: wget.c,v 1.13 2000/12/09 16:55:35 andersen Exp $ 517 * $Id: wget.c,v 1.14 2000/12/18 03:08:29 kraai Exp $
518 */ 518 */
519 519
520 520