diff options
author | sharad3001 <46183881+sharad3001@users.noreply.github.com> | 2024-03-13 14:25:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-13 14:25:22 +0100 |
commit | e0cd8a1bdf6a780b82487c5cf3b4b6487a83a6e1 (patch) | |
tree | 82019c777f1e00a108802c7b4b74f1a81be21161 /src/udev | |
parent | network/varlink: return StorageReadOnly error (diff) | |
download | systemd-e0cd8a1bdf6a780b82487c5cf3b4b6487a83a6e1.tar.xz systemd-e0cd8a1bdf6a780b82487c5cf3b4b6487a83a6e1.zip |
udev: add assert for EVENT_RESULT_EXIT_STATUS_BASE (#31710)
EVENT_RESULT_EXIT_STATUS_BASE and EVENT_RESULT_SUCCESS has the same value.
Code updated to add assert statement for EVENT_RESULT_EXIT_STATUS_BASE.
Diffstat (limited to 'src/udev')
-rw-r--r-- | src/udev/udev-worker.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/udev/udev-worker.c b/src/udev/udev-worker.c index 4563d8807d..b038b68099 100644 --- a/src/udev/udev-worker.c +++ b/src/udev/udev-worker.c @@ -249,6 +249,7 @@ void udev_broadcast_result(sd_device_monitor *monitor, sd_device *dev, EventResu break; } case EVENT_RESULT_EXIT_STATUS_BASE ... EVENT_RESULT_EXIT_STATUS_MAX: + assert(result != EVENT_RESULT_EXIT_STATUS_BASE); (void) device_add_propertyf(dev, "UDEV_WORKER_EXIT_STATUS", "%i", result - EVENT_RESULT_EXIT_STATUS_BASE); break; |