提交 4a04cfb0 编写于 作者: M Michael S. Tsirkin

virtio_config: disallow native type fields

Transitional devices should all use __virtioXX types (and __leXX for
fields not present in legacy devices).
Modern ones should use __leXX.
_uXX type would be a bug.
Let's prevent that.
Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
上级 965b5350
......@@ -319,9 +319,8 @@ static inline __virtio64 cpu_to_virtio64(struct virtio_device *vdev, u64 val)
__virtio_pick_type(x, __u8, __u8, \
__virtio_pick_endian(x, __virtio16, __virtio32, __virtio64, \
__virtio_pick_endian(x, __le16, __le32, __le64, \
__virtio_pick_endian(x, __u16, __u32, __u64, \
/* No other type allowed */ \
(void)0)))))
/* No other type allowed */ \
(void)0))))
#endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册