aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2007-01-07 22:51:12 -0500
committerRob Landley <rob@landley.net>2007-01-07 22:51:12 -0500
commit1322beb384ea43a15c17f8229e7db070949dd331 (patch)
tree8cd23c638a6b6aeffa0a761025848e7bce60d4f1 /toys
parent016bf8289e12346f45f543d5b048d2496f4f0256 (diff)
downloadtoybox-1322beb384ea43a15c17f8229e7db070949dd331.tar.gz
xopen() wants 2 arguments unless you're creating a file, in which case you
need 3. Doing varargs for this doesn't really appeal to me (bugs in waiting) so I made an xcreate() that takes 3 args, and had xopen() call it with 0 for the third argument. That way, if we feed O_CREAT to xopen() the permission 000 result should be easy to spot.
Diffstat (limited to 'toys')
-rw-r--r--toys/catv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/catv.c b/toys/catv.c
index 3a36de6b..e37f307b 100644
--- a/toys/catv.c
+++ b/toys/catv.c
@@ -23,7 +23,7 @@ int catv_main(void)
// Read from stdin if there's nothing else to do.
fd = 0;
- if (*argv && 0>(fd = xopen(*argv, O_RDONLY, 0))) retval = EXIT_FAILURE;
+ if (*argv && 0>(fd = xopen(*argv, O_RDONLY))) retval = EXIT_FAILURE;
else for(;;) {
int i, res;