OSDN Git Service

Patches from Elliott Hughes to add missing arguments to error_exit() calls.
authorRob Landley <rob@landley.net>
Sun, 1 Mar 2015 21:58:40 +0000 (15:58 -0600)
committerRob Landley <rob@landley.net>
Sun, 1 Mar 2015 21:58:40 +0000 (15:58 -0600)
lib/xwrap.c
toys/lsb/mount.c
toys/other/sysctl.c
toys/posix/ln.c

index 0a2b38f..14703a7 100644 (file)
@@ -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);
 }
 
index c334681..4d6679d 100644 (file)
@@ -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;
     }
   }
index 8e57ca1..d3c4d81 100644 (file)
@@ -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;
   }
index 04b4f29..06700dd 100644 (file)
@@ -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;
   }