[Toybox] [PATCH 0/5] [v2] Implement chgrp, chmod and chown.
Georgi Chorbadzhiyski
gf at unixsol.org
Wed Mar 7 00:15:55 PST 2012
The following patches implement chgrp, chmod and chown.
Instead of duplicating code in each of the them I have added
dirtree_for_each() function in lib/dirtree.c. Removing the
code duplication since the first version resulted in more than
400 bytes savings in code size.
Patches are available at
http://github.com/gfto/toybox.git
branch chmod
Georgi Chorbadzhiyski (5):
lib: Add void *cb_param param to dirtree_read().
lib: Add dirtree_for_each().
Add new toy - chmod.
Add new toy - chgrp.
Add new toy - chown.
lib/dirtree.c | 40 ++++++++++++++++++++--
lib/lib.h | 5 ++-
toys/chgrp.c | 72 +++++++++++++++++++++++++++++++++++++++
toys/chmod.c | 58 ++++++++++++++++++++++++++++++++
toys/chown.c | 103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
toys/cp.c | 4 +-
toys/mdev.c | 6 ++--
toys/mke2fs.c | 2 +-
8 files changed, 278 insertions(+), 12 deletions(-)
create mode 100644 toys/chgrp.c
create mode 100644 toys/chmod.c
create mode 100644 toys/chown.c
--
1.7.5.1
1331108155.0
More information about the Toybox
mailing list