mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-30 14:55:26 +03:00
7a947ce515
Here is the first patch to cleanup the internal processing of the various stages of an udev event. It should not change any behavior, but if your system depends on udev, please always test it before reboot :) We pass only one generic structure around between add, remove, namedev, db and dev_d handling and make all relevant data available to all internal stages. All udev structures are renamed to "udev". We replace the fake parameter by a flag in the udev structure. We open the class device in the main binaries and not in udev_add, to make it possible to use libsysfs for udevstart directory crawling. The last sleep parameters are removed.
23 lines
736 B
C
23 lines
736 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_open_ro(void);
|
|
extern int udevdb_call_foreach(int (*user_record_handler) (const char *path, struct udevice *dev));
|
|
|
|
extern int udevdb_add_dev(struct udevice *dev);
|
|
extern int udevdb_get_dev(const char *path, struct udevice *dev);
|
|
extern int udevdb_delete_dev(const char *path);
|
|
extern int udevdb_get_dev_byname(const char *name, char *path, struct udevice *dev);
|
|
|
|
#endif /* _UDEVDB_H_ */
|