|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [PATCH v2 01/21] hw/block: Rename TYPE_PFLASH_CFI02 'width' property as 'device-width' |
Date: | Mon, 9 Jan 2023 16:17:33 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.6.1 |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |