diff options
author | Rob Landley <rob@landley.net> | 2023-08-23 14:14:13 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2023-08-23 14:14:13 -0500 |
commit | 4376a74b614fbee7a581b1598e868a0464a0bf57 (patch) | |
tree | 34da9c9215a2f0009869d1d4c6d9fb39edc87fa1 /toys/posix | |
parent | ea57f2f2009db97a2acf190ff59cd58d88a9c5b0 (diff) | |
download | toybox-4376a74b614fbee7a581b1598e868a0464a0bf57.tar.gz |
Convert a few stray error_msg("%s", x) to error_msg_raw(x).
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/file.c | 4 | ||||
-rw-r--r-- | toys/posix/grep.c | 4 |
2 files changed, 4 insertions, 4 deletions
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; |