projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9330bcb
)
Implement shred -u and switch to default y in defconfig.
author
Rob Landley
<rob@landley.net>
Thu, 12 Mar 2015 20:32:50 +0000
(15:32 -0500)
committer
Rob Landley
<rob@landley.net>
Thu, 12 Mar 2015 20:32:50 +0000
(15:32 -0500)
toys/other/shred.c
patch
|
blob
|
history
diff --git
a/toys/other/shred.c
b/toys/other/shred.c
index
07d62c3
..
64db5ed
100644
(file)
--- a/
toys/other/shred.c
+++ b/
toys/other/shred.c
@@
-8,7
+8,7
@@
USE_SHRED(NEWTOY(shred, "<1zxus#<1n#<1o#<0f", TOYFLAG_USR|TOYFLAG_BIN))
config SHRED
bool "shred"
- default
n
+ default
y
help
usage: shred [-fuz] [-n COUNT] [-s SIZE] FILE...
@@
-100,5
+100,7
@@
void shred_main(void)
if (throw != writeall(fd, toybuf, throw)) perror_msg("%s");
pos += throw;
}
+ if (toys.optflags & FLAG_u)
+ if (unlink(*try)) perror_msg("unlink '%s'", *try);
}
}