migration: Fix references to parameter names in error messages
Migration parameter names separate words with hyphens. A number of error messages in migrate_params_check() use underscores instead. Wrong since day one. Fix them. Signed-off-by: Markus Armbruster <armbru@redhat.com> Link: https://lore.kernel.org/qemu-devel/20260326074247.188674-3-armbru@redhat.com Signed-off-by: Fabiano Rosas <farosas@suse.de>
Markus Armbruster committed
Mar 26, 2026 at 08:42 UTC
75ecd660283a966435828250b7bb9d6ccc2a3a05
1 file changed
+18
-18
migration/options.c
+18
-18
@@ -1133,103 +1133,103 @@ bool migrate_params_check(MigrationParameters *params, Error **errp)
1133
1134
if (params->throttle_trigger_threshold < 1 ||
1135
params->throttle_trigger_threshold > 100) {
1136
- error_setg(errp, "Option throttle_trigger_threshold expects "
1136
+ error_setg(errp, "Option throttle-trigger-threshold expects "
1137
"an integer in the range of 1 to 100");
1138
return false;
1139
}
1140
1141
if (params->cpu_throttle_initial < 1 ||
1142
params->cpu_throttle_initial > 99) {
1143
- error_setg(errp, "Option cpu_throttle_initial expects "
1143
+ error_setg(errp, "Option cpu-throttle-initial expects "
1144
"an integer in the range of 1 to 99");
1145
return false;
1146
}
1147
1148
if (params->cpu_throttle_increment < 1 ||
1149
params->cpu_throttle_increment > 99) {
1150
- error_setg(errp, "Option cpu_throttle_increment expects "
1150
+ error_setg(errp, "Option cpu-throttle-increment expects "
1151
"an integer in the range of 1 to 99");
1152
return false;
1153
}
1154
1155
if (params->max_bandwidth > SIZE_MAX) {
1156
- error_setg(errp, "Option max_bandwidth expects "
1156
+ error_setg(errp, "Option max-bandwidth expects "
1157
"an integer in the range of 0 to "stringify(SIZE_MAX)
1158
" bytes/second");
1159
return false;
1160
}
1161
1162
if (params->avail_switchover_bandwidth > SIZE_MAX) {
1163
- error_setg(errp, "Option avail_switchover_bandwidth expects "
1163
+ error_setg(errp, "Option avail-switchover-bandwidth expects "
1164
"an integer in the range of 0 to "stringify(SIZE_MAX)
1165
" bytes/second");
1166
return false;
1167
}
1168
1169
if (params->downtime_limit > MAX_MIGRATE_DOWNTIME) {
1170
- error_setg(errp, "Option downtime_limit expects "
1170
+ error_setg(errp, "Option downtime-limit expects "
1171
"an integer in the range of 0 to "
1172
stringify(MAX_MIGRATE_DOWNTIME)" ms");
1173
return false;
1174
}
1175
1176
if (params->multifd_channels < 1) {
1177
- error_setg(errp, "Option multifd_channels expects "
1177
+ error_setg(errp, "Option multifd-channels expects "
1178
"a value between 1 and 255");
1179
return false;
1180
}
1181
1182
if (params->multifd_zlib_level > 9) {
1183
- error_setg(errp, "Option multifd_zlib_level expects "
1183
+ error_setg(errp, "Option multifd-zlib-level expects "
1184
"a value between 0 and 9");
1185
return false;
1186
}
1187
1188
if (params->multifd_qatzip_level > 9 ||
1189
params->multifd_qatzip_level < 1) {
1190
- error_setg(errp, "Option multifd_qatzip_level expects "
1190
+ error_setg(errp, "Option multifd-qatzip-level expects "
1191
"a value between 1 and 9");
1192
return false;
1193
}
1194
1195
if (params->multifd_zstd_level > 20) {
1196
- error_setg(errp, "Option multifd_zstd_level expects "
1196
+ error_setg(errp, "Option multifd-zstd-level expects "
1197
"a value between 0 and 20");
1198
return false;
1199
}
1200
1201
if (params->xbzrle_cache_size < qemu_target_page_size() ||
1202
!is_power_of_2(params->xbzrle_cache_size)) {
1203
- error_setg(errp, "Option xbzrle_cache_size expects "
1203
+ error_setg(errp, "Option xbzrle-cache-size expects "
1204
"a power of two no less than the target page size");
1205
return false;
1206
}
1207
1208
if (params->max_cpu_throttle < params->cpu_throttle_initial ||
1209
params->max_cpu_throttle > 99) {
1210
- error_setg(errp, "Option max_cpu_throttle expects "
1211
- "an integer in the range of cpu_throttle_initial to 99");
1210
+ error_setg(errp, "Option max-cpu-throttle expects "
1211
+ "an integer in the range of cpu-throttle-initial to 99");
1212
return false;
1213
}
1214
1215
if (params->announce_initial > 100000) {
1216
- error_setg(errp, "Option announce_initial expects "
1216
+ error_setg(errp, "Option announce-initial expects "
1217
"a value between 0 and 100000");
1218
return false;
1219
}
1220
if (params->announce_max > 100000) {
1221
- error_setg(errp, "Option announce_max expects "
1221
+ error_setg(errp, "Option announce-max expects "
1222
"a value between 0 and 100000");
1223
return false;
1224
}
1225
if (params->announce_rounds > 1000) {
1226
- error_setg(errp, "Option announce_rounds expects "
1226
+ error_setg(errp, "Option announce-rounds expects "
1227
"a value between 0 and 1000");
1228
return false;
1229
}
1230
if (params->announce_step < 1 ||
1231
params->announce_step > 10000) {
1232
- error_setg(errp, "Option announce_step expects "
1232
+ error_setg(errp, "Option announce-step expects "
1233
"a value between 0 and 10000");
1234
return false;
1235
}
@@ -1264,7 +1264,7 @@ bool migrate_params_check(MigrationParameters *params, Error **errp)
1264
1265
if (params->vcpu_dirty_limit < 1) {
1266
error_setg(errp,
1267
- "Parameter 'vcpu_dirty_limit' must be greater than 1 MB/s");
1267
+ "Parameter 'vcpu-dirty-limit' must be greater than 1 MB/s");
1268
return false;
1269
}
1270