mirror of
https://github.com/systemd/systemd
synced 2024-07-22 02:34:54 +00:00
libudev: fix return of udev_monitor_filter_add_match_subsystem_devtype()
Follow-up for 7117842657
.
sd_device_monitor_filter_add_match_subsystem_devtype() now returns 1 to signify
that something was done, and 0 to signify that nothing was done, but
udev_monitor_filter_add_match_subsystem_devtype() needs to return 0 as documented.
udev_monitor_filter_add_match_tag() is adjusted to match.
This makes gdm start successfully here again.
Before, it would just not boot, with nothing very obvious in the logs:
gdm[1756]: Gdm: GdmDisplay: Session never registered, failing
Replaces #19171.
This commit is contained in:
parent
4cf1b41568
commit
0f4b6e59bd
|
@ -265,9 +265,12 @@ _public_ struct udev_device *udev_monitor_receive_device(struct udev_monitor *ud
|
|||
* Returns: 0 on success, otherwise a negative error value.
|
||||
*/
|
||||
_public_ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor *udev_monitor, const char *subsystem, const char *devtype) {
|
||||
int r;
|
||||
|
||||
assert_return(udev_monitor, -EINVAL);
|
||||
|
||||
return sd_device_monitor_filter_add_match_subsystem_devtype(udev_monitor->monitor, subsystem, devtype);
|
||||
r = sd_device_monitor_filter_add_match_subsystem_devtype(udev_monitor->monitor, subsystem, devtype);
|
||||
return r < 0 ? r : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -283,9 +286,12 @@ _public_ int udev_monitor_filter_add_match_subsystem_devtype(struct udev_monitor
|
|||
* Returns: 0 on success, otherwise a negative error value.
|
||||
*/
|
||||
_public_ int udev_monitor_filter_add_match_tag(struct udev_monitor *udev_monitor, const char *tag) {
|
||||
int r;
|
||||
|
||||
assert_return(udev_monitor, -EINVAL);
|
||||
|
||||
return sd_device_monitor_filter_add_match_tag(udev_monitor->monitor, tag);
|
||||
r = sd_device_monitor_filter_add_match_tag(udev_monitor->monitor, tag);
|
||||
return r < 0 ? r : 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue