pub(crate) fn alloc_clusters<D, T>(
        &mut self,
        controller: &mut Controller<D, T>,
        mut prev_cluster: Option<Cluster>,
        mut clusters_to_alloc: u32,
        zero: bool,
    ) -> Result<(), Error<D::Error>>
    where
        D: BlockDevice,
        T: TimeSource,
    {
        while clusters_to_alloc > 0 {
            debug!("Allocating clusters, left={:?}", clusters_to_alloc);
            let new_cluster = self.alloc_cluster(controller, prev_cluster, zero)?;
            prev_cluster = Some(new_cluster);
            clusters_to_alloc -= 1;
        }
        Ok(())
    }
/// Tries to allocate a chain of clusters
Tries to allocate a chain of clusters
Tries to allocate a chain of clusters
pub(crate) fn alloc_clusters<D, T>(
        &mut self,
        controller: &mut Controller<D, T>,
        mut prev_cluster: Option<Cluster>,
        mut clusters_to_alloc: u32,
        zero: bool,
    ) -> Result<(), Error<D::Error>>
    where
        D: BlockDevice,
        T: TimeSource,
    {
        while clusters_to_alloc > 0 {
            debug!("Allocating clusters, left={:?}", clusters_to_alloc);
            let new_cluster = self.alloc_cluster(controller, prev_cluster, zero)?;
            prev_cluster = Some(new_cluster);
            clusters_to_alloc -= 1;
        }
        Ok(())
    }
pub ( crate ) fn alloc_clusters < D , T > ( & mut self , controller : & mut Controller < D , T > , mut prev_cluster : Option < Cluster > , mut clusters_to_alloc : u32 , zero : bool , ) -> Result < ( ) , Error < D :: Error > > where D : BlockDevice , T : TimeSource , { while clusters_to_alloc > 0 { debug ! ( " " clusters_to_alloc ) ; let new_cluster = self . alloc_cluster ( controller , prev_cluster , zero ) ? ; prev_cluster = Some ( new_cluster ) ; clusters_to_alloc -= 1 ; } Ok ( ( ) ) }
Tries to allocate a chain of clusters
Tries to allocate a chain of clusters
&mut self
controller
&mut Controller<D, T>
prev_cluster
Option<Cluster>
clusters_to_alloc
u32
zero
bool
&mut self
controller
&mut Controller<D, T>
prev_cluster
Option<Cluster>
clusters_to_alloc
u32
zero
bool