summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2007-07-05 18:01:44 +0200
committerSascha Hauer <sha@octopus.labnet.pengutronix.de>2007-07-05 18:01:44 +0200
commit07dbdaef611a0773049d50cd73535bbf315c3c13 (patch)
tree3a3c949a9dde72a5bbe6c1a8cb886c742e4f1a21
parent45d10034377e7b7d9a5d5908654ad311ca80011e (diff)
downloadbarebox-07dbdaef611a0773049d50cd73535bbf315c3c13.tar.gz
barebox-07dbdaef611a0773049d50cd73535bbf315c3c13.tar.xz
svn_rev_331
add rmdir and unlink
-rw-r--r--include/fs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/fs.h b/include/fs.h
index 2597784a0a..5645ea3ae2 100644
--- a/include/fs.h
+++ b/include/fs.h
@@ -45,9 +45,11 @@ struct fs_driver_d {
char *name;
int (*probe) (struct device_d *dev);
int (*mkdir)(struct device_d *dev, const char *pathname);
+ int (*rmdir)(struct device_d *dev, const char *pathname);
/* create a file. The file is guaranteed to not exist */
int (*create)(struct device_d *dev, const char *pathname, mode_t mode);
+ int (*unlink)(struct device_d *dev, const char *pathname);
/* Truncate a file to given size */
int (*truncate)(struct device_d *dev, FILE *f, ulong size);
@@ -76,6 +78,7 @@ struct fs_device_d {
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 stat(const char *filename, struct stat *s);
int read(int fd, void *buf, size_t count);
@@ -88,6 +91,7 @@ ssize_t write(int fd, const void *buf, size_t count);
off_t lseek(int fildes, off_t offset, int whence);
int ls(const char *path, ulong flags);
int mkdir (const char *pathname);
+int rmdir (const char *pathname);
int mount (struct device_d *dev, char *fsname, char *path);
int umount(const char *pathname);
@@ -98,11 +102,13 @@ int closedir(struct dir *dir);
char *mkmodestr(unsigned long mode, char *str);
struct mtab_entry *get_mtab_entry_by_path(const char *path);
+struct mtab_entry *mtab_next_entry(struct mtab_entry *entry);
struct mtab_entry {
char path[PATH_MAX];
struct mtab_entry *next;
struct device_d *dev;
+ struct device_d *parent_device;
};
void normalise_path(char *path);