diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-08-22 18:54:50 +0800 |
---|---|---|
committer | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-09-05 03:22:13 +0800 |
commit | 2d7ac4aa33e1fcef8319ca7a0ae587f468fa26dd (patch) | |
tree | 6a4b12e0117bb94e39158dcb23495b33721cd609 /include | |
parent | 65d4f485eb53e18d2832260ce4e56799e54fc2da (diff) | |
download | barebox-2d7ac4aa33e1fcef8319ca7a0ae587f468fa26dd.tar.gz barebox-2d7ac4aa33e1fcef8319ca7a0ae587f468fa26dd.tar.xz |
fs: implement stat
stat() stats the file pointed to by path and fills in buf.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/fs.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/include/fs.h b/include/fs.h index d96de0e89a..07976d2795 100644 --- a/include/fs.h +++ b/include/fs.h @@ -107,10 +107,7 @@ int unlink(const char *pathname); int close(int fd); int flush(int fd); int lstat(const char *filename, struct stat *s); -static inline int stat(const char *filename, struct stat *s) -{ - return lstat(filename, s); -} +int stat(const char *filename, struct stat *s); int read(int fd, void *buf, size_t count); int ioctl(int fd, int request, void *buf); ssize_t write(int fd, const void *buf, size_t count); @@ -169,6 +166,7 @@ void *read_file(const char *filename, size_t *size); * of "..", "." and double slashes. The returned string must be freed wit free(). */ char *normalise_path(const char *path); +char *normalise_link(const char *pathname, const char* symlink); /* Register a new filesystem driver */ int register_fs_driver(struct fs_driver_d *fsdrv); |