mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
storage: Alter error message in probe/empty checks
For case VIR_STORAGE_BLKID_PROBE_DIFFERENT, clean up the message to avoid using the virsh like --overwrite syntax. Additionally provide a different error message when not writing the label to avoid confusion.
This commit is contained in:
parent
f462f9ad6e
commit
40ec4ff658
@ -2808,9 +2808,16 @@ virStorageBackendBLKIDFindEmpty(const char *device,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_STORAGE_BLKID_PROBE_DIFFERENT:
|
case VIR_STORAGE_BLKID_PROBE_DIFFERENT:
|
||||||
|
if (writelabel)
|
||||||
virReportError(VIR_ERR_STORAGE_POOL_BUILT,
|
virReportError(VIR_ERR_STORAGE_POOL_BUILT,
|
||||||
_("Device '%s' formatted cannot overwrite using '%s', "
|
_("Format of device '%s' does not match the "
|
||||||
"requires build --overwrite"),
|
"expected format '%s', forced overwrite is "
|
||||||
|
"necessary"),
|
||||||
|
device, format);
|
||||||
|
else
|
||||||
|
virReportError(VIR_ERR_OPERATION_INVALID,
|
||||||
|
_("Format of device '%s' does not match the "
|
||||||
|
"expected format '%s'"),
|
||||||
device, format);
|
device, format);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user