亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fat.cxx

?? EFI(Extensible Firmware Interface)是下一代BIOS
?? CXX
?? 第 1 頁(yè) / 共 2 頁(yè)
字號(hào):
Return Value:

    The cluster number of the 'Index'th cluster in the cluster chain
    beginning with cluster 'StartingCluster' or 0.

--*/
{
    for (; Index; Index--) {

        if (!IsInRange(StartingCluster)) {
            return 0;
        }

        StartingCluster = QueryEntry(StartingCluster);
    }

    return StartingCluster;
}


UFAT_EXPORT
ULONG
FAT::QueryLengthOfChain(
    IN  ULONG    StartingCluster,
    OUT PULONG   LastCluster
    ) CONST
/*++

Routine Description:

    This routine computes the length of a cluster chain given the number
    of its first cluster.

    This routine depends on the chain being valid.  In particular, if the
    chain contains any cycles then this routine will not finish.  The
    routine 'ScrubChain' will turn an invalid chain into a valid one.

Arguments:

    StartingCluster - Supplies the first cluster of a cluster chain.
    LastCluster     - Returns the number of the last cluster in the chain.

Return Value:

    The length of the cluster chain beginning with 'StartingCluster'.

--*/
{
    ULONG    length;

    if (!StartingCluster) {
        if (LastCluster) {
            *LastCluster = 0;
        }
        return 0;
    }

    for (length = 1; IsInRange(StartingCluster) && !IsEndOfChain(StartingCluster); length++) {
        StartingCluster = QueryEntry(StartingCluster);
    }

    if (LastCluster) {
        *LastCluster = StartingCluster;
    }

    return length;
}


ULONG
FAT::QueryLengthOfChain(
    IN  ULONG    StartingCluster,
    IN  ULONG    EndingCluster
    ) CONST
/*++

Routine Description:

    This routine computes the length of a cluster chain given the number
    of its first cluster and the number of its last cluster.  To compute
    the length of a chain which is terminated by "end of chain", see
    the one parameter version of this routine above.  If 'EndingCluster'
    is not a member of the chain beginning with 'StartingCluster' then
    this routine will return 0.

    This routine depends on the chain being valid.

Arguments:

    StartingCluster - Supplies the first cluster of the cluster chain.
    EndingCluster   - Supplies the last cluster of the cluster chain.

Return Value:

    The length of the cluster chain beginning with 'StartingCluster' and
    ending with 'EndingCluster' or 0.

--*/
{
    ULONG    length;

    if (!StartingCluster) {
        return 0;
    }

    for (length = 1; StartingCluster != EndingCluster &&
                     !IsEndOfChain(StartingCluster); length++) {
        StartingCluster = QueryEntry(StartingCluster);
    }

    return StartingCluster == EndingCluster ? length : 0;
}


ULONG
FAT::QueryPrevious(
    IN  ULONG    Cluster
    ) CONST
/*++

Routine Description:

    Obtains the previous cluster in a chain, i.e. the cluster that
    references the given cluster.

Arguments:

    Cluster -   Supplies the cluster whose predecesor we're looking for.

Return Value:

    The predecesor of the given cluster. 0 if there is no predecesor.

--*/

{
    ULONG    i;

    DebugAssert( Cluster );

    if ( !IsClusterFree( Cluster ) ) {
        for (i = FirstDiskCluster; IsInRange(i); i++) {
            if ( QueryEntry(i) == Cluster ) {
                return i;
            }
        }
    }

    return 0;
}


VOID
FAT::Scrub(
    OUT PBOOLEAN    ChangesMade
    )
/*++

Routine Description:

    This routine goes through all of the FAT entries changing invalid values
    to reasonable values for the purposes of CHKDSK.

    Illegal FAT entries are those that are set out of disk range and that
    are not magic values.  This routine will set all illegal FAT entries to
    the "end of chain" magic value.

Arguments:

    ChangesMade - Returns TRUE if any changes were made to the FAT.

Return Value:

    None.

--*/
{
    ULONG    i;

    if (ChangesMade) {
        *ChangesMade = FALSE;
    }

    for (i = FirstDiskCluster; IsInRange(i); i++) {
        if (!IsInRange(QueryEntry(i)) &&
            !IsClusterFree(i) &&
            !IsEndOfChain(i) &&
            !IsClusterBad(i) &&
            !IsClusterReserved(i)) {

            SetEndOfChain(i);

            if (ChangesMade) {
                *ChangesMade = TRUE;
            }
        }
    }
}


