diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2011-03-25 11:04:53 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-04-11 12:36:07 +0200 |
commit | f1bb89fd9e5c6f3527ebaafcf57346fec19e4d5f (patch) | |
tree | 494e54adea9b5a2f9cd0a4a66e2ed5b360b7783a /include/fs.h | |
parent | 3efa8f7bed53dba8d9252d94233db36aac64b6ce (diff) | |
download | barebox-f1bb89fd9e5c6f3527ebaafcf57346fec19e4d5f.tar.gz barebox-f1bb89fd9e5c6f3527ebaafcf57346fec19e4d5f.tar.xz |
fs: implement flush function
Once we have caching in file functions we need a way to sync
the the underlying devices.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/fs.h')
-rw-r--r-- | include/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h index 3834fe47e5..97d5995c1f 100644 --- a/include/fs.h +++ b/include/fs.h @@ -53,6 +53,7 @@ struct fs_driver_d { int (*close)(struct device_d *dev, FILE *f); int (*read)(struct device_d *dev, FILE *f, void *buf, size_t size); int (*write)(struct device_d *dev, FILE *f, const void *buf, size_t size); + int (*flush)(struct device_d *dev, FILE *f); off_t (*lseek)(struct device_d *dev, FILE *f, off_t pos); struct dir* (*opendir)(struct device_d *dev, const char *pathname); @@ -98,6 +99,7 @@ int open(const char *pathname, int flags, ...); int creat(const char *pathname, mode_t mode); int unlink(const char *pathname); int close(int fd); +int flush(int fd); 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); |