diff mbox series

[2/2] qga: Improve error for guest-set-user-password parameter @crypted

Message ID 20240911131206.2503035-3-armbru@redhat.com (mailing list archive)
State New, archived
Headers show
Series Finish eliminating QERR_UNSUPPORTED | expand

Commit Message

Markus Armbruster Sept. 11, 2024, 1:12 p.m. UTC
The Windows version of guest-set-user-password rejects argument
"crypted": true with the rather useless "this feature or command is
not currently supported".  Improve to "'crypted' must be off on this
host".

QERR_UNSUPPORTED is now unused.  Drop.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 include/qapi/qmp/qerror.h | 3 ---
 qga/commands-win32.c      | 2 +-
 2 files changed, 1 insertion(+), 4 deletions(-)

Comments

Philippe Mathieu-Daudé Sept. 11, 2024, 3:13 p.m. UTC | #1
On 11/9/24 15:12, Markus Armbruster wrote:
> The Windows version of guest-set-user-password rejects argument
> "crypted": true with the rather useless "this feature or command is
> not currently supported".  Improve to "'crypted' must be off on this
> host".
> 
> QERR_UNSUPPORTED is now unused.  Drop.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   include/qapi/qmp/qerror.h | 3 ---
>   qga/commands-win32.c      | 2 +-
>   2 files changed, 1 insertion(+), 4 deletions(-)

\o/

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Konstantin Kostiuk Sept. 12, 2024, 7:55 a.m. UTC | #2
Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

On Wed, Sep 11, 2024 at 4:12 PM Markus Armbruster <armbru@redhat.com> wrote:

> The Windows version of guest-set-user-password rejects argument
> "crypted": true with the rather useless "this feature or command is
> not currently supported".  Improve to "'crypted' must be off on this
> host".
>
> QERR_UNSUPPORTED is now unused.  Drop.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  include/qapi/qmp/qerror.h | 3 ---
>  qga/commands-win32.c      | 2 +-
>  2 files changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
> index 38e89762b3..101c1141b9 100644
> --- a/include/qapi/qmp/qerror.h
> +++ b/include/qapi/qmp/qerror.h
> @@ -26,7 +26,4 @@
>  #define QERR_PROPERTY_VALUE_OUT_OF_RANGE \
>      "Property %s.%s doesn't take value %" PRId64 " (minimum: %" PRId64 ",
> maximum: %" PRId64 ")"
>
> -#define QERR_UNSUPPORTED \
> -    "this feature or command is not currently supported"
> -
>  #endif /* QERROR_H */
> diff --git a/qga/commands-win32.c b/qga/commands-win32.c
> index 61b36da469..038beb8cfa 100644
> --- a/qga/commands-win32.c
> +++ b/qga/commands-win32.c
> @@ -1914,7 +1914,7 @@ void qmp_guest_set_user_password(const char
> *username,
>      GError *gerr = NULL;
>
>      if (crypted) {
> -        error_setg(errp, QERR_UNSUPPORTED);
> +        error_setg(errp, "'crypted' must be off on this host");
>          return;
>      }
>
> --
> 2.46.0
>
>
diff mbox series

Patch

diff --git a/include/qapi/qmp/qerror.h b/include/qapi/qmp/qerror.h
index 38e89762b3..101c1141b9 100644
--- a/include/qapi/qmp/qerror.h
+++ b/include/qapi/qmp/qerror.h
@@ -26,7 +26,4 @@ 
 #define QERR_PROPERTY_VALUE_OUT_OF_RANGE \
     "Property %s.%s doesn't take value %" PRId64 " (minimum: %" PRId64 ", maximum: %" PRId64 ")"
 
-#define QERR_UNSUPPORTED \
-    "this feature or command is not currently supported"
-
 #endif /* QERROR_H */
diff --git a/qga/commands-win32.c b/qga/commands-win32.c
index 61b36da469..038beb8cfa 100644
--- a/qga/commands-win32.c
+++ b/qga/commands-win32.c
@@ -1914,7 +1914,7 @@  void qmp_guest_set_user_password(const char *username,
     GError *gerr = NULL;
 
     if (crypted) {
-        error_setg(errp, QERR_UNSUPPORTED);
+        error_setg(errp, "'crypted' must be off on this host");
         return;
     }