. pci driver now returns devices, even when they have been pci_reserve()d
[minix3.git] / lib / posix / _lstat.c
blob64e24f057733ca13b1a5288f3ec12836ca4251b6
1 #include <lib.h>
2 #define lstat _lstat
3 #define stat _stat
4 #include <sys/stat.h>
5 #include <string.h>
7 PUBLIC int lstat(name, buffer)
8 _CONST char *name;
9 struct stat *buffer;
11 message m;
12 int r;
14 m.m1_i1 = strlen(name) + 1;
15 m.m1_p1 = (char *) name;
16 m.m1_p2 = (char *) buffer;
17 if((r = _syscall(FS, LSTAT, &m)) >= 0 || errno != ENOSYS)
18 return r;
19 return _stat(name, buffer);