qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED
@ 2024-09-11 13:12 Markus Armbruster
  2024-09-11 13:12 ` [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors Markus Armbruster
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Markus Armbruster @ 2024-09-11 13:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: kkostiuk, michael.roth, eblake, philmd

Markus Armbruster (2):
  qga/qapi-schema: Drop obsolete note on "unsupported" errors
  qga: Improve error for guest-set-user-password parameter @crypted

 qga/qapi-schema.json      | 9 ---------
 include/qapi/qmp/qerror.h | 3 ---
 qga/commands-win32.c      | 2 +-
 3 files changed, 1 insertion(+), 13 deletions(-)

-- 
2.46.0



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors
  2024-09-11 13:12 [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster
@ 2024-09-11 13:12 ` Markus Armbruster
  2024-09-12  7:55   ` Konstantin Kostiuk
  2024-09-11 13:12 ` [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted Markus Armbruster
  2024-10-02  7:48 ` [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster
  2 siblings, 1 reply; 7+ messages in thread
From: Markus Armbruster @ 2024-09-11 13:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: kkostiuk, michael.roth, eblake, philmd

The note talks about "unsupported" errors and QERR_UNSUPPORTED.  The
former is vague, and the latter makes sense only in C, not in external
interface documentation.  Fortunately, we don't have to address this
anymore: recent merge commit 3b5efc553eb got rid of these errors.
Delete the note.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 qga/qapi-schema.json | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
index 495706cf73..0537bb7886 100644
--- a/qga/qapi-schema.json
+++ b/qga/qapi-schema.json
@@ -1,15 +1,6 @@
 # *-*- Mode: Python -*-*
 # vim: filetype=python
 
-##
-# = General note concerning the use of guest agent interfaces
-#
-# "unsupported" is a higher-level error than the errors that
-# individual commands might document.  The caller should always be
-# prepared to receive QERR_UNSUPPORTED, even if the given command
-# doesn't specify it, or doesn't document any failure mode at all.
-##
-
 ##
 # = QEMU guest agent protocol commands and structs
 ##
-- 
2.46.0



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted
  2024-09-11 13:12 [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster
  2024-09-11 13:12 ` [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors Markus Armbruster
@ 2024-09-11 13:12 ` Markus Armbruster
  2024-09-11 15:13   ` Philippe Mathieu-Daudé
  2024-09-12  7:55   ` Konstantin Kostiuk
  2024-10-02  7:48 ` [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster
  2 siblings, 2 replies; 7+ messages in thread
From: Markus Armbruster @ 2024-09-11 13:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: kkostiuk, michael.roth, eblake, philmd

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



^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted
  2024-09-11 13:12 ` [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted Markus Armbruster
@ 2024-09-11 15:13   ` Philippe Mathieu-Daudé
  2024-09-12  7:55   ` Konstantin Kostiuk
  1 sibling, 0 replies; 7+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-09-11 15:13 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel; +Cc: kkostiuk, michael.roth, eblake

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>



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors
  2024-09-11 13:12 ` [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors Markus Armbruster
@ 2024-09-12  7:55   ` Konstantin Kostiuk
  0 siblings, 0 replies; 7+ messages in thread
From: Konstantin Kostiuk @ 2024-09-12  7:55 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, michael.roth, eblake, philmd

[-- Attachment #1: Type: text/plain, Size: 1286 bytes --]

Reviewed-by: Konstantin Kostiuk <kkostiuk@redhat.com>

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

> The note talks about "unsupported" errors and QERR_UNSUPPORTED.  The
> former is vague, and the latter makes sense only in C, not in external
> interface documentation.  Fortunately, we don't have to address this
> anymore: recent merge commit 3b5efc553eb got rid of these errors.
> Delete the note.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  qga/qapi-schema.json | 9 ---------
>  1 file changed, 9 deletions(-)
>
> diff --git a/qga/qapi-schema.json b/qga/qapi-schema.json
> index 495706cf73..0537bb7886 100644
> --- a/qga/qapi-schema.json
> +++ b/qga/qapi-schema.json
> @@ -1,15 +1,6 @@
>  # *-*- Mode: Python -*-*
>  # vim: filetype=python
>
> -##
> -# = General note concerning the use of guest agent interfaces
> -#
> -# "unsupported" is a higher-level error than the errors that
> -# individual commands might document.  The caller should always be
> -# prepared to receive QERR_UNSUPPORTED, even if the given command
> -# doesn't specify it, or doesn't document any failure mode at all.
> -##
> -
>  ##
>  # = QEMU guest agent protocol commands and structs
>  ##
> --
> 2.46.0
>
>

[-- Attachment #2: Type: text/html, Size: 1795 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted
  2024-09-11 13:12 ` [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted Markus Armbruster
  2024-09-11 15:13   ` Philippe Mathieu-Daudé
@ 2024-09-12  7:55   ` Konstantin Kostiuk
  1 sibling, 0 replies; 7+ messages in thread
From: Konstantin Kostiuk @ 2024-09-12  7:55 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: qemu-devel, michael.roth, eblake, philmd

[-- Attachment #1: Type: text/plain, Size: 1545 bytes --]

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
>
>

[-- Attachment #2: Type: text/html, Size: 2170 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED
  2024-09-11 13:12 [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster
  2024-09-11 13:12 ` [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors Markus Armbruster
  2024-09-11 13:12 ` [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted Markus Armbruster
@ 2024-10-02  7:48 ` Markus Armbruster
  2 siblings, 0 replies; 7+ messages in thread
From: Markus Armbruster @ 2024-10-02  7:48 UTC (permalink / raw)
  To: qemu-devel; +Cc: kkostiuk, michael.roth, eblake, philmd

Queued.



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-10-02  7:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-11 13:12 [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster
2024-09-11 13:12 ` [PATCH 1/2] qga/qapi-schema: Drop obsolete note on "unsupported" errors Markus Armbruster
2024-09-12  7:55   ` Konstantin Kostiuk
2024-09-11 13:12 ` [PATCH 2/2] qga: Improve error for guest-set-user-password parameter @crypted Markus Armbruster
2024-09-11 15:13   ` Philippe Mathieu-Daudé
2024-09-12  7:55   ` Konstantin Kostiuk
2024-10-02  7:48 ` [PATCH 0/2] Finish eliminating QERR_UNSUPPORTED Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).