Context Navigation


Changeset 83 for branches


Ignore:
Timestamp:
Dec 13, 2008, 2:20:06 PM (17 years ago)
Author:
KO Myung-Hun
Message:

Changed Cluster2Sector() and Sector2Cluster() marcros to accept 'pVolInfo' as a parameter as well

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fat32-0.9/src/ifscache.c

    r81 r83
    266266
    267267
    268#define Cluster2Sector( ulCluster ) (( ULONG )( pVolInfo->ulStartOfData + \
    269 (( ULONG )( ulCluster ) - 2) * pVolInfo->BootSect.bpb.SectorsPerCluster ))
    270
    271#define Sector2Cluster( ulSector ) (( ULONG )((( ULONG )( ulSector ) - pVolInfo->ulStartOfData ) / \
    272 pVolInfo->BootSect.bpb.SectorsPerCluster + 2 ))
    268#define Cluster2Sector( pVolInfo, ulCluster ) \
    269 (( ULONG )(( pVolInfo )->ulStartOfData + \
    270 (( ULONG )( ulCluster ) - 2) * ( pVolInfo )->BootSect.bpb.SectorsPerCluster ))
    271
    272#define Sector2Cluster( pVolInfo, ulSector ) \
    273 (( ULONG )((( ULONG )( ulSector ) - ( pVolInfo )->ulStartOfData ) / \
    274 ( pVolInfo )->BootSect.bpb.SectorsPerCluster + 2 ))
    273275
    274276/******************************************************************
    341343 if( ulSector >= pVolInfo->ulStartOfData )
    342344 {
    343 ULONG ulStartCluster = Sector2Cluster( (削除) (削除ここまで)ulSector );
    344 ULONG ulEndCluster = Sector2Cluster( (削除) (削除ここまで)ulSector + usSectors - 1 );
    345 ULONG ulStartCluster = Sector2Cluster( (追記) pVolInfo, (追記ここまで)ulSector );
    346 ULONG ulEndCluster = Sector2Cluster( (追記) pVolInfo, (追記ここまで)ulSector + usSectors - 1 );
    345347 ULONG ulNextCluster = 0;
    346348 ULONG ulCluster;
    356358 {
    357359 usSectors = ( ulStartCluster != ulCluster ) ?
    358 ( min(( USHORT )( Cluster2Sector( (削除) (削除ここまで)ulCluster ) - ulSector ), usSectors )) : 0;
    360 ( min(( USHORT )( Cluster2Sector( (追記) pVolInfo, (追記ここまで)ulCluster ) - ulSector ), usSectors )) : 0;
    359361 }
    360362 }
Note: See TracChangeset for help on using the changeset viewer.

AltStyle によって変換されたページ (->オリジナル) /