mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-07 00:36:06 +00:00
block: print errno on error
Now that we changed all create calls to return errno, just print it. Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
3829cb460c
commit
3e7896dec4
@ -374,7 +374,7 @@ static int img_create(int argc, char **argv)
|
|||||||
} else if (ret == -EFBIG) {
|
} else if (ret == -EFBIG) {
|
||||||
error("The image size is too large for file format '%s'", fmt);
|
error("The image size is too large for file format '%s'", fmt);
|
||||||
} else {
|
} else {
|
||||||
error("Error while formatting");
|
error("%s: error while creating %s: %s", filename, fmt, strerror(-ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@ -687,7 +687,7 @@ static int img_convert(int argc, char **argv)
|
|||||||
} else if (ret == -EFBIG) {
|
} else if (ret == -EFBIG) {
|
||||||
error("The image size is too large for file format '%s'", out_fmt);
|
error("The image size is too large for file format '%s'", out_fmt);
|
||||||
} else {
|
} else {
|
||||||
error("Error while formatting '%s'", out_filename);
|
error("%s: error while converting %s: %s", out_filename, out_fmt, strerror(-ret));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user