diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-17 10:27:31 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-17 10:27:31 +0100 |
commit | 2546c5a514e57c0efaeb1664006b2af14d3c0590 (patch) | |
tree | 17cef9339fdc6fb12ecf72ef27c51d96022ffed2 /include | |
parent | c6a87e145cea8af8c7545a0406aa8f8dd9146c92 (diff) | |
parent | 491cc29b0a2cf7c675e94e00eed2d58934a76011 (diff) | |
download | barebox-2546c5a514e57c0efaeb1664006b2af14d3c0590.tar.gz barebox-2546c5a514e57c0efaeb1664006b2af14d3c0590.tar.xz |
Merge branch 'pu/device-cleanup' into next
Diffstat (limited to 'include')
-rw-r--r-- | include/fs.h | 19 | ||||
-rw-r--r-- | include/linux/list.h | 9 |
2 files changed, 15 insertions, 13 deletions
diff --git a/include/fs.h b/include/fs.h index 97d5995c1f..656160dd53 100644 --- a/include/fs.h +++ b/include/fs.h @@ -72,23 +72,25 @@ struct fs_driver_d { struct driver_d drv; unsigned long flags; - - struct list_head list; }; struct mtab_entry { - char path[PATH_MAX]; - struct mtab_entry *next; + char *path; 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 */ struct fs_driver_d *driver; + struct cdev *cdev; struct mtab_entry mtab; }; @@ -143,15 +145,6 @@ int ls(const char *path, ulong flags); char *mkmodestr(unsigned long mode, char *str); /* - * Information about mounted devices. - * Note that we only support mounting on directories lying - * 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); - -/* * Read a file into memory. Memory is allocated with malloc and must * be freed with free() afterwards. This function allocates one * byte more than actually needed and sets this to zero, so that diff --git a/include/linux/list.h b/include/linux/list.h index 15ed499cae..5ae90b43a3 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -210,6 +210,15 @@ static inline int list_empty_careful(const struct list_head *head) return (next == head) && (next == head->prev); } +/** + * list_is_singular - tests whether a list has just one entry. + * @head: the list to test. + */ +static inline int list_is_singular(const struct list_head *head) +{ + return !list_empty(head) && (head->next == head->prev); +} + static inline void __list_splice(struct list_head *list, struct list_head *head) { |