mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00: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:
committed by
Daniel P. Berrange
parent
e413ae0c04
commit
d8d3c7cc67
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user