diff options
author | Rob Landley <rob@landley.net> | 2015-03-01 15:58:40 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-03-01 15:58:40 -0600 |
commit | 70a84a356b1c56743618362867b9300007d11998 (patch) | |
tree | 2db214da036464cd76a2accb1191e3a9cdc1fc26 | |
parent | 7c3c6a9639ee41fb750f78d87dc8a6cbe4e421a5 (diff) | |
download | toybox-70a84a356b1c56743618362867b9300007d11998.tar.gz |
Patches from Elliott Hughes to add missing arguments to error_exit() calls.
-rw-r--r-- | lib/xwrap.c | 2 | ||||
-rw-r--r-- | toys/lsb/mount.c | 3 | ||||
-rw-r--r-- | toys/other/sysctl.c | 2 | ||||
-rw-r--r-- | toys/posix/ln.c | 2 |
4 files changed, 5 insertions, 4 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c index 0a2b38ff..14703a72 100644 --- a/lib/xwrap.c +++ b/lib/xwrap.c @@ -24,7 +24,7 @@ void xstrncat(char *dest, char *src, size_t size) long len = strlen(src); if (len+strlen(dest)+1 > size) - error_exit("'%s%s' > %ld bytes", src, (long)size); + error_exit("'%s%s' > %ld bytes", dest, src, (long)size); strcpy(dest+len, src); } diff --git a/toys/lsb/mount.c b/toys/lsb/mount.c index c334681c..4d6679d1 100644 --- a/toys/lsb/mount.c +++ b/toys/lsb/mount.c @@ -144,7 +144,8 @@ static void mount_filesystem(char *dev, char *dir, char *type, if (getuid()) { if (TT.okuser) TT.okuser = 0; else { - error_msg("'%s' not user mountable in fstab"); + error_msg("'%s' not user mountable in fstab", dev); + return; } } diff --git a/toys/other/sysctl.c b/toys/other/sysctl.c index 8e57ca1d..d3c4d81d 100644 --- a/toys/other/sysctl.c +++ b/toys/other/sysctl.c @@ -97,7 +97,7 @@ static void process_key(char *key, char *value) if (!value) value = split_key(key); if ((toys.optflags & FLAG_w) && !value) { - error_msg("'%s' not key=value"); + error_msg("'%s' not key=value", key); return; } diff --git a/toys/posix/ln.c b/toys/posix/ln.c index 04b4f292..06700dd0 100644 --- a/toys/posix/ln.c +++ b/toys/posix/ln.c @@ -40,7 +40,7 @@ void ln_main(void) if (((toys.optflags&FLAG_n) ? lstat : stat)(dest, &buf) || !S_ISDIR(buf.st_mode)) { - if (toys.optc>1) error_exit("'%s' not a directory"); + if (toys.optc>1) error_exit("'%s' not a directory", dest); buf.st_mode = 0; } |