chardev: reject use of 'wait' flag for socket client chardevs

This only makes sense conceptually when used with listener chardevs.

Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
Daniel P. Berrangé 2021-02-22 13:47:17 +00:00
parent 445a5b4087
commit 24e13a4dc1
3 changed files with 10 additions and 14 deletions

View File

@ -1339,16 +1339,12 @@ static bool qmp_chardev_validate_socket(ChardevSocket *sock,
return false; return false;
} }
if (sock->has_wait) { if (sock->has_wait) {
warn_report("'wait' option is deprecated with "
"socket in client connect mode");
if (sock->wait) {
error_setg(errp, "%s", error_setg(errp, "%s",
"'wait' option is incompatible with " "'wait' option is incompatible with "
"socket in client connect mode"); "socket in client connect mode");
return false; return false;
} }
} }
}
return true; return true;
} }

View File

@ -228,12 +228,6 @@ Since the ``dirty-bitmaps`` field is optionally present in both the old and
new locations, clients must use introspection to learn where to anticipate new locations, clients must use introspection to learn where to anticipate
the field if/when it does appear in command output. the field if/when it does appear in command output.
chardev client socket with ``wait`` option (since 4.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''''
Character devices creating sockets in client mode should not specify
the 'wait' field, which is only applicable to sockets in server mode
``nbd-server-add`` and ``nbd-server-remove`` (since 5.2) ``nbd-server-add`` and ``nbd-server-remove`` (since 5.2)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''

View File

@ -104,6 +104,12 @@ The ``query-cpus`` command is replaced by the ``query-cpus-fast`` command.
The ``arch`` output member of the ``query-cpus-fast`` command is The ``arch`` output member of the ``query-cpus-fast`` command is
replaced by the ``target`` output member. replaced by the ``target`` output member.
chardev client socket with ``wait`` option (removed in 6.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Character devices creating sockets in client mode should not specify
the 'wait' field, which is only applicable to sockets in server mode
Human Monitor Protocol (HMP) commands Human Monitor Protocol (HMP) commands
------------------------------------- -------------------------------------