[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 13/27] migration: Fix a few absurdly defective error messages
From: |
Dr. David Alan Gilbert (git) |
Subject: |
[PULL 13/27] migration: Fix a few absurdly defective error messages |
Date: |
Thu, 4 Feb 2021 16:39:45 +0000 |
From: Markus Armbruster <armbru@redhat.com>
migrate_params_check() has a number of error messages of the form
Parameter 'NAME' expects is invalid, it should be ...
Fix them to something like
Parameter 'NAME' expects a ...
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Message-Id: <20210202141734.2488076-5-armbru@redhat.com>
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
migration/migration.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/migration/migration.c b/migration/migration.c
index 77b0c39b50..38efaeee94 100644
--- a/migration/migration.c
+++ b/migration/migration.c
@@ -1317,21 +1317,21 @@ static bool migrate_params_check(MigrationParameters
*params, Error **errp)
if (params->has_compress_level &&
(params->compress_level > 9)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "compress_level",
- "is invalid, it should be in the range of 0 to 9");
+ "a value between 0 and 9");
return false;
}
if (params->has_compress_threads && (params->compress_threads < 1)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"compress_threads",
- "is invalid, it should be in the range of 1 to 255");
+ "a value between 1 and 255");
return false;
}
if (params->has_decompress_threads && (params->decompress_threads < 1)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"decompress_threads",
- "is invalid, it should be in the range of 1 to 255");
+ "a value between 1 and 255");
return false;
}
@@ -1384,21 +1384,21 @@ static bool migrate_params_check(MigrationParameters
*params, Error **errp)
if (params->has_multifd_channels && (params->multifd_channels < 1)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"multifd_channels",
- "is invalid, it should be in the range of 1 to 255");
+ "a value between 1 and 255");
return false;
}
if (params->has_multifd_zlib_level &&
(params->multifd_zlib_level > 9)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "multifd_zlib_level",
- "is invalid, it should be in the range of 0 to 9");
+ "a value between 0 and 9");
return false;
}
if (params->has_multifd_zstd_level &&
(params->multifd_zstd_level > 20)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "multifd_zstd_level",
- "is invalid, it should be in the range of 0 to 20");
+ "a value between 0 and 20");
return false;
}
@@ -1407,8 +1407,7 @@ static bool migrate_params_check(MigrationParameters
*params, Error **errp)
!is_power_of_2(params->xbzrle_cache_size))) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"xbzrle_cache_size",
- "is invalid, it should be bigger than target page size"
- " and a power of 2");
+ "a power of two no less than the target page size");
return false;
}
@@ -1425,21 +1424,21 @@ static bool migrate_params_check(MigrationParameters
*params, Error **errp)
params->announce_initial > 100000) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"announce_initial",
- "is invalid, it must be less than 100000 ms");
+ "a value between 0 and 100000");
return false;
}
if (params->has_announce_max &&
params->announce_max > 100000) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"announce_max",
- "is invalid, it must be less than 100000 ms");
+ "a value between 0 and 100000");
return false;
}
if (params->has_announce_rounds &&
params->announce_rounds > 1000) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"announce_rounds",
- "is invalid, it must be in the range of 0 to 1000");
+ "a value between 0 and 1000");
return false;
}
if (params->has_announce_step &&
@@ -1447,7 +1446,7 @@ static bool migrate_params_check(MigrationParameters
*params, Error **errp)
params->announce_step > 10000)) {
error_setg(errp, QERR_INVALID_PARAMETER_VALUE,
"announce_step",
- "is invalid, it must be in the range of 1 to 10000 ms");
+ "a value between 0 and 10000");
return false;
}
--
2.29.2
- [PULL 01/27] spapr_pci: Fix memory leak of vmstate_spapr_pci, (continued)
- [PULL 01/27] spapr_pci: Fix memory leak of vmstate_spapr_pci, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 03/27] vmstate: Fix memory leak in vmstate_handle_alloc(), Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 05/27] migration: introduce 'background-snapshot' migration capability, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 06/27] migration: introduce UFFD-WP low-level interface helpers, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 07/27] migration: support UFFD write fault processing in ram_save_iterate(), Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 08/27] migration: implementation of background snapshot thread, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 09/27] migration: introduce 'userfaultfd-wrlat.py' script, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 10/27] migration: Fix migrate-set-parameters argument validation, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 11/27] migration: Clean up signed vs. unsigned XBZRLE cache-size, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 12/27] migration: Fix cache_init()'s "Failed to allocate" error messages, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 13/27] migration: Fix a few absurdly defective error messages,
Dr. David Alan Gilbert (git) <=
- [PULL 14/27] migration: Add blocker information, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 15/27] migration: Display the migration blockers, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 16/27] block: push error reporting into bdrv_all_*_snapshot functions, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 17/27] migration: Make save_snapshot() return bool, not 0/-1, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 18/27] migration: stop returning errno from load_snapshot(), Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 19/27] block: add ability to specify list of blockdevs during snapshot, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 20/27] block: allow specifying name of block device for vmstate storage, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 22/27] migration: control whether snapshots are ovewritten, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 23/27] migration: wire up support for snapshot device selection, Dr. David Alan Gilbert (git), 2021/02/04
- [PULL 21/27] block: rename and alter bdrv_all_find_snapshot semantics, Dr. David Alan Gilbert (git), 2021/02/04