VOID
FAT::ScrubChain(
    IN      ULONG        StartingCluster,
    OUT     PBOOLEAN     ChangesMade
    )
/*++

Routine Description:

    This routine goes through all of the FAT entries in the chain beginning
    with cluster 'StartingCluster'.  It is expected that all of the entries
    in this chain point to valid clusters on the disk.  This routine will
    mark the first invalid entry, if any, as the final cluster of the chain
    thus transforming the invalid chain into a valid one.

Arguments:

    StartingCluster - Supplies the first cluster of the chain to
                      scrub.
    ChangesMade     - Returns TRUE if changes were made to correct
                      the chain.

Return Value:

    None.

--*/
{
    ULONG    clus, next;

    DebugAssert(IsInRange(StartingCluster));
    DebugAssert(ChangesMade);

    *ChangesMade = FALSE;

    clus = StartingCluster;
    while (!IsEndOfChain(clus)) {

        next = QueryEntry(clus);
        if (!IsInRange(next) || IsClusterFree(next)) {
            SetEndOfChain(clus);
            *ChangesMade = TRUE;
            return;
        }

        clus = next;
    }
}


VOID
FAT::ScrubChain(
    IN      ULONG       StartingCluster,
    OUT     PBITVECTOR  FatBitMap,
    OUT     PBOOLEAN    ChangesMade,
    OUT     PBOOLEAN    CrossLinkDetected,
    OUT     PULONG      CrossLinkPreviousCluster
    )
/*++

Routine Description:

    This routine goes through all of the FAT entries in the chain beginning
    with cluster 'StartingCluster'.  It is expected that all of the entries
    in this chain point to valid clusters on the disk.  This routine will
    mark the first invalid entry, if any, as the final cluster of the chain
    thus transforming the invalid chain into a valid one.

    This routine will also eliminate any cycles in the cluster chain as well
    as detect cross-links.

Arguments:

    StartingCluster             - Supplies the first cluster of the chain to
                                    scrub.
    UsedClusters                - Supplies a bitvector marking all used
                                    clusters.
    ChangesMade                 - Returns TRUE if changes were made to correct
                                    the chain.
    CrossLinkDetected           - Returns TRUE if a cluster in the chain was
                                    already claimed in the 'FatBitMap'.
    CrossLinkPreviousCluster    - Returns the cluster number previous to the
                                    cross linked cluster number or 0 if the
                                    cross linked cluster number was the first
                                    in the chain.

Return Value:

    None.

--*/
{
    ULONG    clus, next;

    DebugAssert(IsInRange(StartingCluster));
    DebugAssert(ChangesMade);
    DebugAssert(CrossLinkDetected);
    DebugAssert(CrossLinkPreviousCluster);

    *ChangesMade = FALSE;
    *CrossLinkDetected = FALSE;

    if (FatBitMap->IsBitSet(StartingCluster)) {
        *CrossLinkDetected = TRUE;
        *CrossLinkPreviousCluster = 0;
        return;
    }

    clus = StartingCluster;
    while (!IsEndOfChain(clus)) {

        FatBitMap->SetBit(clus);

        next = QueryEntry(clus);
        if (!IsInRange(next) || IsClusterFree(next)) {
            SetEndOfChain(clus);
            *ChangesMade = TRUE;
            return;
        }

        if (FatBitMap->IsBitSet(next)) {

            if (clus == next) {       // Cluster points to itself.
                *ChangesMade = TRUE;
                SetEndOfChain(clus);
                return;
            }

            while (StartingCluster != clus) {

                if (StartingCluster == next) { // Cluster points to previous.
                    *ChangesMade = TRUE;
                    SetEndOfChain(clus);
                    return;
                }

                StartingCluster = QueryEntry(StartingCluster);
            }

            // Otherwise it's a cross link, not a cycle.

            *CrossLinkDetected = TRUE;
            *CrossLinkPreviousCluster = clus;
            return;
        }

        clus = next;
    }

    FatBitMap->SetBit(clus);
}

