mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
io: Introduce a qio_channel_set_feature() helper
Testing QIOChannel feature support can be done with a helper called qio_channel_has_feature(). Setting feature support, however, was done manually with a logical OR. This patch introduces a new helper called qio_channel_set_feature() and makes use of it where applicable. Signed-off-by: Felipe Franciosi <felipe@nutanix.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
parent
e413ae0c04
commit
d8d3c7cc67
5 changed files with 24 additions and 6 deletions
|
@ -30,6 +30,13 @@ bool qio_channel_has_feature(QIOChannel *ioc,
|
|||
}
|
||||
|
||||
|
||||
void qio_channel_set_feature(QIOChannel *ioc,
|
||||
QIOChannelFeature feature)
|
||||
{
|
||||
ioc->features |= (1 << feature);
|
||||
}
|
||||
|
||||
|
||||
ssize_t qio_channel_readv_full(QIOChannel *ioc,
|
||||
const struct iovec *iov,
|
||||
size_t niov,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue