mirror of
https://github.com/systemd/systemd
synced 2024-09-15 22:30:22 +00:00
homed: don't use stat() data from an unrelated inode
This doesn't really change anything, since we know the stat data used here also contains S_IFBLK, but it's frickin' confusing.
This commit is contained in:
parent
3c82f2028d
commit
4bede0a0aa
|
@ -3122,7 +3122,7 @@ int home_resize_luks(
|
||||||
|
|
||||||
log_info("Operating on partition device %s, using parent device.", ip);
|
log_info("Operating on partition device %s, using parent device.", ip);
|
||||||
|
|
||||||
opened_image_fd = r = device_open_from_devnum(st.st_mode, parent, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK, &whole_disk);
|
opened_image_fd = r = device_open_from_devnum(S_IFBLK, parent, O_RDWR|O_CLOEXEC|O_NOCTTY|O_NONBLOCK, &whole_disk);
|
||||||
if (r < 0)
|
if (r < 0)
|
||||||
return log_error_errno(r, "Failed to open whole block device for %s: %m", ip);
|
return log_error_errno(r, "Failed to open whole block device for %s: %m", ip);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue