Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/include
In directory usw-pr-cvs1:/tmp/cvs-serv17127/include
Modified Files:
Makefile.in attrib.h mft.h support.h unistr.h volume.h
Added Files:
attrib_RE.h
Log Message:
Everything compiles again! Yey! (Don't know about working though, haven't tried
it... So be careful...)
The definitely final find_{first_}attr() functions are in place. Currently
still no support for attribute lists.
The two new _RE files contain the C-fied and more or less (more less than more
actually) cleaned up functions from the ntfs driver. Once they are cleaned
up (find_attr() is already completed but I left it in the _RE files for future
reference/educational value) and modified to suit my ideas of how they should
work, which are not quite the same as the driver way, they will make it into
attrib.[ch].
If anyone gives the new code a try, I would be interested in whether it worked
or not... (-;
--- NEW FILE ---
/**
* attr_search_context - used in attribute search functions
* @mrec: buffer containing mft record to search
* @attr: attribute record in @mrec where to begin/continue search
* @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
* @is_first: if true lookup_attr() begins search with @attr, else after @attr
*
* 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 @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
* not NULL. Then, if @is_first is TRUE, lookup_attr() begins the search with
* @attr. If @is_first is FALSE, lookup_attr() begins the search after @attr.
* This is so that, after the first call to lookup_attr(), we can call
* lookup_attr() again, without any modification of the search context, to
* automagically get the next matching attribute.
*
* In contrast, find_attr() ignores @is_first and always begins the search with
* @attr. find_attr() shouldn't really be called directly; it is just for
* internal use. FIXME: Might want to change this behaviour later, but not
* before I am finished with lookup_external_attr(). (AIA)
*
* FIXME: alist_val* stuff is subject to change. A bit of redundancy at the
* moment. (AIA)
*/
typedef struct {
__u8 *base;
MFT_RECORD *mrec;
ATTR_RECORD *attr;
__u8 *alist_val_base;
MFT_RECORD *alist_mrec;
ATTR_RECORD *alist_attr;
ATTR_LIST_ENTRY *alist_val;
ATTR_LIST_ENTRY *alist_val_end;
__u32 alist_val_len;
IS_FIRST_BOOL is_first;
__u8 *alist_old_base;
} attr_search_context;
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 VCN lowest_vcn, const __u8 *val,
const __u32 val_len, attr_search_context *ctx);
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 VCN lowest_vcn, const __u8 *val,
const __u32 val_len, attr_search_context *ctx);
Index: Makefile.in
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/Makefile.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- Makefile.in 2001/02/03 02:03:35 1.1
+++ Makefile.in 2001/04/02 02:04:37 1.2
@@ -84,5 +84,5 @@
linux_ntfsincludedir = $(includedir)/ntfs
-linux_ntfsinclude_HEADERS = attrib.h bitmap.h bootsect.h disk_io.h endians.h logfile.h mft.h ntfs_rec.h volume.h
+linux_ntfsinclude_HEADERS = attrib.h bitmap.h bootsect.h disk_io.h endians.h logfile.h mft.h ntfs_rec.h volume.h unistr.h support.h
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
Index: attrib.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/attrib.h,v
retrieving revision 1.19
retrieving revision 1.20
diff -U2 -r1.19 -r1.20
--- attrib.h 2001/03/31 15:25:19 1.19
+++ attrib.h 2001/04/02 02:04:37 1.20
@@ -25,4 +25,6 @@
#include "endians.h"
#include "mft.h"
+#include "support.h"
+#include "unistr.h"
/*
@@ -132,5 +134,5 @@
/* 0*/ wchar_t name[64]; /* Unicode name of the attribute. Zero
terminated. */
-/* 80*/ ATTR_TYPE type; /* Type of the attribute. */
+/* 80*/ ATTR_TYPES type; /* Type of the attribute. */
/* 84*/ __u32 display_rule; /* Default display rule.
FIXME: What does it mean? (AIA) */
@@ -228,72 +230,4 @@
/*
- * Partial resident attribute record header.
- */
-typedef struct {
-/*Ofs when in ATTR_REC*/
-/* 16*/ __u32 value_length; /* Byte size of attribute value. */
-/* 20*/ __u16 value_offset; /* Byte offset of the attribute value from the
- start of the attribute record. */
-/* 22*/ RESIDENT_ATTR_FLAGS resident_flags; /* Flags (see above). */
-/* 23*/ __s8 reserved1; /* Reserved/alignment to 8-byte boundary. */
-/* sizeof() = 24 bytes */
-} __attribute__ ((__packed__)) NTFS_RESIDENT_ATTR_RECORD_PARTIAL;
-
-/*
- * Partial non-resident attribute record header.
- *
- * FIXME: Not sure whether clusters and vcns/lcns are stored as __u64 or __s64.
- * Some indicators point to __s64 though. (AIA)
- */
-typedef struct {
-/*Ofs when in ATTR_REC*/
-/* 16*/ __s64 lowest_vcn; /* Lowest valid virtual cluster number (vcn)
- for this portion of the attribute value or
- 0 if this is the only extent (usually the
- case). - Only when an attribute list is used
- does lowest_vcn != 0 ever occur. */
-/* 24*/ __s64 highest_vcn; /* Highest valid vcn of this extent of the
- attribute value. - Usually there is only one
- portion, so this usually equals the attribute
- value size in clusters. Can be -1 for zero
- length files. Can be 0 for "single extent"
- attributes. */
-/* 32*/ __u16 mapping_pairs_offset; /* Byte offset from the beginning of the
- structure to the mapping pairs array which
- contains the mappings between the vcns and
- the logical cluster numbers (lcns). When
- creating, place this at the end of this
- record header aligned to 8-byte boundary. */
-/* 34*/ __u8 compression_unit; /* The compression unit expressed as the log
- to the base 2 of the number of clusters in a
- compression unit. 0 means not compressed.
- (This effectively limits the compression
- unit size to be a power of two clusters.)
- Windows NT4 only uses a value of 4. */
-/* 35*/ __u8 reserved2[5]; /* Align to 8-byte boundary. */
-/* The sizes below are only used when LowestVcn is zero, as otherwise it would
- be difficult to keep them up-to-date.*/
-/* 40*/ __s64 allocated_size; /* Byte size of disk space allocated to hold
- the attribute value. Always is a multiple of
- the cluster size. When a file is compressed,
- this field is a multiple of the compression
- block size (2^compression_unit) and it
- represents the logically allocated space
- rather than the actual on disk usage. For
- this use the compressed_size (see below). */
-/* 48*/ __s64 data_size; /* Byte size of the attribute value. Can be
- larger than allocated_size if attribute
- value is compressed or sparse. */
-/* 56*/ __s64 initialized_size; /* Byte size of initialized portion of the
- attribute value. Usually equals data_size. */
-/* 64*/ __s64 compressed_size; /* Byte size of the attribute value after
- compression. Only present when compressed.
- Always is a multiple of the cluster size.
- Represents the actual amount of disk space
- being used on the disk. */
-/* sizeof() = 72 bytes (when compressed, otherwise = 64 bytes) */
-} __attribute__ ((__packed__)) NTFS_NONRESIDENT_ATTR_RECORD_PARTIAL;
-
-/*
* Attribute record header. Always aligned to 8-byte boundary.
*/
@@ -318,8 +252,66 @@
in mft.h for more details). */
/* 16*/ union {
- NTFS_RESIDENT_ATTR_RECORD_PARTIAL;
- NTFS_NON_RESIDENT_ATTR_RECORD_PARTIAL;
+ /* Resident attributes. */
+ struct {
+/* 16 */ __u32 value_length; /* Byte size of attribute value. */
+/* 20 */ __u16 value_offset; /* Byte offset of the attribute
+ value from the start of the
+ attribute record. */
+/* 22 */ RESIDENT_ATTR_FLAGS resident_flags; /* See above. */
+/* 23 */ __s8 reserved1; /* Reserved/alignment to 8-byte
+ boundary. */
+ } __attribute__ ((__packed__));
+ /* Non-resident attributes. */
+ struct {
+/* 16*/ VCN lowest_vcn; /* Lowest valid virtual cluster number
+ for this portion of the attribute value or
+ 0 if this is the only extent (usually the
+ case). - Only when an attribute list is used
+ does lowest_vcn != 0 ever occur. */
+/* 24*/ VCN highest_vcn; /* Highest valid vcn of this extent of
+ the attribute value. - Usually there is only one
+ portion, so this usually equals the attribute
+ value size in clusters. Can be -1 for zero
+ length files. Can be 0 for "single extent"
+ attributes. */
+/* 32*/ __u16 mapping_pairs_offset; /* Byte offset from the
+ beginning of the structure to the mapping pairs
+ array which contains the mappings between the
+ vcns and the logical cluster numbers (lcns).
+ When creating, place this at the end of this
+ record header aligned to 8-byte boundary. */
+/* 34*/ __u8 compression_unit; /* The compression unit expressed
+ as the log to the base 2 of the number of
+ clusters in a compression unit. 0 means not
+ compressed. (This effectively limits the
+ compression unit size to be a power of two
+ clusters.) WinNT4 only uses a value of 4. */
+/* 35*/ __u8 reserved2[5]; /* Align to 8-byte boundary. */
+/* The sizes below are only used when lowest_vcn is zero, as otherwise it would
+ be difficult to keep them up-to-date.*/
+/* 40*/ __s64 allocated_size; /* Byte size of disk space
+ allocated to hold the attribute value. Always
+ is a multiple of the cluster size. When a file
+ is compressed, this field is a multiple of the
+ compression block size (2^compression_unit) and
+ it represents the logically allocated space
+ rather than the actual on disk usage. For this
+ use the compressed_size (see below). */
+/* 48*/ __s64 data_size; /* Byte size of the attribute
+ value. Can be larger than allocated_size if
+ attribute value is compressed or sparse. */
+/* 56*/ __s64 initialized_size; /* Byte size of initialized
+ portion of the attribute value. Usually equals
+ data_size. */
+/* 64*/ __s64 compressed_size; /* Byte size of the attribute
+ value after compression. Only present when
+ compressed. Always is a multiple of the cluster
+ size. Represents the actual amount of disk space
+ being used on the disk. */
+ } __attribute__ ((__packed__));
} __attribute__ ((__packed__));
-} __attribute__ ((__packed__)) ATTR_RECORD, ATTR_REC;
+} __attribute__ ((__packed__)) ATTR_RECORD;
+
+typedef ATTR_RECORD ATTR_REC;
/*
@@ -493,5 +485,5 @@
(always set this to where the name would
start even if unnamed). */
-/* 8*/ __s64 lowest_vcn; /* Lowest virtual cluster number of this portion
+/* 8*/ VCN lowest_vcn; /* Lowest virtual cluster number of this portion
of the attribute value. This is usually 0. It
is non-zero for the case where one attribute
@@ -501,5 +493,8 @@
record holds one extent of the attribute and
there is one attribute list entry for each
- extent. */
+ extent. NOTE: This is DEFINITELY a signed
+ value! The windows driver uses cmp, followed
+ by jg when comparing this, thus it treats it
+ as signed. */
/* 16*/ MFT_REFERENCE mft_reference; /* The reference of the mft record holding
the ATTR_RECORD for this portion of the
@@ -661,12 +656,12 @@
* the SID structure (see below).
*/
-typedef enum { /* SID string prefix. */
- SECURITY_NULL_SID_AUTHORITY = {0, 0, 0, 0, 0, 0}, /* S-1-0 */
- SECURITY_WORLD_SID_AUTHORITY = {0, 0, 0, 0, 0, 1}, /* S-1-1 */
- SECURITY_LOCAL_SID_AUTHORITY = {0, 0, 0, 0, 0, 2}, /* S-1-2 */
- SECURITY_CREATOR_SID_AUTHORITY = {0, 0, 0, 0, 0, 3}, /* S-1-3 */
- SECURITY_NON_UNIQUE_AUTHORITY = {0, 0, 0, 0, 0, 4}, /* S-1-4 */
- SECURITY_NT_SID_AUTHORITY = {0, 0, 0, 0, 0, 5}, /* S-1-5 */
-} IDENTIFIER_AUTHORITIES;
+//typedef enum { /* SID string prefix. */
+// SECURITY_NULL_SID_AUTHORITY = {0, 0, 0, 0, 0, 0}, /* S-1-0 */
+// SECURITY_WORLD_SID_AUTHORITY = {0, 0, 0, 0, 0, 1}, /* S-1-1 */
+// SECURITY_LOCAL_SID_AUTHORITY = {0, 0, 0, 0, 0, 2}, /* S-1-2 */
+// SECURITY_CREATOR_SID_AUTHORITY = {0, 0, 0, 0, 0, 3}, /* S-1-3 */
+// SECURITY_NON_UNIQUE_AUTHORITY = {0, 0, 0, 0, 0, 4}, /* S-1-4 */
+// SECURITY_NT_SID_AUTHORITY = {0, 0, 0, 0, 0, 5}, /* S-1-5 */
+//} IDENTIFIER_AUTHORITIES;
/*
@@ -791,5 +786,5 @@
*/
typedef union {
- typedef struct {
+ struct {
__u32 low_part; /* Low 32-bits. */
__u16 high_part; /* High 16-bits. */
@@ -1385,5 +1380,5 @@
__s64 lsn; /* $LogFile sequence number of the last
modification of this index block. */
- __s64 index_block_vcn; /* Virtual cluster number of the index block. */
+ VCN index_block_vcn; /* Virtual cluster number of the index block. */
INDEX_HEADER index; /* Describes the following index entries. */
/*
@@ -1462,8 +1457,8 @@
QUOTA_FLAGS flags; /* Flags describing this quota entry. */
__u64 bytes_used; /* How many bytes of the quota are in use. */
- __u64 change_time; /* Last time this quota entry was changed. */
+ __s64 change_time; /* Last time this quota entry was changed. */
__s64 threshold; /* Soft quota (-1 if not limited). */
__s64 limit; /* Hard quota (-1 if not limited). */
- __u64 exceeded_time; /* How long the soft quota has been exceeded. */
+ __s64 exceeded_time; /* How long the soft quota has been exceeded. */
SID sid; /* The SID of the user/object associated with
this quota entry. Equals zero for the quota
@@ -1541,5 +1536,5 @@
} __attribute__ ((__packed__)) key;
/* The (optional) index data is inserted here when creating. */
- // __s64 vcn; /* If INDEX_ENTRY_NODE bit in flags is set, the last
+ // VCN vcn; /* If INDEX_ENTRY_NODE bit in flags is set, the last
// eight bytes of this index entry contain the virtual
// cluster number of the index block that holds the
@@ -1628,5 +1623,5 @@
*/
typedef enum {
- NEED_EA = 0x80;
+ NEED_EA = 0x80,
} __attribute__ ((__packed__)) EA_FLAGS;
@@ -1675,12 +1670,7 @@
} __attribute__ ((__packed__)) LOGGED_UTILITY_STREAM, EFS_ATTR;
-/* min macro used in attrib.c */
-#ifndef min
-#define min(a,b) ((a) <= (b) ? (a) : (b))
-#endif
-
typedef struct { /* In memory vcn to lcn mapping structure element. */
- __s64 vcn; /* vcn = starting virtual cluster number */
- __s64 lcn; /* lcn = starting logical cluster number */
+ VCN vcn; /* vcn = starting virtual cluster number */
+ LCN lcn; /* lcn = starting logical cluster number */
__u64 length; /* run length in clusters */
} run_list_element;
@@ -1715,5 +1705,5 @@
* if vcn is outside the boundaries covered by the run list.
*/
-__s64 vcn_to_lcn(const run_list rl, const __s64 vcn);
+LCN vcn_to_lcn(const run_list rl, const VCN vcn);
#include "volume.h"
@@ -1751,44 +1741,22 @@
* @mrec: buffer containing mft record to search
* @attr: attribute record in @mrec where to begin/continue search
- * @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
* @is_first: if true lookup_attr() begins search with @attr, else after @attr
*
* 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 @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
- * not NULL. Then, if @is_first is TRUE, lookup_attr() begins the search with
- * @attr. If @is_first is FALSE, lookup_attr() begins the search after @attr.
- * This is so that, after the first call to lookup_attr(), we can call
- * lookup_attr() again, without any modification of the search context, to
- * automagically get the next matching attribute.
- *
- * In contrast, find_attr() ignores @is_first and always begins the search with
- * @attr. find_attr() shouldn't really be called directly; it is just for
- * internal use. FIXME: Might want to change this behaviour later, but not
- * before I am finished with lookup_external_attr(). (AIA)
+ * 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.
*
- * FIXME: alist_val* stuff is subject to change. A bit of redundancy at the
- * moment. (AIA)
+ * @is_first is only honoured when @mrec is not NULL. Then, if @is_first is
+ * TRUE, the search begins with @attr. If @is_first is FALSE, the search begins
+ * after @attr. This is so that, after the first call to one of the search
+ * attribute functions, we can call the function again, without any
+ * modification of the search context, to automagically get the next matching
+ * attribute.
*/
typedef struct {
- __u8 *base;
MFT_RECORD *mrec;
ATTR_RECORD *attr;
-
- __u8 *alist_val_base;
- MFT_RECORD *alist_mrec;
- ATTR_RECORD *alist_attr;
- ATTR_LIST_ENTRY *alist_val;
- ATTR_LIST_ENTRY *alist_val_end;
- __u32 alist_val_len;
- IS_FIRST_BOOL is_first;
+ BOOL is_first;
} attr_search_context;
@@ -1806,14 +1774,4 @@
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,
- 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);
-
/**
* get_attribute_value_length - return the length of the value of an attribute
@@ -1843,6 +1801,6 @@
* errno describes the error.
*/
-__s64 get_attribute_value(const ntfs_volume *vol, const ATTR_RECORD *a,
- __u8 *b);
+__s64 get_attribute_value(const ntfs_volume *vol, const MFT_RECORD *m,
+ const ATTR_RECORD *a, __u8 *b);
/**
Index: mft.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/mft.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -U2 -r1.10 -r1.11
--- mft.h 2001/03/31 15:25:19 1.10
+++ mft.h 2001/04/02 02:04:37 1.11
@@ -30,4 +30,11 @@
/*
+ * Clusters are signed 64-bit values on NTFS volumes. We define two types, LCN
+ * and VCN, to allow for type checking and better code readability.
+ */
+typedef __s64 VCN;
+typedef __s64 LCN;
+
+/*
* System files mft record numbers. All these files are always marked as used
* in the bitmap attribute of the mft; presumably in order to avoid accidental
@@ -130,9 +137,10 @@
__u16 sequence_number; /* 16-bit sequence number. */
} __attribute__ ((__packed__));
- __u64 mft_reference; /* Mft reference as one value.*/
+ __u64 full_ref; /* Mft reference as one value.*/
} __attribute__ ((__packed__)) MFT_REFERENCE;
typedef enum {
- MFT_REFERENCE_MASK = 0x0000ffffffffffffULL,
+ MFT_REFERENCE_MASK_CPU = 0x0000ffffffffffffULL,
+ MFT_REFERENCE_MASK_LE = cpu_to_le64(0x0000ffffffffffffULL),
} MFT_REFERENCE_CONSTS;
Index: support.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/support.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- support.h 2001/03/26 03:42:13 1.1
+++ support.h 2001/04/02 02:04:37 1.2
@@ -23,4 +23,6 @@
#define SUPPORT_H
+#include <stddef.h>
+
/*
* These are just to make the code more readable...
@@ -34,4 +36,22 @@
ONE = 1,
} BOOL;
+
+/*
+ * Generic macro to convert pointers to values for comparison purposes.
+ */
+#ifndef p2n
+#define p2n(p) ((ptrdiff_t)((ptrdiff_t*)(p)))
+#endif
+
+/*
+ * The classical min and max macros.
+ */
+#ifndef min
+#define min(a,b) ((a) <= (b) ? (a) : (b))
+#endif
+
+#ifndef max
+#define max(a,b) ((a) >= (b) ? (a) : (b))
+#endif
#endif /* defined SUPPORT_H */
Index: unistr.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/unistr.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -U2 -r1.2 -r1.3
--- unistr.h 2001/03/31 15:25:19 1.2
+++ unistr.h 2001/04/02 02:04:37 1.3
@@ -30,25 +30,9 @@
/* #include <linux/nls.h> */
#include <stdio.h>
-#include <wchar.h>
#include "endians.h"
+#include "support.h"
-/*
- * This is used by the name collation functions to quickly determine what
- * characters are (in)valid.
- */
-const __u8 legal_ansi_char_array[0x40] = {
- 0x00, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
-
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
- 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10, 0x10,
-
- 0x17, 0x07, 0x18, 0x17, 0x17, 0x17, 0x17, 0x17,
- 0x17, 0x17, 0x18, 0x16, 0x16, 0x17, 0x07, 0x00,
-
- 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17, 0x17,
- 0x17, 0x17, 0x04, 0x16, 0x18, 0x16, 0x18, 0x18,
-};
+extern const __u8 legal_ansi_char_array[0x40];
/*
@@ -66,6 +50,6 @@
int ntfs_collate_names(const wchar_t *upcase, const __u32 upcase_len,
- wchar_t *name1, const int name1_len,
- wchar_t *name2, const int name2_len,
+ const wchar_t *name1, const __u32 name1_len,
+ const wchar_t *name2, const __u32 name2_len,
const IGNORE_CASE_BOOL ic, const int err_val);
Index: volume.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/volume.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -U2 -r1.4 -r1.5
--- volume.h 2001/03/06 02:10:55 1.4
+++ volume.h 2001/04/02 02:04:37 1.5
@@ -23,4 +23,6 @@
#define VOLUME_H
+#include <stdio.h>
+
#include "attrib.h"
@@ -84,5 +86,5 @@
__s64 number_of_mft_records; /* Number of records in the mft, equals
the number of bits in mft_bitmap. */
- __u16 *upcase; /* Upper case equivalents of all 65536
+ wchar_t *upcase; /* Upper case equivalents of all 65536
2-byte Unicode characters. Obtained
from FILE_$UpCase. */
@@ -99,5 +101,5 @@
/**
- * ntfs_open - open ntfs volume
+ * ntfs_mount - open ntfs volume
* @name: name of device/file to open
*
@@ -111,5 +113,5 @@
* setting up the structure.
*
- * ntfs_open() returns a pointer to the allocated ntfs_volume structure.
+ * ntfs_mount() returns a pointer to the allocated ntfs_volume structure.
* On error, the return value is NULL and errno is set appropriately.
*
@@ -120,8 +122,8 @@
* means.
*/
-ntfs_volume *ntfs_open(const char *name);
+ntfs_volume *ntfs_mount(const char *name);
/**
- * ntfs_close - close ntfs volume
+ * ntfs_umount - close ntfs volume
* @vol: address of ntfs_volume structure of volume to close
* @force: if true force close the volume even if it is busy
@@ -139,5 +141,5 @@
* returns 1.
*
- * @vol must have previously been returned by a call to ntfs_open().
+ * @vol must have previously been returned by a call to ntfs_mount().
*
* @vol itself is deallocated and should no longer be referenced after this
@@ -148,5 +150,5 @@
* means.
*/
-int ntfs_close(ntfs_volume *vol, const int force);
+int ntfs_umount(ntfs_volume *vol, const int force);
#endif /* defined VOLUME_H */
|