This doesn't really change anything, since we know the stat data used
here also contains S_IFBLK, but it's frickin' confusing.
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);