Closed lauralt closed 3 years ago
@jiangliu was there any other concern regarding #104 besides the Clone
and PartialEq
implementations?
I've noticed in vfio_ioctls
the following structure:
struct vfio_region_info_with_cap {
region_info: vfio_region_info,
cap_info: __IncompleteArrayField<u8>,
}
which can be somehow seen as a fam
struct even though the entries length is based on the region_info
fields.
generate_fam_struct_impl
indeed won't work for a structure that doesn't contain its own len
field, but I don't think fixing this should be part of #104 since that macro is somehow of a helper (and I guess FamStruct
can be implemented for the above structure as well). What do you think?
@jiangliu was there any other concern regarding #104 besides the
Clone
andPartialEq
implementations? I've noticed invfio_ioctls
the following structure:struct vfio_region_info_with_cap { region_info: vfio_region_info, cap_info: __IncompleteArrayField<u8>, }
which can be somehow seen as a
fam
struct even though the entries length is based on theregion_info
fields.
generate_fam_struct_impl
indeed won't work for a structure that doesn't contain its ownlen
field, but I don't think fixing this should be part of #104 since that macro is somehow of a helper (and I guessFamStruct
can be implemented for the above structure as well). What do you think?
When I was working on vfio-ioctls, I investigated the way to use generate_fam_struct_impl. But seems it's a little complex, so maybe it's ok to keep the hand-writing version for vfio-ioctls.
85, #99, #104