Skip to content

Commit 77540d0

Browse files
committed
udev: Fix exit value when device is already handled
1 parent aaded9b commit 77540d0

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
1.5.19 changes
22
--------------
33
- Fix `debugprint()` call in options.py (Issue #291)
4+
- Fix exit value if the device is already handled
45

56
1.5.18 changes
67
--------------

udev/udev-configure-printer.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ device_id_from_devpath (struct udev *udev, const char *devpath,
806806
{
807807
udev_device_unref (dev);
808808
syslog (LOG_ERR, "unable to access %s", syspath);
809-
return NULL;
809+
exit (1);
810810
}
811811

812812
usb_device_devpath = strdup (udev_device_get_devpath (dev));
@@ -831,7 +831,7 @@ device_id_from_devpath (struct udev *udev, const char *devpath,
831831
syslog (LOG_DEBUG, "Device already handled");
832832
free (usb_device_devpath);
833833
free (devicefilepath);
834-
return NULL;
834+
exit (0);
835835
}
836836

837837
serial = udev_device_get_sysattr_value (dev, "serial");

0 commit comments

Comments
 (0)