aboutsummaryrefslogtreecommitdiff
path: root/toys/lsb
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-05 22:26:58 -0600
committerRob Landley <rob@landley.net>2016-01-05 22:26:58 -0600
commitd3a435e53c94ec25b4ae5fa2614f49ef8884e08a (patch)
tree12e38a4739bd1832040b7d7e3efd2e054351fbf0 /toys/lsb
parent8dfbf2efc89154fd74b34b5f4d8bf774dba63abf (diff)
downloadtoybox-d3a435e53c94ec25b4ae5fa2614f49ef8884e08a.tar.gz
Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable format
checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts.
Diffstat (limited to 'toys/lsb')
-rw-r--r--toys/lsb/killall.c2
-rw-r--r--toys/lsb/mknod.c2
-rw-r--r--toys/lsb/seq.c2
-rw-r--r--toys/lsb/umount.c2
4 files changed, 4 insertions, 4 deletions
diff --git a/toys/lsb/killall.c b/toys/lsb/killall.c
index 3b316ecc..2772b432 100644
--- a/toys/lsb/killall.c
+++ b/toys/lsb/killall.c
@@ -94,7 +94,7 @@ void killall_main(void)
if (TT.err[i]) {
toys.exitval = 1;
errno = TT.err[i];
- perror_msg("%s", TT.names[i]);
+ perror_msg_raw(TT.names[i]);
}
}
if (CFG_TOYBOX_FREE) free(TT.err);
diff --git a/toys/lsb/mknod.c b/toys/lsb/mknod.c
index 39073fad..1a467b01 100644
--- a/toys/lsb/mknod.c
+++ b/toys/lsb/mknod.c
@@ -54,5 +54,5 @@ void mknod_main(void)
if (-1 == lsm_set_create(TT.arg_context))
perror_exit("-Z '%s' failed", TT.arg_context);
if (mknod(*toys.optargs, mode|modes[type], makedev(major, minor)))
- perror_exit("%s", *toys.optargs);
+ perror_exit_raw(*toys.optargs);
}
diff --git a/toys/lsb/seq.c b/toys/lsb/seq.c
index f1ca0d00..c6204742 100644
--- a/toys/lsb/seq.c
+++ b/toys/lsb/seq.c
@@ -47,7 +47,7 @@ static void insanitize(char *f)
}
// The @ is a byte offset, not utf8 chars. Waiting for somebody to complain...
- if (*s || !found) error_exit("bad -f '%s'@%d", f, s-f+1);
+ if (*s || !found) error_exit("bad -f '%s'@%ld", f, s-f+1);
}
void seq_main(void)
diff --git a/toys/lsb/umount.c b/toys/lsb/umount.c
index c7998e41..e6994f19 100644
--- a/toys/lsb/umount.c
+++ b/toys/lsb/umount.c
@@ -101,7 +101,7 @@ static void do_umount(char *dir, char *dev, int flags)
}
}
- perror_msg("%s", dir);
+ perror_msg_raw(dir);
}
void umount_main(void)