On 9/1/23 15:33, Daniel P. Berrangé wrote:
On Mon, Jan 09, 2023 at 02:56:13PM +0100, Philippe Mathieu-Daudé wrote:
On 9/1/23 14:33, BALATON Zoltan wrote:
On Mon, 9 Jan 2023, Philippe Mathieu-Daudé wrote:
Use the same property name than the TYPE_PFLASH_CFI01 model.
Nothing uses it? Can this break command lines and if so do we need
deprecation or some compatibility function until everybody changed their
usage?
Good point... I missed that :/
How deprecation works in that case, can I simply add an extra
property with DEFINE_PROP_UINT8()? I'm worried about an user
doing:
-device cfi.pflash02,device-width=4,width=2,...
and the processing order of the properties, besides property
overwritten isn't warned to the user.
Correct nothing warns.
Something would need to issue a warning when the deprecated
property is set.
For a one-shot change we could use object_property_add(), having the
setter() displaying the warning.
If this is recurrent, we could add a
object_property_add_deprecated_alias() helper.