fn new(id: u32) -> Result<Self> {
        let group = Self::open_group_file(id)?;
        let mut group_status = vfio_group_status {
            argsz: mem::size_of::<vfio_group_status>() as u32,
            flags: 0,
        };
        vfio_syscall::get_group_status(&group, &mut group_status)?;
        if group_status.flags != VFIO_GROUP_FLAGS_VIABLE {
            return Err(VfioError::GroupViable);
        }

        Ok(VfioGroup { id, group })
    }
/// Create a new VfioGroup object.
///
/// # Parameters
/// * `id`: ID(index) of the VFIO group file.
Create a new VfioGroup object.
Create a new VfioGroup object .
fn new(id: u32) -> Result<Self> {
        let group = Self::open_group_file(id)?;
        let mut group_status = vfio_group_status {
            argsz: mem::size_of::<vfio_group_status>() as u32,
            flags: 0,
        };
        vfio_syscall::get_group_status(&group, &mut group_status)?;
        if group_status.flags != VFIO_GROUP_FLAGS_VIABLE {
            return Err(VfioError::GroupViable);
        }
        Ok(VfioGroup { id, group })
    }
fn new ( id : u32 ) -> Result < Self > { let group = Self :: open_group_file ( id ) ? ; let mut group_status = vfio_group_status { argsz : mem :: size_of :: < vfio_group_status > ( ) as u32 , flags : 0 , } ; vfio_syscall :: get_group_status ( & group , & mut group_status ) ? ; if group_status . flags != VFIO_GROUP_FLAGS_VIABLE { return Err ( VfioError :: GroupViable ) ; } Ok ( VfioGroup { id , group } ) }
Create a new VfioGroup object.
Create a new VfioGroup object .
id
u32