[ros-diffs] [fireball] 35179: - Fix tamlin's early dosfsck porting attempt (create a temporary buffer for reading 512 bytes, call reading function which creates another buffer for reading 512 bytes, reads data, copies 512 bytes to 512 byte buffer, then the caller copies sizeof(DIR_ENT) out of the last 512 bytes buffer - looks a bit redundant).

fireball at svn.reactos.org fireball at svn.reactos.org
Fri Aug 8 11:34:23 CEST 2008


Author: fireball
Date: Fri Aug  8 04:34:23 2008
New Revision: 35179

URL: http://svn.reactos.org/svn/reactos?rev=35179&view=rev
Log:
- Fix tamlin's early dosfsck porting attempt (create a temporary buffer for reading 512 bytes, call reading function which creates another buffer for reading 512 bytes, reads data, copies 512 bytes to 512 byte buffer, then the caller copies sizeof(DIR_ENT) out of the last 512 bytes buffer - looks a bit redundant).

Modified:
    trunk/reactos/lib/fslib/vfatlib/check/check.c

Modified: trunk/reactos/lib/fslib/vfatlib/check/check.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/fslib/vfatlib/check/check.c?rev=35179&r1=35178&r2=35179&view=diff
==============================================================================
--- trunk/reactos/lib/fslib/vfatlib/check/check.c [iso-8859-1] (original)
+++ trunk/reactos/lib/fslib/vfatlib/check/check.c [iso-8859-1] Fri Aug  8 04:34:23 2008
@@ -749,12 +749,8 @@
     DIR_ENT de;
     FD_TYPE type;
 
-	char tmpBuffer[512]; // TMN:
-
     if (offset) {
-//	fs_read(offset,sizeof(DIR_ENT),&de);
-	fs_read(offset,sizeof(tmpBuffer),&tmpBuffer); // TMN:
-	memcpy(&de, tmpBuffer, sizeof(DIR_ENT));      // TMN:
+	fs_read(offset,sizeof(DIR_ENT),&de);
     } else {
 	memcpy(de.name,"           ",MSDOS_NAME);
 	de.attr = ATTR_DIR;



More information about the Ros-diffs mailing list