summaryrefslogtreecommitdiff
path: root/udevdb.h
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-10-20 22:48:44 -0700
committerGreg KH <gregkh@suse.de>2005-04-26 21:01:42 -0700
commit5840bc63e2029d22682d8de77dc8fcc4da1b436c (patch)
tree620021f8bb1d66f60cf98d6e356d0f90d1e9d8b1 /udevdb.h
parentc8c47999ff59b0235b217fbab4cba0c86b0fd075 (diff)
[PATCH] major database cleanups
Now we standardise on a struct udevice to pass around, and store in the database. This cleaned up the database code a lot.
Diffstat (limited to 'udevdb.h')
-rw-r--r--udevdb.h25
1 files changed, 3 insertions, 22 deletions
diff --git a/udevdb.h b/udevdb.h
index 57a27bc17f..12f6648369 100644
--- a/udevdb.h
+++ b/udevdb.h
@@ -6,35 +6,16 @@
#define UDEV_DB "udevdb.tdb"
-#define PATH_SIZE 256
-
-#define UDEVDB_DEL "#"
-
/* Udevdb initialization flags */
#define UDEVDB_DEFAULT 0 /* Defaults database to use file */
#define UDEVDB_INTERNAL 1 /* Don't store db on disk, use in memory */
-struct udevice {
- char name[NAME_SIZE];
- char sysfs_dev_path[PATH_SIZE];
- char class_dev_name[NAME_SIZE];
- char class_name[NAME_SIZE];
- char bus_id[NAME_SIZE];
- char bus_name[NAME_SIZE];
- char type;
- int major;
- int minor;
- mode_t mode;
-};
-
/* Function Prototypes */
extern void udevdb_exit(void);
extern int udevdb_init(int init_flag);
-extern int udevdb_delete_udevice(const char *name);
-extern int udevdb_add_device(const char *device, const struct sysfs_class_device *class_dev, const char *name, char type, int major, int minor, int mode);
-extern struct udevice *udevdb_get_udevice(const char *name);
-extern char *udevdb_get_udevice_by_sysfs(const char *path);
-extern int udevdb_get_dev(const char *path, char *name, size_t name_size);
+
+extern int udevdb_add_dev(const char *path, const struct udevice *dev);
+extern struct udevice *udevdb_get_dev(const char *path);
extern int udevdb_delete_dev(const char *path);
#endif /* _UDEVDB_H_ */