Btw, we are using a lot of hardcoded 512 values here for sector size even though there is a field in fthe Volume structure for that.
Is that correct?

Am 23.08.2012 14:02, schrieb [email protected]:
Author: tkreuzer
Date: Thu Aug 23 12:02:30 2012
New Revision: 57141

URL: http://svn.reactos.org/svn/reactos?rev=57141&view=rev
Log:
[FREELDR]
Improve readability of sector calculation

Modified:
     trunk/reactos/boot/freeldr/freeldr/fs/fat.c

Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fat.c?rev=57141&r1=57140&r2=57141&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c [iso-8859-1] Thu Aug 23 
12:02:30 2012
@@ -1338,8 +1338,7 @@
        //
        // Seek to right position
        //
-       Position.HighPart = SectorNumber >> 23;
-       Position.LowPart = SectorNumber << 9;
+       Position.QuadPart = (ULONGLONG)SectorNumber * 512;
        ret = ArcSeek(Volume->DeviceId, &Position, SeekAbsolute);
        if (ret != ESUCCESS)
        {





_______________________________________________
Ros-dev mailing list
[email protected]
http://www.reactos.org/mailman/listinfo/ros-dev

Reply via email to