mirror of
https://github.com/morgan9e/systemd
synced 2026-04-14 00:14:32 +09:00
reread-part: fix error propagation
[ 49.514556] (udev-synth)[1385]: Assertion '(_error) != 0' failed at src/shared/reread-partition-table.c:260, function reread_partition_table_full(). Aborting.
Follow-up for 757887d01d
Fixes https://github.com/systemd/systemd/issues/39603
This commit is contained in:
committed by
Yu Watanabe
parent
9ebf0d260d
commit
74c0ed07a1
@@ -257,7 +257,7 @@ static int reread_partition_table_full(sd_device *dev, int fd, RereadPartitionTa
|
||||
if (FLAGS_SET(flags, REREADPT_BSD_LOCK)) {
|
||||
lock_fd = fd_reopen(fd, O_RDONLY|O_CLOEXEC|O_NOCTTY);
|
||||
if (lock_fd < 0)
|
||||
return log_device_debug_errno(dev, r, "Failed top open lock fd for block device '%s': %m", p);
|
||||
return log_device_debug_errno(dev, lock_fd, "Failed top open lock fd for block device '%s': %m", p);
|
||||
|
||||
if (flock(lock_fd, LOCK_EX|LOCK_NB) < 0)
|
||||
return log_device_debug_errno(dev, errno, "Failed to take BSD lock on block device '%s': %m", p);
|
||||
|
||||
Reference in New Issue
Block a user