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:
committed by
Yu Watanabe
parent
3c82f2028d
commit
4bede0a0aa
@@ -3122,7 +3122,7 @@ int home_resize_luks(
|
||||
|
||||
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)
|
||||
return log_error_errno(r, "Failed to open whole block device for %s: %m", ip);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user