mirror of
https://github.com/systemd/systemd.git
synced 2024-12-25 01:34:28 +03:00
a56ef38286
I've moved the malloc out of the udevdb into udev-remove to free the struct after use and not to allocate a different struct in the case the device is not in the data base. I seems a bit easier to read.
20 lines
542 B
C
20 lines
542 B
C
/*
|
|
* udevdb header file
|
|
*/
|
|
#ifndef _UDEVDB_H_
|
|
#define _UDEVDB_H_
|
|
|
|
/* 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 */
|
|
|
|
/* function prototypes */
|
|
extern void udevdb_exit(void);
|
|
extern int udevdb_init(int init_flag);
|
|
|
|
extern int udevdb_add_dev(const char *path, const struct udevice *dev);
|
|
extern int udevdb_get_dev(const char *path, struct udevice *dev);
|
|
extern int udevdb_delete_dev(const char *path);
|
|
|
|
#endif /* _UDEVDB_H_ */
|