summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Kraai2000-12-18 03:08:29 +0000
committerMatt Kraai2000-12-18 03:08:29 +0000
commit0dab82997777bffb95d01d68e1628ee79207a03d (patch)
treecd56722ced55fd4b08049a0717cbbb9df5e9113f
parentbfa7967c4a18c9a7addbe853cf9f736ac34b4e5b (diff)
downloadbusybox-0dab82997777bffb95d01d68e1628ee79207a03d.zip
busybox-0dab82997777bffb95d01d68e1628ee79207a03d.tar.gz
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 6e0fe83..8b31996 100644
--- a/coreutils/cut.c
+++ b/coreutils/cut.c
@@ -188,7 +188,7 @@ extern int cut_main(int argc, char **argv)
case 'f':
/* make sure they didn't ask for two types of lists */
if (part != 0) {
- error_msg_and_die("only one type of list may be specified");
+ error_msg_and_die("only one type of list may be specified\n");
}
part = (char)opt;
decompose_list(optarg);
@@ -213,8 +213,9 @@ extern int cut_main(int argc, char **argv)
}
if (supress_non_delimited_lines && part != 'f') {
- error_msg_and_die("suppressing non-delimited lines makes sense
- only when operating on fields\n");
+ error_msg_and_die("suppressing non-delimited lines makes sense"
+ " only when operating on fields\n");
+
}
if (delim != '\t' && part != 'f') {
diff --git a/coreutils/touch.c b/coreutils/touch.c
index 59800b2..1b03075 100644
--- a/coreutils/touch.c
+++ b/coreutils/touch.c
@@ -58,12 +58,12 @@ extern int touch_main(int argc, char **argv)
if (create == FALSE && errno == ENOENT)
return EXIT_SUCCESS;
else {
- error_msg_and_die("%s", strerror(errno));
+ perror_msg_and_die("%s", *argv);
}
}
close(fd);
if (utime(*argv, NULL)) {
- error_msg_and_die("%s", strerror(errno));
+ perror_msg_and_die("%s", *argv);
}
argc--;
argv++;
diff --git a/cut.c b/cut.c
index 6e0fe83..8b31996 100644
--- a/cut.c
+++ b/cut.c
@@ -188,7 +188,7 @@ extern int cut_main(int argc, char **argv)
case 'f':
/* make sure they didn't ask for two types of lists */
if (part != 0) {
- error_msg_and_die("only one type of list may be specified");
+ error_msg_and_die("only one type of list may be specified\n");
}
part = (char)opt;
decompose_list(optarg);
@@ -213,8 +213,9 @@ extern int cut_main(int argc, char **argv)
}
if (supress_non_delimited_lines && part != 'f') {
- error_msg_and_die("suppressing non-delimited lines makes sense
- only when operating on fields\n");
+ error_msg_and_die("suppressing non-delimited lines makes sense"
+ " only when operating on fields\n");
+
}
if (delim != '\t' && part != 'f') {
diff --git a/lsmod.c b/lsmod.c
index f957d2d..4c50bf4 100644
--- a/lsmod.c
+++ b/lsmod.c
@@ -83,7 +83,7 @@ extern int lsmod_main(int argc, char **argv)
module_names = xmalloc(bufsize = 256);
deps = xmalloc(bufsize);
if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) {
- error_msg_and_die("QM_MODULES: %s\n", strerror(errno));
+ perror_msg_and_die("QM_MODULES");
}
printf("Module Size Used by\n");
@@ -94,7 +94,7 @@ extern int lsmod_main(int argc, char **argv)
continue;
}
/* else choke */
- error_msg_and_die("module %s: QM_INFO: %s\n", mn, strerror(errno));
+ perror_msg_and_die("module %s: QM_INFO", mn);
}
while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
if (errno == ENOENT) {
@@ -102,7 +102,7 @@ extern int lsmod_main(int argc, char **argv)
continue;
}
if (errno != ENOSPC) {
- error_msg_and_die("module %s: QM_REFS: %s", mn, strerror(errno));
+ error_msg_and_die("module %s: QM_REFS", mn);
}
deps = xrealloc(deps, bufsize = count);
}
@@ -153,7 +153,7 @@ extern int lsmod_main(int argc, char **argv)
close(fd);
return 0;
}
- error_msg_and_die("/proc/modules: %s\n", strerror(errno));
+ perror_msg_and_die("/proc/modules");
return 1;
}
diff --git a/modutils/lsmod.c b/modutils/lsmod.c
index f957d2d..4c50bf4 100644
--- a/modutils/lsmod.c
+++ b/modutils/lsmod.c
@@ -83,7 +83,7 @@ extern int lsmod_main(int argc, char **argv)
module_names = xmalloc(bufsize = 256);
deps = xmalloc(bufsize);
if (query_module(NULL, QM_MODULES, module_names, bufsize, &nmod)) {
- error_msg_and_die("QM_MODULES: %s\n", strerror(errno));
+ perror_msg_and_die("QM_MODULES");
}
printf("Module Size Used by\n");
@@ -94,7 +94,7 @@ extern int lsmod_main(int argc, char **argv)
continue;
}
/* else choke */
- error_msg_and_die("module %s: QM_INFO: %s\n", mn, strerror(errno));
+ perror_msg_and_die("module %s: QM_INFO", mn);
}
while (query_module(mn, QM_REFS, deps, bufsize, &count)) {
if (errno == ENOENT) {
@@ -102,7 +102,7 @@ extern int lsmod_main(int argc, char **argv)
continue;
}
if (errno != ENOSPC) {
- error_msg_and_die("module %s: QM_REFS: %s", mn, strerror(errno));
+ error_msg_and_die("module %s: QM_REFS", mn);
}
deps = xrealloc(deps, bufsize = count);
}
@@ -153,7 +153,7 @@ extern int lsmod_main(int argc, char **argv)
close(fd);
return 0;
}
- error_msg_and_die("/proc/modules: %s\n", strerror(errno));
+ perror_msg_and_die("/proc/modules");
return 1;
}
diff --git a/networking/wget.c b/networking/wget.c
index 50b9aee..dbc2836 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -159,7 +159,7 @@ int wget_main(int argc, char **argv)
*/
if (do_continue) {
if (fstat(fileno(output), &sbuf) < 0)
- error_msg_and_die("fstat()");
+ perror_msg_and_die("fstat()");
if (sbuf.st_size > 0)
beg_range = sbuf.st_size;
else
@@ -514,7 +514,7 @@ progressmeter(int flag)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.13 2000/12/09 16:55:35 andersen Exp $
+ * $Id: wget.c,v 1.14 2000/12/18 03:08:29 kraai Exp $
*/
diff --git a/touch.c b/touch.c
index 59800b2..1b03075 100644
--- a/touch.c
+++ b/touch.c
@@ -58,12 +58,12 @@ extern int touch_main(int argc, char **argv)
if (create == FALSE && errno == ENOENT)
return EXIT_SUCCESS;
else {
- error_msg_and_die("%s", strerror(errno));
+ perror_msg_and_die("%s", *argv);
}
}
close(fd);
if (utime(*argv, NULL)) {
- error_msg_and_die("%s", strerror(errno));
+ perror_msg_and_die("%s", *argv);
}
argc--;
argv++;
diff --git a/utility.c b/utility.c
index 4654dae..9b805ae 100644
--- a/utility.c
+++ b/utility.c
@@ -1470,7 +1470,7 @@ extern char * xstrndup (const char *s, int n) {
char *t;
if (s == NULL)
- error_msg_and_die("xstrndup bug");
+ error_msg_and_die("xstrndup bug\n");
t = xmalloc(n+1);
strncpy(t,s,n);
diff --git a/wget.c b/wget.c
index 50b9aee..dbc2836 100644
--- a/wget.c
+++ b/wget.c
@@ -159,7 +159,7 @@ int wget_main(int argc, char **argv)
*/
if (do_continue) {
if (fstat(fileno(output), &sbuf) < 0)
- error_msg_and_die("fstat()");
+ perror_msg_and_die("fstat()");
if (sbuf.st_size > 0)
beg_range = sbuf.st_size;
else
@@ -514,7 +514,7 @@ progressmeter(int flag)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: wget.c,v 1.13 2000/12/09 16:55:35 andersen Exp $
+ * $Id: wget.c,v 1.14 2000/12/18 03:08:29 kraai Exp $
*/