Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/include
In directory usw-pr-cvs1:/tmp/cvs-serv30976
Modified Files:
attrib.h mft.h unistr.h
Log Message:
Added a name comparison function.
Index: attrib.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/attrib.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -U2 -r1.18 -r1.19
--- attrib.h 2001/03/26 14:50:58 1.18
+++ attrib.h 2001/03/31 15:25:19 1.19
@@ -1751,7 +1751,7 @@
* @mrec: buffer containing mft record to search
* @attr: attribute record in @mrec where to begin/continue search
- * @base_mrec: base mft record
- * @alist_attr: attribute list attribute record (in @base_mrec, not @mrec)
- * @alist_val: attribute list value (if alist is resident in @base_mrec)
+ * @alist_mrec: mft record containing attribute list (i.e. base mft record)
+ * @alist_attr: attribute list attribute record
+ * @alist_val: attribute list value (if alist is resident in @alist_mrec)
* @alist_val_end: end of attribute list value + 1
* @alist_val_len: length of attribute list in bytes
@@ -1760,6 +1760,7 @@
* Structure must be initialized to zero before the first call to one of the
* attribute search functions. If the mft record in which to search has already
- * been loaded into memory, then initialize @mrec to point to it, @attr to point
- * to the first attribute within @mrec, and set @is_first to TRUE.
+ * been loaded into memory, then initialize @base and @mrec to point to it,
+ * @attr to point to the first attribute within @mrec, and set @is_first to
+ * TRUE.
*
* @is_first is only honoured in lookup_attr() and only when called with @mrec
@@ -1779,7 +1780,10 @@
*/
typedef struct {
+ __u8 *base;
MFT_RECORD *mrec;
ATTR_RECORD *attr;
- MFT_RECORD *base_mrec;
+
+ __u8 *alist_val_base;
+ MFT_RECORD *alist_mrec;
ATTR_RECORD *alist_attr;
ATTR_LIST_ENTRY *alist_val;
@@ -1802,10 +1806,10 @@
const __u8 *val, const __u32 val_len, attr_search_context *ctx);
-BOOL lookup_external_attr(const ntfs_volume *vol, const ATTR_TYPES type,
- const wchar_t *name, const __u32 name_len, const IGNORE_CASE_BOOL ic,
- const __s64 lowest_vcn, const __u8 *val, const __u32 val_len,
- attr_search_context *ctx);
+BOOL lookup_external_attr(const ntfs_volume *vol, const MFT_REFERENCE mref,
+ const ATTR_TYPES type, const wchar_t *name, const __u32 name_len,
+ const IGNORE_CASE_BOOL ic, const __s64 lowest_vcn, const __u8 *val,
+ const __u32 val_len, attr_search_context *ctx);
-BOOL lookup_attr(const ntfs_volume *vol, const MFT_REFERENCE *mref,
+BOOL lookup_attr(const ntfs_volume *vol, const MFT_REFERENCE mref,
const ATTR_TYPES type, const wchar_t *name, const __u32 name_len,
const IGNORE_CASE_BOOL ic, const __s64 lowest_vcn, const __u8 *val,
Index: mft.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/mft.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -U2 -r1.9 -r1.10
--- mft.h 2001/03/15 23:13:11 1.9
+++ mft.h 2001/03/31 15:25:19 1.10
@@ -133,4 +133,8 @@
} __attribute__ ((__packed__)) MFT_REFERENCE;
+typedef enum {
+ MFT_REFERENCE_MASK = 0x0000ffffffffffffULL,
+} MFT_REFERENCE_CONSTS;
+
/*
* The mft record header present at the beginning of every record in the mft.
Index: unistr.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/unistr.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- unistr.h 2001/03/07 01:17:33 1.1
+++ unistr.h 2001/03/31 15:25:19 1.2
@@ -60,4 +60,9 @@
} IGNORE_CASE_BOOL;
+BOOL ntfs_are_names_equal(const wchar_t *s1, size_t s1_len,
+ const wchar_t *s2, size_t s2_len,
+ const IGNORE_CASE_BOOL ic,
+ const wchar_t *upcase, const __u32 upcase_size);
+
int ntfs_collate_names(const wchar_t *upcase, const __u32 upcase_len,
wchar_t *name1, const int name1_len,
|