diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/environment.h | 1 | ||||
-rw-r--r-- | include/fs.h | 5 | ||||
-rw-r--r-- | include/libfile.h | 2 | ||||
-rw-r--r-- | include/of.h | 14 |
4 files changed, 20 insertions, 2 deletions
diff --git a/include/environment.h b/include/environment.h index a08f597000..52eafe9882 100644 --- a/include/environment.h +++ b/include/environment.h @@ -21,6 +21,7 @@ #define _ENVIRONMENT_H_ #include <linux/list.h> +#include <errno.h> /** * Managment of a environment variable diff --git a/include/fs.h b/include/fs.h index b2541a4ee5..63e35ca815 100644 --- a/include/fs.h +++ b/include/fs.h @@ -23,7 +23,8 @@ typedef struct dir { } DIR; typedef struct filep { - struct device_d *dev; /* The device this FILE belongs to */ + struct fs_device_d *fsdev; /* The device this FILE belongs to */ + char *path; loff_t pos; /* current position in stream */ #define FILE_SIZE_STREAM ((loff_t) -1) loff_t size; /* The size of this inode */ @@ -82,7 +83,6 @@ struct fs_driver_d { unsigned long flags; }; -#define dev_to_fs_driver(d) container_of(d->driver, struct fs_driver_d, drv) #define dev_to_fs_device(d) container_of(d, struct fs_device_d, dev) extern struct list_head fs_device_list; @@ -114,6 +114,7 @@ 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 fstat(int fd, struct stat *s); ssize_t read(int fd, void *buf, size_t count); ssize_t pread(int fd, void *buf, size_t count, loff_t offset); int ioctl(int fd, int request, void *buf); diff --git a/include/libfile.h b/include/libfile.h index 4a25a9153c..6c48ce0b68 100644 --- a/include/libfile.h +++ b/include/libfile.h @@ -15,4 +15,6 @@ int write_file(const char *filename, void *buf, size_t size); int copy_file(const char *src, const char *dst, int verbose); +int compare_file(const char *f1, const char *f2); + #endif /* __LIBFILE_H */ diff --git a/include/of.h b/include/of.h index 29694a9020..7b93c58474 100644 --- a/include/of.h +++ b/include/of.h @@ -227,6 +227,8 @@ extern int of_platform_populate(struct device_node *root, const struct of_device_id *matches, struct device_d *parent); extern struct device_d *of_find_device_by_node(struct device_node *np); +extern struct device_d *of_device_enable_and_register(struct device_node *np); +extern struct device_d *of_device_enable_and_register_by_name(const char *name); struct cdev *of_parse_partition(struct cdev *cdev, struct device_node *node); int of_parse_partitions(struct cdev *cdev, struct device_node *node); @@ -582,6 +584,18 @@ static inline struct device_d *of_find_device_by_node(struct device_node *np) { return NULL; } + +static inline struct device_d *of_device_enable_and_register( + struct device_node *np) +{ + return NULL; +} + +static inline struct device_d *of_device_enable_and_register_by_name( + const char *name) +{ + return NULL; +} #endif #define for_each_node_by_name(dn, name) \ |