From 3c0bab4aaf70b2383aa4cbabf6059c48744e8960 Mon Sep 17 00:00:00 2001 From: Tom Gundersen Date: Fri, 6 Mar 2015 18:22:35 +0100 Subject: udevd: event - make db loading lazy in REMOVE event handling We were explicitly eagerly loading the db, then deletenig the backing file and then processing the rules/symlinks. Instead we delete the backnig db file as the last step and let the db loading be lazy as everywhere else. This may save us a bit of work in casese where the db is not needed, but more importantly it hides some implementation details of libudev-device form udevd. --- src/libudev/libudev-device-private.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/libudev') diff --git a/src/libudev/libudev-device-private.c b/src/libudev/libudev-device-private.c index 15d3b231c3..e590288748 100644 --- a/src/libudev/libudev-device-private.c +++ b/src/libudev/libudev-device-private.c @@ -182,6 +182,7 @@ int udev_device_delete_db(struct udev_device *udev_device) if (id == NULL) return -1; strscpyl(filename, sizeof(filename), "/run/udev/data/", id, NULL); + unlink(filename); return 0; } -- cgit v1.2.3-54-g00ecf