Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3464/ntfsprogs
Modified Files:
ntfscmp.c
Log Message:
Compare the full attribute headers for non-resident attributes
Index: ntfscmp.c
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/ntfsprogs/ntfscmp.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -p -r1.14 -r1.15
--- ntfscmp.c 19 Feb 2006 12:50:54 -0000 1.14
+++ ntfscmp.c 5 Apr 2006 02:55:43 -0000 1.15
@@ -522,20 +522,17 @@ static void cmp_attribute_data(ntfs_attr
static int cmp_attribute_header(ATTR_RECORD *a1, ATTR_RECORD *a2)
{
- int header_size = offsetof(ATTR_RECORD, resident_end);
+ u32 header_size = offsetof(ATTR_RECORD, resident_end);
if (a1->non_resident != a2->non_resident)
return 1;
if (a1->non_resident) {
-
- if (a1->compression_unit != a2->compression_unit)
- return 1;
-
- header_size = offsetof(ATTR_RECORD, non_resident_end);
- if (a1->compression_unit)
- header_size = offsetof(ATTR_RECORD, compressed_end);
- }
+ /*
+ * FIXME: includes paddings which are not handled by ntfsinfo!
+ */
+ header_size = a1->length;
+ }
return memcmp(a1, a2, header_size);
}
|