system-config-printer/0001-udev-Fix-exit-value-when-device-is-already-handled.patch
2024-03-20 15:57:43 +01:00

36 lines
1.1 KiB
Diff

From 77540d0cb539364bbf63e21cfa970e62d9a86ed3 Mon Sep 17 00:00:00 2001
From: Zdenek Dohnal <zdohnal@redhat.com>
Date: Tue, 12 Mar 2024 18:59:43 +0100
Subject: [PATCH] udev: Fix exit value when device is already handled
---
NEWS | 1 +
udev/udev-configure-printer.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/udev/udev-configure-printer.c b/udev/udev-configure-printer.c
index fd158b09..5703c1af 100644
--- a/udev/udev-configure-printer.c
+++ b/udev/udev-configure-printer.c
@@ -806,7 +806,7 @@ device_id_from_devpath (struct udev *udev, const char *devpath,
{
udev_device_unref (dev);
syslog (LOG_ERR, "unable to access %s", syspath);
- return NULL;
+ exit (1);
}
usb_device_devpath = strdup (udev_device_get_devpath (dev));
@@ -831,7 +831,7 @@ device_id_from_devpath (struct udev *udev, const char *devpath,
syslog (LOG_DEBUG, "Device already handled");
free (usb_device_devpath);
free (devicefilepath);
- return NULL;
+ exit (0);
}
serial = udev_device_get_sysattr_value (dev, "serial");
--
2.44.0