/// Define that a new partition table will be written to this device.
Define that a new partition table will be written to this device.
Define that a new partition table will be written to this device .
pub fn create_table(
        &mut self,
        entity: DeviceEntity,
        kind: PartitionTable,
    ) -> Result<(), Error> {
        self.assert_not_creating_partition_on(entity);
        if !self.entities.devices[entity].contains(EntityFlags::SUPPORTS_TABLE) {
            return Err(Error::TablesUnsupported);
        }
        self.components.queued_changes.tables.insert(entity, kind);
        self.entities.devices[entity] |= EntityFlags::CREATE;
        self.flags |= ManagerFlags::CREATE;
        // Mark this device to be wiped, and its children freed.
        self.remove(entity);
        Ok(())
    }
pub fn create_table ( & mut self , entity : DeviceEntity , kind : PartitionTable , ) -> Result < ( ) , Error > { self . assert_not_creating_partition_on ( entity ) ; if ! self . entities . devices [ entity ] . contains ( EntityFlags :: SUPPORTS_TABLE ) { return Err ( Error :: TablesUnsupported ) ; } self . components . queued_changes . tables . insert ( entity , kind ) ; self . entities . devices [ entity ] |= EntityFlags :: CREATE ; self . flags |= ManagerFlags :: CREATE ; // Mark this device to be wiped, and its children freed. self . remove ( entity ) ; Ok ( ( ) ) }
Define that a new partition table will be written to this device.
Define that a new partition table will be written to this device .
&mut self
entity
DeviceEntity
kind
PartitionTable