NONVIRTUAL
BOOLEAN
FAT::IsValidChain(
    IN  ULONG    StartingCluster
    ) CONST
/*++

Routine Description:

    This method determines whether the chain is valid, ie. that it
    consists of a chain of valid cluster numbers ending with an end
    of chain entry.

Arguments:

    StartingCluster - Supplies the first cluster of the chain.

Return Value:

    TRUE if the chain is valid.

--*/
{
    ULONG    current;
    ULONG    clusters_in_chain = 0;

    current = StartingCluster;

    for( ;; ) {

        if (!IsInRange(current) ||
            clusters_in_chain++ > _num_entries ) {

            // Either a bad entry or an infinite loop detected.
            //
            return FALSE;
        }

        if (IsEndOfChain(current)) {
            break;
        }

        current = QueryEntry(current);
    }

    return TRUE;
}


UFAT_EXPORT
ULONG
FAT::AllocChain(
    IN  ULONG    Length,
    OUT PULONG   LastCluster
    )
/*++

Routine Description:

    This routine attempts to allocate a chain of length 'Length' from the
    FAT.  If this routine is successful it will return the cluster number
    of the beginning of the chain.  Upon failure this routine will return
    0 and will make no changes to the FAT.

Arguments:

    Length      - Supplies the length of the chain desired.
    LastCluster - Returns the last cluster of the allocated chain.

Return Value:

    The cluster number of the beginning of the allocated chain or 0.

--*/
{
    ULONG    i, j;
    ULONG    start;
    ULONG    prev;

    if (!Length) {
        return 0;
    }

    start = 0;
    prev = 0;
    for (i = FirstDiskCluster; IsInRange(i); i++) {
        if (IsClusterFree(i)) {
            if (!start) {
                start = i;
            } else {
                SetEntry(prev, i);
            }
            prev = i;
            Length--;
            if (!Length) {
                SetEndOfChain(i);

                if (LastCluster) {
                    *LastCluster = i;
                }

                return start;
            }
        }
    }

    // There is not enough disk space for the chain so free what was taken.
    for (i = start; i != prev; ) {
        j = QueryEntry(i);
        SetClusterFree(i);
        i = j;
    }

    return 0;
}


ULONG
FAT::ReAllocChain(
    IN  ULONG    StartOfChain,
    IN  ULONG    NewLength,
    OUT PULONG   LastCluster
    )
/*++

Routine Description:

    This routine insures that the cluster chain beginning at cluster
    'StartOfChain' is of length greater than or equal to 'NewSize'.
    If it is not then this routine will attempt to grow the chain by
    allocating new clusters.  Failure to allocate sufficient clusters
    to grow the chain to 'NewSize' clusters will cause this routine to
    restore the chain to its original length and state.  This routine will
    return the current length of the chain : either the old length or the
    new length.  If an error occurs then 0 will be returned.

Arguments:

    StartOfChain    - Supplies the first cluster of the chain.
    NewLength       - Supplies the desired new length of the chain.
    LastCluster     - Returns the last cluster of the chain.

Return Value:

    The current length of the chain or 0.

--*/
{
    ULONG    length;
    ULONG    new_clusters_needed;
    ULONG    end_of_chain;
    ULONG    i, j;
    ULONG    start;

    if (!IsInRange(StartOfChain)) {
        return 0;
    }

    for (length = 1; !IsEndOfChain(StartOfChain); length++) {
        StartOfChain = QueryEntry(StartOfChain);
        if (!IsInRange(StartOfChain)) {
            return 0;
        }
    }

    if (length >= NewLength) {
        if (LastCluster) {
            *LastCluster = StartOfChain;
        }
        return length;
    }

    new_clusters_needed = NewLength - length;

    start = end_of_chain = StartOfChain;
    for (i = FirstDiskCluster; IsInRange(i); i++) {
        if (IsClusterFree(i)) {
            SetEntry(end_of_chain, i);
            end_of_chain = i;
            new_clusters_needed--;
            if (!new_clusters_needed) {
                SetEndOfChain(i);
                if (LastCluster) {
                    *LastCluster = i;
                }
                return NewLength;
            }
        }
    }

    // There is not enough disk space to lengthen the new chain so
    // settle for the old length.

    for (i = start; i != end_of_chain; ) {
        j = QueryEntry(i);
        SetClusterFree(i);
        i = j;
    }

    SetEndOfChain(start);

    if (LastCluster) {
        *LastCluster = start;
    }

    return length;
}


