diff options
Diffstat (limited to 'src/cmd/test.c')
-rw-r--r-- | src/cmd/test.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/cmd/test.c b/src/cmd/test.c index 0282f198..ef4b8170 100644 --- a/src/cmd/test.c +++ b/src/cmd/test.c @@ -12,6 +12,8 @@ #include <libc.h> #define EQ(a,b) ((tmp=a)==0?0:(strcmp(tmp,b)==0)) +extern int isatty(int); /* <unistd.h> */ + int ap; int ac; char **av; @@ -21,7 +23,6 @@ void synbad(char *, char *); int fsizep(char *); int isdir(char *); int isreg(char *); -int isatty(int); int isint(char *, int *); int hasmode(char *, ulong); int tio(char *, int); @@ -258,18 +259,6 @@ isreg(char *f) } int -isatty(int fd) -{ - Dir d1, d2; - - if(localfstat(fd, &d1) < 0) - return 0; - if(localstat("/dev/cons", &d2) < 0) - return 0; - return d1.type==d2.type && d1.dev==d2.dev && d1.qid.path==d2.qid.path; -} - -int fsizep(char *f) { Dir dir; |