diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-05 12:59:29 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-09-05 12:59:29 +0200 |
commit | e5a927883ea8f85e2258d5e15ac6ede8f44aeaab (patch) | |
tree | 1798a5dc8008c29d688093783e6bece1094cedbc /include/fs.h | |
parent | 62b665b6442c493eb2537d1c5f6c8925a2ce73bf (diff) | |
parent | 42d3d24c7152462f7bb40056255ebcfffa8dbd9f (diff) | |
download | barebox-e5a927883ea8f85e2258d5e15ac6ede8f44aeaab.tar.gz barebox-e5a927883ea8f85e2258d5e15ac6ede8f44aeaab.tar.xz |
Merge branch 'for-next/link'
Diffstat (limited to 'include/fs.h')
-rw-r--r-- | include/fs.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h index 22470e6379..3d5714c1fb 100644 --- a/include/fs.h +++ b/include/fs.h @@ -51,6 +51,11 @@ struct fs_driver_d { /* Truncate a file to given size */ int (*truncate)(struct device_d *dev, FILE *f, ulong size); + int (*symlink)(struct device_d *dev, const char *pathname, + const char *newpath); + int (*readlink)(struct device_d *dev, const char *pathname, char *name, + size_t size); + int (*open)(struct device_d *dev, FILE *f, const char *pathname); int (*close)(struct device_d *dev, FILE *f); int (*read)(struct device_d *dev, FILE *f, void *buf, size_t size); @@ -106,6 +111,7 @@ int creat(const char *pathname, mode_t mode); int unlink(const char *pathname); int close(int fd); int flush(int fd); +int lstat(const char *filename, struct stat *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); @@ -129,6 +135,9 @@ DIR *opendir(const char *pathname); struct dirent *readdir(DIR *dir); int closedir(DIR *dir); +int symlink(const char *pathname, const char *newpath); +int readlink(const char *path, char *buf, size_t bufsiz); + int mount (const char *device, const char *fsname, const char *path); int umount(const char *pathname); @@ -162,6 +171,9 @@ 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); + +char *get_mounted_path(const char *path); /* Register a new filesystem driver */ int register_fs_driver(struct fs_driver_d *fsdrv); |