UFAT_EXPORT
VOID
FAT::FreeChain(
    IN  ULONG    StartOfChain
    )
/*++

Routine Description:

    This routine sets free all of the clusters in the cluster chain
    beginning with 'StartOfChain'.

Arguments:

    StartOfChain    - Supplies the first cluster of the chain to free.

Return Value:

    None.

--*/
{
    ULONG    tmp;

    while (!IsEndOfChain(StartOfChain)) {
        tmp = QueryEntry(StartOfChain);
        SetClusterFree(StartOfChain);
        StartOfChain = tmp;
    }
    SetClusterFree(StartOfChain);
}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美在线999| 久久先锋资源网| 91蜜桃婷婷狠狠久久综合9色| 国内欧美视频一区二区 | 日本成人在线视频网站| 亚洲国产wwwccc36天堂| 夜夜精品视频一区二区| 亚洲一线二线三线视频| 亚洲www啪成人一区二区麻豆| 亚洲综合在线观看视频| 亚洲图片一区二区| 亚洲国产美女搞黄色| 亚洲18女电影在线观看| 日本亚洲一区二区| 乱中年女人伦av一区二区| 美女视频免费一区| 精品制服美女久久| 国产成人高清在线| 99re亚洲国产精品| 在线观看成人小视频| 欧美视频一区二区三区四区| 欧美精品v国产精品v日韩精品| 69久久99精品久久久久婷婷| 欧美一卡二卡三卡四卡| 26uuu精品一区二区在线观看| 国产亚洲一区二区三区在线观看| 国产精品天美传媒沈樵| 亚洲激情图片一区| 蜜桃视频一区二区| 成人妖精视频yjsp地址| 欧美亚洲一区二区三区四区| 欧美电影影音先锋| 久久久不卡网国产精品一区| 日韩毛片精品高清免费| 视频一区二区三区在线| 国产成人综合亚洲91猫咪| 91网页版在线| 日韩丝袜情趣美女图片| 欧美国产国产综合| 亚洲男同性视频| 成人免费一区二区三区视频 | 日韩中文字幕亚洲一区二区va在线 | 欧美视频日韩视频在线观看| 欧美一区二区三区小说| 久久免费午夜影院| 亚洲三级久久久| 日韩成人精品视频| 国产毛片精品一区| 99热99精品| 欧美日本在线观看| 久久伊人中文字幕| 中文字幕一区视频| 亚洲成人手机在线| 国产主播一区二区| 色狠狠综合天天综合综合| 欧美日韩成人综合在线一区二区| 日韩欧美精品在线视频| 国产精品久久国产精麻豆99网站| 亚洲午夜电影网| 国产精品伊人色| 欧洲一区二区三区在线| 精品日韩一区二区三区| 亚洲丝袜自拍清纯另类| 亚洲国产aⅴ成人精品无吗| 国产精品一二三四| 欧美三级一区二区| 久久精品人人爽人人爽| 香蕉av福利精品导航| 高清久久久久久| 欧美日韩国产小视频在线观看| 久久久91精品国产一区二区三区| 一区二区三区欧美在线观看| 裸体歌舞表演一区二区| 色综合久久88色综合天天免费| 日韩一区二区三区视频在线 | 国产日韩亚洲欧美综合| 性做久久久久久免费观看欧美| 国产黑丝在线一区二区三区| 日本精品视频一区二区| 欧美一区二区三区婷婷月色| 欧美不卡在线视频| 夜夜精品视频一区二区| 国产**成人网毛片九色 | 五月天一区二区三区| 成人看片黄a免费看在线| 91麻豆精品国产无毒不卡在线观看| 国产精品久久一级| 激情综合色播五月| 色拍拍在线精品视频8848| 久久在线观看免费| 日韩精品高清不卡| 色偷偷88欧美精品久久久| 中文一区二区完整视频在线观看| 日本va欧美va瓶| 欧美日韩视频在线一区二区| 国产精品久久久久久久午夜片| 韩国一区二区三区| 正在播放一区二区| 亚洲一区日韩精品中文字幕| 成人动漫一区二区在线| 欧美一二三区在线| 久久福利视频一区二区| 欧美三电影在线| 亚洲欧美日韩久久精品| 波多野结衣亚洲| 国产亚洲精品福利| 紧缚捆绑精品一区二区| 91精品蜜臀在线一区尤物| 亚洲午夜精品17c| 一本色道综合亚洲| 亚洲私人影院在线观看| 丁香婷婷综合五月| 精品国产一区二区三区不卡| 日韩中文字幕av电影| 在线播放视频一区| 亚洲成人综合在线| 欧美日韩国产a| 亚洲午夜私人影院| 欧美日韩一级黄| 偷拍与自拍一区| 欧美日韩一级大片网址| 一区二区久久久| 欧美亚洲另类激情小说| 亚洲国产毛片aaaaa无费看| 欧美中文字幕一区二区三区亚洲| 一区二区在线电影| 91成人免费在线视频| 一区二区三区在线观看欧美| 91国产丝袜在线播放| 一区二区三区中文字幕在线观看| 在线亚洲高清视频| 亚洲一级片在线观看| 欧美三级电影在线观看| 亚洲人吸女人奶水| 94色蜜桃网一区二区三区| 亚洲精品视频免费看| 欧美综合久久久| 毛片av一区二区| 国产亚洲精品资源在线26u| 久久97超碰国产精品超碰| 国产视频一区在线观看| 菠萝蜜视频在线观看一区| 亚洲免费三区一区二区| 欧美日本韩国一区二区三区视频 | 亚洲色图清纯唯美| 欧美日韩在线亚洲一区蜜芽| 日本sm残虐另类| 久久久国产一区二区三区四区小说| 成人一区二区三区在线观看 | 亚洲精品乱码久久久久久黑人| 日本高清不卡aⅴ免费网站| 一个色综合av| 久久嫩草精品久久久精品| jlzzjlzz亚洲女人18| 亚洲高清免费视频| 久久午夜国产精品| 成人黄色a**站在线观看| 国产欧美日本一区视频| 一本久道久久综合中文字幕| 亚洲成人精品在线观看| 欧美精品一区二区三区视频| 成人影视亚洲图片在线| 三级不卡在线观看| 国产亚洲成aⅴ人片在线观看| 色呦呦国产精品| 日韩精品免费专区| 中文字幕免费不卡在线| 色综合久久久久综合| 激情综合网激情| 一区二区日韩电影| 久久综合九色综合欧美亚洲| 91免费视频观看| 蜜臀av性久久久久蜜臀aⅴ| 中文字幕日韩一区二区| 欧美日韩国产a| 丁香六月综合激情| 一区二区三区四区乱视频| 91精选在线观看| 91啪在线观看| 韩国精品在线观看| 亚洲成人动漫一区| 国产精品传媒视频| 精品少妇一区二区三区在线播放 | 欧美性大战久久久久久久蜜臀| 国产一区二区三区久久悠悠色av| 亚洲国产视频在线| 久久精品一区二区三区四区| 欧美精品日韩综合在线| 成人爱爱电影网址| 精品综合久久久久久8888| 亚洲精品国产精华液| 国产偷v国产偷v亚洲高清| 欧美一区二区三区免费大片| 色综合久久天天综合网| 国产精品77777竹菊影视小说| 日韩国产在线观看| 一区二区三区在线影院| 日本一区二区三区四区| 欧美精品一区二区高清在线观看| 欧美肥大bbwbbw高潮|