Actually, this (duplicated) function looks quite poorly designed (not
your fault, obviously :-p).
The more you fix it, the more it seems natural that the first specific
case should be integrated in the while loop for real. That would make
the function more robust, with less duplicated code (and thus, less bugs
:-p).
GSoC note: this is not a "todo" task. This is just an open discussion
about a possible improvement if some day someone's bored.
Le 04/07/2016 19:02, tthompson(a)svn.reactos.org a écrit :
Author: tthompson
Date: Mon Jul 4 17:02:10 2016
New Revision: 71807
URL:
http://svn.reactos.org/svn/reactos?rev=71807&view=rev
Log:
[NTFS][FREELDR]
Fix ReadAttribute() and NtfsReadAttribute() in the case when an attribute contains two
data runs; Remove extra if statement that prevents second data run from being read after
it's decoded.
Modified:
branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c
branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
Modified: branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/boot/freeldr/fre…
==============================================================================
--- branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c [iso-8859-1] (original)
+++ branches/GSoC_2016/NTFS/boot/freeldr/freeldr/lib/fs/ntfs.c [iso-8859-1] Mon Jul 4
17:02:10 2016
@@ -320,9 +320,6 @@
}
else
DataRunStartLCN = -1;
-
- if (*DataRun == 0)
- return AlreadyRead;
}
while (Length > 0)
Modified: branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c
URL:
http://svn.reactos.org/svn/reactos/branches/GSoC_2016/NTFS/drivers/filesyst…
==============================================================================
--- branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c [iso-8859-1] (original)
+++ branches/GSoC_2016/NTFS/drivers/filesystems/ntfs/mft.c [iso-8859-1] Mon Jul 4
17:02:10 2016
@@ -384,9 +384,6 @@
}
else
DataRunStartLCN = -1;
-
- if (*DataRun == 0)
- return AlreadyRead;
}
while (Length > 0)
--
Pierre Schweitzer <pierre at reactos.org>
System & Network Administrator
Senior Kernel Developer
ReactOS Deutschland e.V.