diff options
Diffstat (limited to 'toys')
-rw-r--r-- | toys/lsb/gzip.c | 2 | ||||
-rw-r--r-- | toys/other/readelf.c | 4 | ||||
-rw-r--r-- | toys/other/readlink.c | 2 | ||||
-rw-r--r-- | toys/other/setfattr.c | 2 | ||||
-rw-r--r-- | toys/posix/file.c | 4 | ||||
-rw-r--r-- | toys/posix/grep.c | 4 |
6 files changed, 9 insertions, 9 deletions
diff --git a/toys/lsb/gzip.c b/toys/lsb/gzip.c index b80e24fe..e884dbaf 100644 --- a/toys/lsb/gzip.c +++ b/toys/lsb/gzip.c @@ -129,7 +129,7 @@ static void do_gzip(int ifd, char *in) // Are we reading file.gz to write to file? if (!ofd) { - if (fstat(ifd, &sb)) return perror_msg("%s", in); + if (fstat(ifd, &sb)) return perror_msg_raw(in); // Add or remove .gz suffix as necessary if (!FLAG(d)) out = xmprintf("%s%s", in, ".gz"); diff --git a/toys/other/readelf.c b/toys/other/readelf.c index 54e6e22c..72c38191 100644 --- a/toys/other/readelf.c +++ b/toys/other/readelf.c @@ -650,9 +650,9 @@ void readelf_main(void) int fd = open(TT.f = *arg, O_RDONLY); struct stat sb; - if (fd == -1) perror_msg("%s", TT.f); + if (fd == -1) perror_msg_raw(TT.f); else { - if (fstat(fd, &sb)) perror_msg("%s", TT.f); + if (fstat(fd, &sb)) perror_msg_raw(TT.f); else if (!sb.st_size) error_msg("%s: empty", TT.f); else if (!S_ISREG(sb.st_mode)) error_msg("%s: not a regular file",TT.f); else { diff --git a/toys/other/readlink.c b/toys/other/readlink.c index 2acdd558..7724b336 100644 --- a/toys/other/readlink.c +++ b/toys/other/readlink.c @@ -60,7 +60,7 @@ static char *resolve(char *arg) if (FLAG(s)) flags |= ABS_KEEP; else if (FLAG(L)) arg = dd = xabspath(arg, ABS_KEEP); - if (!(s = xabspath(arg, flags)) && !FLAG(q)) perror_msg("%s", arg); + if (!(s = xabspath(arg, flags)) && !FLAG(q)) perror_msg_raw(arg); free(dd); // Trim off this prefix if path under here diff --git a/toys/other/setfattr.c b/toys/other/setfattr.c index 48817aa2..0aea225a 100644 --- a/toys/other/setfattr.c +++ b/toys/other/setfattr.c @@ -36,6 +36,6 @@ void setfattr_main(void) if (TT.x) rc = (h?lremovexattr:removexattr)(*s, TT.x); else rc = (h?lsetxattr:setxattr)(*s, TT.n, TT.v, TT.v?strlen(TT.v):0, 0); - if (rc) perror_msg("%s", *s); + if (rc) perror_msg_raw(*s); } } diff --git a/toys/posix/file.c b/toys/posix/file.c index e48a5472..9428ecf4 100644 --- a/toys/posix/file.c +++ b/toys/posix/file.c @@ -210,7 +210,7 @@ static void do_regular_file(int fd, char *name) // zero through elf shnum, just in case memset(s, 0, 80); - if ((len = readall(fd, s, sizeof(toybuf)-8))<0) perror_msg("%s", name); + if ((len = readall(fd, s, sizeof(toybuf)-8))<0) perror_msg_raw(name); if (!len) xputs("empty"); // 45 bytes: https://www.muppetlabs.com/~breadbox/software/tiny/teensy.html @@ -399,7 +399,7 @@ static void do_regular_file(int fd, char *name) } else { if (lseek(fd, ver_off - len + 0x200, SEEK_CUR)<0 || (len = readall(fd, s, sizeof(toybuf)))<0) - return perror_msg("%s", name); + return perror_msg_raw(name); } xprintf(", version %s\n", s); return; diff --git a/toys/posix/grep.c b/toys/posix/grep.c index 2f3c999d..c3734ced 100644 --- a/toys/posix/grep.c +++ b/toys/posix/grep.c @@ -136,7 +136,7 @@ static void do_grep(int fd, char *name) if (bin && FLAG(I)) return; } - if (!(file = fdopen(fd, "r"))) return perror_msg("%s", name); + if (!(file = fdopen(fd, "r"))) return perror_msg_raw(name); // Loop through lines of input for (;;) { @@ -150,7 +150,7 @@ static void do_grep(int fd, char *name) lcount++; errno = 0; ulen = len = getdelim(&line, &ulen, TT.delim, file); - if (len == -1 && errno) perror_msg("%s", name); + if (len == -1 && errno) perror_msg_raw(name); if (len<1) break; if (line[ulen-1] == TT.delim) line[--ulen] = 0; |