qga: Improve error for guest-set-user-password parameter @crypted
authorMarkus Armbruster <armbru@redhat.com>
Wed, 11 Sep 2024 13:12:06 +0000 (15:12 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 18 Oct 2024 13:03:35 +0000 (15:03 +0200)
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>
Message-ID: <20240911131206.2503035-3-armbru@redhat.com>

include/qapi/qmp/qerror.h
qga/commands-win32.c

index 38e89762b3aa6e925cb5db12f1d6657b7ba8f49e..101c1141b9bc2500d51cceeb5dc941f133929950 100644 (file)
@@ -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 */
index 61b36da4694615a3e7241987a837a942bb1f417f..038beb8cfa92d2f9a22216c8767f773cbcd9b15f 100644 (file)
@@ -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;
     }