libudev: private - introduce udev_device_new_from_synthetic_event()

This allows set_action(), read_uevent_file() and read_db() to be made internal to libudev.
This commit is contained in:
Tom Gundersen
2015-03-18 14:49:20 +01:00
parent 1b41981d9a
commit bf0e00ec58
4 changed files with 48 additions and 21 deletions
+1 -2
View File
@@ -110,13 +110,12 @@ int main(int argc, char *argv[]) {
rules = udev_rules_new(udev, 1);
strscpyl(syspath, sizeof(syspath), "/sys", devpath, NULL);
dev = udev_device_new_from_syspath(udev, syspath);
dev = udev_device_new_from_synthetic_event(udev, syspath, action);
if (dev == NULL) {
log_debug("unknown device '%s'", devpath);
goto out;
}
udev_device_set_action(dev, action);
event = udev_event_new(dev);
sigfillset(&mask);