mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
qemu-sockets: introduce socket_address_parse_named_fd()
Add function that transforms named fd inside SocketAddress structure into number representation. This way it may be then used in a context where current monitor is not available. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Message-Id: <20210610100802.5888-6-vsementsov@virtuozzo.com> Reviewed-by: Eric Blake <eblake@redhat.com> [eblake: comment tweak] Signed-off-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
fb392b548e
commit
c542370418
2 changed files with 30 additions and 0 deletions
|
@ -111,4 +111,15 @@ SocketAddress *socket_remote_address(int fd, Error **errp);
|
|||
*/
|
||||
SocketAddress *socket_address_flatten(SocketAddressLegacy *addr);
|
||||
|
||||
/**
|
||||
* socket_address_parse_named_fd:
|
||||
*
|
||||
* Modify @addr, replacing a named fd by its corresponding number.
|
||||
* Needed for callers that plan to pass @addr to a context where the
|
||||
* current monitor is not available.
|
||||
*
|
||||
* Return 0 on success.
|
||||
*/
|
||||
int socket_address_parse_named_fd(SocketAddress *addr, Error **errp);
|
||||
|
||||
#endif /* QEMU_SOCKETS_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue