diff mbox series

[v2,4/4] hw/core/machine: Officially deprecate the enforce-config-section parameter

Message ID 1537433416-4262-5-git-send-email-thuth@redhat.com
State New
Headers show
Series Deprecation patches net and enforce-config-section | expand

Commit Message

Thomas Huth Sept. 20, 2018, 8:50 a.m. UTC
Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter
to the documentation, including a note that it is deprecated. But it
has never been added to the "Deprecated features" appendix, which is
our official way to deprecate legacy parameters. So let's do this now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 hw/core/machine.c    | 3 +++
 qemu-deprecated.texi | 5 +++++
 2 files changed, 8 insertions(+)

Comments

Markus Armbruster Sept. 20, 2018, 6:13 p.m. UTC | #1
Thomas Huth <thuth@redhat.com> writes:

> Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter
> to the documentation, including a note that it is deprecated. But it
> has never been added to the "Deprecated features" appendix, which is
> our official way to deprecate legacy parameters. So let's do this now.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  hw/core/machine.c    | 3 +++
>  qemu-deprecated.texi | 5 +++++
>  2 files changed, 8 insertions(+)
>
> diff --git a/hw/core/machine.c b/hw/core/machine.c
> index 6b68e12..882e7b4 100644
> --- a/hw/core/machine.c
> +++ b/hw/core/machine.c
> @@ -324,6 +324,9 @@ static void machine_set_enforce_config_section(Object *obj, bool value,
>  {
>      MachineState *ms = MACHINE(obj);
>  
> +    warn_report("enforce-config-section is deprecated. Use "

Comma, please.

> +                "-global migration.send-configuration=on|off instead");
> +
>      ms->enforce_config_section = value;
>  }
>  
> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
> index 23fa78b..f1e807c 100644
> --- a/qemu-deprecated.texi
> +++ b/qemu-deprecated.texi
> @@ -35,6 +35,11 @@ which is the default.
>  
>  @section System emulator command line arguments
>  
> +@subsection -machine enforce-config-section=on|off (since 3.1)
> +
> +The @option{enforce-config-section} parameter is replaced by the
> +@option{-global migration.send-configuration=@var{on|off}} option.
> +
>  @subsection -no-kvm (since 1.3.0)
>  
>  The ``-no-kvm'' argument is now a synonym for setting

You keep the @item enforce-config-section=on|off in qemu-options.hx.
Keeping it until we kill the option parameter is okay, but I'd drop now,
since like to keep all the junk we don't want people to use anymore out
of the first place they look for stuff they can use.
Peter Xu Sept. 21, 2018, 5:30 a.m. UTC | #2
On Thu, Sep 20, 2018 at 10:50:16AM +0200, Thomas Huth wrote:
> Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter
> to the documentation, including a note that it is deprecated. But it
> has never been added to the "Deprecated features" appendix, which is
> our official way to deprecate legacy parameters. So let's do this now.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>

Reviewed-by: Peter Xu <peterx@redhat.com>

Regards,
Thomas Huth Sept. 21, 2018, 8:22 a.m. UTC | #3
On 2018-09-20 20:13, Markus Armbruster wrote:
> Thomas Huth <thuth@redhat.com> writes:
> 
>> Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter
>> to the documentation, including a note that it is deprecated. But it
>> has never been added to the "Deprecated features" appendix, which is
>> our official way to deprecate legacy parameters. So let's do this now.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  hw/core/machine.c    | 3 +++
>>  qemu-deprecated.texi | 5 +++++
>>  2 files changed, 8 insertions(+)
>>
>> diff --git a/hw/core/machine.c b/hw/core/machine.c
>> index 6b68e12..882e7b4 100644
>> --- a/hw/core/machine.c
>> +++ b/hw/core/machine.c
>> @@ -324,6 +324,9 @@ static void machine_set_enforce_config_section(Object *obj, bool value,
>>  {
>>      MachineState *ms = MACHINE(obj);
>>  
>> +    warn_report("enforce-config-section is deprecated. Use "
> 
> Comma, please.

Sure, I'll change it.

>> +                "-global migration.send-configuration=on|off instead");
>> +
>>      ms->enforce_config_section = value;
>>  }
>>  
>> diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
>> index 23fa78b..f1e807c 100644
>> --- a/qemu-deprecated.texi
>> +++ b/qemu-deprecated.texi
>> @@ -35,6 +35,11 @@ which is the default.
>>  
>>  @section System emulator command line arguments
>>  
>> +@subsection -machine enforce-config-section=on|off (since 3.1)
>> +
>> +The @option{enforce-config-section} parameter is replaced by the
>> +@option{-global migration.send-configuration=@var{on|off}} option.
>> +
>>  @subsection -no-kvm (since 1.3.0)
>>  
>>  The ``-no-kvm'' argument is now a synonym for setting
> 
> You keep the @item enforce-config-section=on|off in qemu-options.hx.
> Keeping it until we kill the option parameter is okay, but I'd drop now,
> since like to keep all the junk we don't want people to use anymore out
> of the first place they look for stuff they can use.

The text from 16f7244842b5135543ef06 also contains the hint what should
be used instead, so I think it's ok if we keep it until the option gets
removed completely - and that's also the way we did it so far with all
other deprecated options.

 Thomas
diff mbox series

Patch

diff --git a/hw/core/machine.c b/hw/core/machine.c
index 6b68e12..882e7b4 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -324,6 +324,9 @@  static void machine_set_enforce_config_section(Object *obj, bool value,
 {
     MachineState *ms = MACHINE(obj);
 
+    warn_report("enforce-config-section is deprecated. Use "
+                "-global migration.send-configuration=on|off instead");
+
     ms->enforce_config_section = value;
 }
 
diff --git a/qemu-deprecated.texi b/qemu-deprecated.texi
index 23fa78b..f1e807c 100644
--- a/qemu-deprecated.texi
+++ b/qemu-deprecated.texi
@@ -35,6 +35,11 @@  which is the default.
 
 @section System emulator command line arguments
 
+@subsection -machine enforce-config-section=on|off (since 3.1)
+
+The @option{enforce-config-section} parameter is replaced by the
+@option{-global migration.send-configuration=@var{on|off}} option.
+
 @subsection -no-kvm (since 1.3.0)
 
 The ``-no-kvm'' argument is now a synonym for setting