1 #include "lib.h" 2 #include <sys/stat.h> 3 #include <errno.h> 4 #include "sys9.h" 5 #include "dir.h" 6 7 int 8 stat(const char *path, struct stat *buf) 9 { 10 char cd[DIRLEN]; 11 12 if(_STAT(path, cd) < 0){ 13 _syserrno(); 14 return -1; 15 } 16 _dirtostat(buf, cd, 0); 17 18 return 0; 19 } 20