[Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.

Thomas Huth posted 1 patch 6 years, 11 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/1493107736-6608-1-git-send-email-thuth@redhat.com
Test checkpatch passed
Test docker passed
Test s390x passed
There is a newer version of this series
vl.c | 2 ++
1 file changed, 2 insertions(+)
[Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.
Posted by Thomas Huth 6 years, 11 months ago
If the user needs to specify the disk geometry, the corresponding
parameters of the "-drive" option should be used instead. "-hdachs"
is considered as deprecated and might be removed soon.

Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 vl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/vl.c b/vl.c
index 0b4ed52..0980213 100644
--- a/vl.c
+++ b/vl.c
@@ -3230,6 +3230,8 @@ int main(int argc, char **argv, char **envp)
                         }
                     }
                 }
+                error_report("'-hdachs' is deprecated. Please use '-drive"
+                             " ...,cyls=c,heads=h,secs=s,trans=t' instead.");
                 break;
             case QEMU_OPTION_numa:
                 opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
-- 
1.8.3.1


Re: [Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.
Posted by Eric Blake 6 years, 11 months ago
On 04/25/2017 03:08 AM, Thomas Huth wrote:
> If the user needs to specify the disk geometry, the corresponding
> parameters of the "-drive" option should be used instead. "-hdachs"
> is considered as deprecated and might be removed soon.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  vl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/vl.c b/vl.c
> index 0b4ed52..0980213 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3230,6 +3230,8 @@ int main(int argc, char **argv, char **envp)
>                          }
>                      }
>                  }
> +                error_report("'-hdachs' is deprecated. Please use '-drive"
> +                             " ...,cyls=c,heads=h,secs=s,trans=t' instead.");

No trailing dot.  With that fixed,
Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Re: [Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.
Posted by Paolo Bonzini 6 years, 11 months ago

On 25/04/2017 10:08, Thomas Huth wrote:
> If the user needs to specify the disk geometry, the corresponding
> parameters of the "-drive" option should be used instead. "-hdachs"
> is considered as deprecated and might be removed soon.
> 
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
>  vl.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/vl.c b/vl.c
> index 0b4ed52..0980213 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3230,6 +3230,8 @@ int main(int argc, char **argv, char **envp)
>                          }
>                      }
>                  }
> +                error_report("'-hdachs' is deprecated. Please use '-drive"
> +                             " ...,cyls=c,heads=h,secs=s,trans=t' instead.");
>                  break;
>              case QEMU_OPTION_numa:
>                  opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
> 

Not even this, which should also be deprecated; please suggest using
"-device ide-hd" instead.

Paolo

Re: [Qemu-devel] [PATCH] Issue a deprecation warning if the user specifies the "-hdachs" option.
Posted by Thomas Huth 6 years, 11 months ago
On 26.04.2017 15:44, Paolo Bonzini wrote:
> 
> 
> On 25/04/2017 10:08, Thomas Huth wrote:
>> If the user needs to specify the disk geometry, the corresponding
>> parameters of the "-drive" option should be used instead. "-hdachs"
>> is considered as deprecated and might be removed soon.
>>
>> Signed-off-by: Thomas Huth <thuth@redhat.com>
>> ---
>>  vl.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/vl.c b/vl.c
>> index 0b4ed52..0980213 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -3230,6 +3230,8 @@ int main(int argc, char **argv, char **envp)
>>                          }
>>                      }
>>                  }
>> +                error_report("'-hdachs' is deprecated. Please use '-drive"
>> +                             " ...,cyls=c,heads=h,secs=s,trans=t' instead.");
>>                  break;
>>              case QEMU_OPTION_numa:
>>                  opts = qemu_opts_parse_noisily(qemu_find_opts("numa"),
>>
> 
> Not even this, which should also be deprecated; please suggest using
> "-device ide-hd" instead.

D'oh, you're right, of course ... I'll send a v3 ...

 Thomas