diff options
author | Rob Landley <rob@landley.net> | 2016-01-05 22:26:58 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-01-05 22:26:58 -0600 |
commit | d3a435e53c94ec25b4ae5fa2614f49ef8884e08a (patch) | |
tree | 12e38a4739bd1832040b7d7e3efd2e054351fbf0 /toys/other/shred.c | |
parent | 8dfbf2efc89154fd74b34b5f4d8bf774dba63abf (diff) | |
download | toybox-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/other/shred.c')
-rw-r--r-- | toys/other/shred.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toys/other/shred.c b/toys/other/shred.c index 64db5edf..5b018ea0 100644 --- a/toys/other/shred.c +++ b/toys/other/shred.c @@ -57,7 +57,7 @@ void shred_main(void) fd = open(*try, O_RDWR); } if (fd == -1) { - perror_msg("%s", *try); + perror_msg_raw(*try); continue; } @@ -84,7 +84,7 @@ void shred_main(void) if (pos < TT.offset) { if (TT.offset != lseek(fd, TT.offset, SEEK_SET)) { - perror_msg("%s", *try); + perror_msg_raw(*try); break; } pos = TT.offset; @@ -97,7 +97,7 @@ void shred_main(void) if (len-pos < throw) throw = len-pos; if (iter != TT.iterations) xread(TT.ufd, toybuf, throw); - if (throw != writeall(fd, toybuf, throw)) perror_msg("%s"); + if (throw != writeall(fd, toybuf, throw)) perror_msg_raw(*try); pos += throw; } if (toys.optflags & FLAG_u) |