diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-11 14:29:19 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-17 10:27:15 +0100 |
commit | 8a81eab8463d1320585e9e1c606636701ddf57db (patch) | |
tree | 73f1e08bc1903e337404389309d8a8190a26b290 /include | |
parent | 80b767748b0dca9939315d95326dd76f93ffff88 (diff) | |
download | barebox-8a81eab8463d1320585e9e1c606636701ddf57db.tar.gz barebox-8a81eab8463d1320585e9e1c606636701ddf57db.tar.xz |
fs: Store mtab entries in list
To make the code a bit easier to read. Also, do not allow
to umount / when something else is mounted.
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/fs.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/fs.h b/include/fs.h index 97d5995c1f..dd106770df 100644 --- a/include/fs.h +++ b/include/fs.h @@ -78,11 +78,14 @@ struct fs_driver_d { struct mtab_entry { char path[PATH_MAX]; - struct mtab_entry *next; struct device_d *dev; struct device_d *parent_device; + struct list_head list; }; +extern struct list_head mtab_list; +#define for_each_mtab_entry(e) list_for_each_entry(e, &mtab_list, list) + struct fs_device_d { char *backingstore; /* the device we are associated with */ struct device_d dev; /* our own device */ @@ -148,7 +151,6 @@ char *mkmodestr(unsigned long mode, char *str); * directly in / and of course the root directory itself */ struct mtab_entry *get_mtab_entry_by_path(const char *path); -struct mtab_entry *mtab_next_entry(struct mtab_entry *entry); const char *fsdev_get_mountpoint(struct fs_device_d *fsdev); /* |