diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2011-04-13 22:33:01 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2011-04-13 22:33:01 +0200 |
commit | 9ead662791b5e59a95b6c5a9351d661cb61d76bb (patch) | |
tree | 392eb083d47cc9de102fed885c4d8477103bc89c /libudev/libudev-device.c | |
parent | 09913ced8c6c081840c27a9f2ae4d430045a7c68 (diff) |
udevadm: info --cleanup-db
Most of the udev database from initramfs should be deleted before
starting udev in the real root. udevadm: info --cleanup-db deletes
all database entries in /run/udev. Events that processed IMPORT{db},
or mark devices explicitely as persistent, will be excluded.
Diffstat (limited to 'libudev/libudev-device.c')
-rw-r--r-- | libudev/libudev-device.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libudev/libudev-device.c b/libudev/libudev-device.c index ccd4a70677..a141dadf0a 100644 --- a/libudev/libudev-device.c +++ b/libudev/libudev-device.c @@ -89,6 +89,7 @@ struct udev_device { bool uevent_loaded; bool is_initialized; bool sysattr_list_read; + bool db_persist; }; struct udev_list_entry *udev_device_add_property(struct udev_device *udev_device, const char *key, const char *value) @@ -1774,3 +1775,13 @@ int udev_device_set_ifindex(struct udev_device *udev_device, int ifindex) udev_device_add_property(udev_device, "IFINDEX", num); return 0; } + +bool udev_device_get_db_persist(struct udev_device *udev_device) +{ + return udev_device->db_persist; +} + +void udev_device_set_db_persist(struct udev_device *udev_device) +{ + udev_device->db_persist = true; +} |