[FS_REC]
authorPierre Schweitzer <pierre@reactos.org>
Sun, 28 Feb 2016 11:27:05 +0000 (11:27 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Sun, 28 Feb 2016 11:27:05 +0000 (11:27 +0000)
--MagicValues;

svn path=/trunk/; revision=70796

reactos/drivers/filesystems/fs_rec/ext2.c
reactos/drivers/filesystems/fs_rec/ext2.h

index 16109ab..9446461 100644 (file)
@@ -53,10 +53,10 @@ FsRecExt2FsControl(IN PDEVICE_OBJECT DeviceObject,
             if (FsRecGetDeviceSectorSize(MountDevice, &SectorSize))
             {
                 /* Try to read the superblock */
             if (FsRecGetDeviceSectorSize(MountDevice, &SectorSize))
             {
                 /* Try to read the superblock */
-                Offset.QuadPart = 0x400;
+                Offset.QuadPart = EXT2_SB_OFFSET;
                 if (FsRecReadBlock(MountDevice,
                                    &Offset,
                 if (FsRecReadBlock(MountDevice,
                                    &Offset,
-                                   0x400,
+                                   EXT2_SB_SIZE,
                                    SectorSize,
                                    (PVOID)&Spb,
                                    &DeviceError))
                                    SectorSize,
                                    (PVOID)&Spb,
                                    &DeviceError))
index 12018d1..7ff0303 100644 (file)
@@ -44,3 +44,5 @@ C_ASSERT(FIELD_OFFSET(EXT2_SUPER_BLOCK, LastCheck) == 0x40);
 C_ASSERT(FIELD_OFFSET(EXT2_SUPER_BLOCK, DefResUid) == 0x50);
 
 #define EXT2_SUPER_MAGIC 0xEF53
 C_ASSERT(FIELD_OFFSET(EXT2_SUPER_BLOCK, DefResUid) == 0x50);
 
 #define EXT2_SUPER_MAGIC 0xEF53
+#define EXT2_SB_OFFSET 0x400
+#define EXT2_SB_SIZE 0x400