dissect: when we invoke dissection on a loop device with partscan help the user
This adds some simply detection logic for cases where dissection is invoked on an externally created loop device, and partitions have been detected on it, but partition scanning so far was off. If this is detected we now print a brief message indicating what the issue is, instead of failing with a useless EINVAL message the kernel passed to us.
This commit is contained in:
@@ -3883,6 +3883,10 @@ int main(int argc, char *argv[]) {
|
||||
log_error_errno(r, "--image= is not supported, compiled without blkid support.");
|
||||
goto finish;
|
||||
}
|
||||
if (r == -EPROTONOSUPPORT) {
|
||||
log_error_errno(r, "Device is loopback block device with partition scanning turned off, please turn it on.");
|
||||
goto finish;
|
||||
}
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to dissect image: %m");
|
||||
goto finish;
|
||||
|
||||
Reference in New Issue
Block a user