diff options
author | Rob Landley <rob@landley.net> | 2008-02-12 19:05:44 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2008-02-12 19:05:44 -0600 |
commit | 0f8c4c5998317e575f1afd47dad7f6967bc271ab (patch) | |
tree | 11613ae34f3830bf02914c9381eaa5790da63801 /toys/touch.c | |
parent | 6882ee89dc5da4081d5721706ad77a3e0396b1bc (diff) | |
download | toybox-0f8c4c5998317e575f1afd47dad7f6967bc271ab.tar.gz |
Add TOYFLAG_UMASK.
Diffstat (limited to 'toys/touch.c')
-rw-r--r-- | toys/touch.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/toys/touch.c b/toys/touch.c index c8cba76b..bead28fb 100644 --- a/toys/touch.c +++ b/toys/touch.c @@ -6,7 +6,7 @@ * * See http://www.opengroup.org/onlinepubs/009695399/utilities/touch.html -USE_TOUCH(NEWTOY(touch, "l#t:r:mca", TOYFLAG_BIN)) +USE_TOUCH(NEWTOY(touch, "l#t:r:mca", TOYFLAG_BIN|TOYFLAG_UMASK)) config TOUCH bool "touch" @@ -86,9 +86,7 @@ void touch_main(void) if (stat(arg, &sb)) { if (!(toys.optflags & OPT_NOCREATE)) { - int temp = umask(0); xcreate(arg, O_CREAT, 0644); - if (CFG_TOYBOX_FREE) umask(temp); if (stat(arg, &sb)) goto error; } |