diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-04-02 05:21:49 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1997-04-02 05:21:49 +0000 |
commit | 5f84921459b9b60461ca61007a14e8eaa0033c88 (patch) | |
tree | 70fa3901e430cd910821444add102ab43606e9e2 /sys/lib/libsa/stat.c | |
parent | 471eac0e1b823971765a6f790c8ff05fa647c495 (diff) |
don't use cread's open/close. stat does not need libz. save memory
Diffstat (limited to 'sys/lib/libsa/stat.c')
-rw-r--r-- | sys/lib/libsa/stat.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/lib/libsa/stat.c b/sys/lib/libsa/stat.c index c5167b3304e..bdda62de0c7 100644 --- a/sys/lib/libsa/stat.c +++ b/sys/lib/libsa/stat.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stat.c,v 1.3 1996/09/23 14:19:05 mickey Exp $ */ +/* $OpenBSD: stat.c,v 1.4 1997/04/02 05:21:48 mickey Exp $ */ /* $NetBSD: stat.c,v 1.3 1994/10/26 05:45:07 cgd Exp $ */ /*- @@ -45,10 +45,17 @@ stat(str, sb) { int fd, rv; - fd = open(str, 0); - if (fd < 0) +#ifdef __INTERNAL_LIBSA_CREAD + if ((fd = oopen(str, 0)) < 0) +#else + if ((fd = open(str, 0)) < 0) +#endif return (-1); rv = fstat(fd, sb); +#ifdef __INTERNAL_LIBSA_CREAD + (void)oclose(fd); +#else (void)close(fd); +#endif return (rv); } |