On 02/17/2017 01:01 PM, Daniel Henrique Barboza wrote: >>> 2000000)) { >>> + (params->downtime_limit < 0 || >>> + params->downtime_limit > MAX_MIGRATE_SET_DOWNTIME)) { >>> error_setg(errp, QERR_INVALID_PARAMETER_VALUE, >>> "downtime_limit", >>> - "an integer in the range of 0 to 2000000 >>> milliseconds"); >>> + "an integer in the range of 0 to 2000 seconds"); >> Perhaps you could use %d and set MAX_MIGRATE_SET_DOWNTIME to 2000? >> Though perhaps the migration maintainers are okay with the patch as is. > > I did that at first but I got errors on "error_setg" about the extra > parameter.
Ah, right, because QERR_INVALID_PARAMETER_VALUE is a macro that expands to a fixed printf-style format string where you have to know how many exact arguments it further expects. The only way around that is to open-code the error message you want, instead of forcing the use of the awkward macro. -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature