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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user