Daniel P. Berrangé <[email protected]> writes:
> On Thu, Nov 12, 2026 at 08:44:28AM +0100, Markus Armbruster wrote:
>> Daniel P. Berrangé <[email protected]> writes:
[...]
>> > as a separate patch I might suggest
[...]
>> > so that we get the nicer message:
>> >
>> > $ ./build/qemu-system-x86_64 -object memory-backend-ram,size=0,id=foo
>> > qemu-system-x86_64: cannot create 'memory-backend-ram' with a size of 0
>>
>> Your message assumes that the property is only ever set on behalf of an
>> object creation request. Not true in general, qom-set exists. I
>> believe it's true here due to the host_memory_backend_mr_inited() guard.
>> But that's not entirely obvious, isn't it?
>>
>> Possible phrasings that don't assume this:
>>
>> property 'size' of 'memory-backend-ram' cannot be zero
>> cannot set property 'size' of 'memory-backend-ram' to zero
>>
>> Is one of them good enough? I doubt this error is common.
>
> I'm fine with either of those, perhaps mildly leaning towards
> the second.
>
>> There are enough "doesn't take value" error messages elsewhere to
>> justify a small series of its own.
Just posted:
From: Markus Armbruster <[email protected]>
Subject: [PATCH] error: Improve a few error messages on setting property to
zero
Date: Thu, 12 Nov 2026 12:47:02 +0100
Message-ID: <[email protected]>