ref: c770b09f43cde887feb3d82d936cddd12288a6e6
parent: 460c598430f92ff38bbaf08cc157d235bd2a967e
author: cinap_lenrek <[email protected]>
date: Sun May 31 05:37:59 EDT 2015
test: use libc.h constants for access() mode (thanks qrstuv)
--- a/sys/src/cmd/test.c
+++ b/sys/src/cmd/test.c
@@ -143,16 +143,16 @@
return(isdir(nxtarg(0)));
if(EQ(a, "-r"))
- return(tio(nxtarg(0), 4));
+ return(tio(nxtarg(0), AREAD));
if(EQ(a, "-w"))
- return(tio(nxtarg(0), 2));
+ return(tio(nxtarg(0), AWRITE));
if(EQ(a, "-x"))
- return(tio(nxtarg(0), 1));
+ return(tio(nxtarg(0), AEXEC));
if(EQ(a, "-e"))
- return(tio(nxtarg(0), 0));
+ return(tio(nxtarg(0), AEXIST));
if(EQ(a, "-c"))
return(0);