return loop_write(manager->worker_watch[WRITE_END], &result, sizeof(result), false);
}
-static int device_get_block_device(sd_device *dev, const char **ret) {
+static int device_get_whole_disk(sd_device *dev, const char **ret) {
const char *val;
int r;
return 0;
}
-static int worker_lock_block_device(sd_device *dev, int *ret_fd) {
+static int worker_lock_whole_disk(sd_device *dev, int *ret_fd) {
_cleanup_close_ int fd = -1;
const char *val;
int r;
* event handling; in the case udev acquired the lock, the external process can block until udev has
* finished its event handling. */
- r = device_get_block_device(dev, &val);
+ r = device_get_whole_disk(dev, &val);
if (r < 0)
return r;
if (r == 0)
* Instead of processing the event, we requeue the event and will try again after a delay.
*
* The user-facing side of this: https://systemd.io/BLOCK_DEVICE_LOCKING */
- r = worker_lock_block_device(dev, &fd_lock);
+ r = worker_lock_whole_disk(dev, &fd_lock);
if (r == -EAGAIN)
return EVENT_RESULT_TRY_AGAIN;
if (r < 0)
* device is not locked anymore. The assumption may not be true, but that should not cause any
* issues, as in that case events will be requeued soon. */
- r = device_get_block_device(dev, &devname);
+ r = device_get_whole_disk(dev, &devname);
if (r <= 0)
return r;
if (event->retry_again_next_usec == 0)
continue;
- if (device_get_block_device(event->dev, &event_devname) <= 0)
+ if (device_get_whole_disk(event->dev, &event_devname) <= 0)
continue;
if (!streq(devname, event_devname))