Changes by: antona
Update of /cvsroot/linux-ntfs/linux-ntfs/include
In directory usw-pr-cvs1:/tmp/cvs-serv12722/include
Modified Files:
attrib.h bootsect.h disk_io.h endians.h inode.h layout.h
logfile.h mft.h mst.h types.h unistr.h volume.h
Log Message:
Port attribute lookup functions with attribute list support from ntfs tng driver. Port/reimplement extent mft record handling code as well. Rename out all dollar signs from type names and constants. Adapt all callers to new API. Note mkntfs is currently broken due to some needed work.
Index: attrib.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/attrib.h,v
retrieving revision 1.29
retrieving revision 1.30
diff -U2 -r1.29 -r1.30
--- attrib.h 19 Apr 2002 21:09:54 -0000 1.29
+++ attrib.h 20 Apr 2002 23:09:42 -0000 1.30
@@ -25,8 +25,6 @@
#define ATTRIB_H
-#include "types.h"
-#include "support.h"
-#include "unistr.h"
#include "inode.h"
+#include "unistr.h"
typedef enum {
@@ -35,7 +33,7 @@
LCN_ENOENT = -3,
LCN_EINVAL = -4,
-} LCN_SPECIAL_VALUES;
+} NTFS_LCN_SPECIAL_VALUES;
-LCN vcn_to_lcn(const run_list_element *rl, const VCN vcn);
+extern LCN ntfs_vcn_to_lcn(const run_list_element *rl, const VCN vcn);
/**
@@ -73,4 +71,8 @@
extern void ntfs_put_attr_search_ctx(ntfs_attr_search_ctx *ctx);
+extern int ntfs_lookup_attr(const ATTR_TYPES type, const uchar_t *name,
+ const __u32 name_len, const IGNORE_CASE_BOOL ic,
+ const VCN lowest_vcn, const __u8 *val, const __u32 val_len,
+ ntfs_attr_search_ctx *ctx);
/**
@@ -89,5 +91,5 @@
* set_ntfs_volume_flags - set the flags of an ntfs volume
* @v: ntfs volume the mft record @b is from
- * @b: pointer to a buffer containing the mft record of FILE_$Volume
+ * @b: pointer to a buffer containing the mft record of FILE_Volume
* @flags: new flags
*
@@ -96,13 +98,4 @@
*/
int set_ntfs_volume_flags(ntfs_volume *v, MFT_RECORD *b, const __u16 flags);
-
-/*
- * See attrib.c for descriptions of the below functions.
- */
-
-BOOL find_attr(const ATTR_TYPES type, const uchar_t *name, const __u32 name_len,
- const IGNORE_CASE_BOOL ic, const uchar_t *upcase,
- const __u32 upcase_len, const __u8 *val, const __u32 val_len,
- ntfs_attr_search_ctx *ctx);
/**
Index: bootsect.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/bootsect.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -U2 -r1.9 -r1.10
--- bootsect.h 18 Apr 2002 18:15:46 -0000 1.9
+++ bootsect.h 20 Apr 2002 23:09:42 -0000 1.10
@@ -28,71 +28,4 @@
#include "types.h"
-/* The NTFS oem_id */
-#define magicNTFS cpu_to_le64(0x202020205346544e) /* "NTFS " */
-
-/*
- * Location of bootsector on partition:
- * The standard NTFS_BOOT_SECTOR is on sector 0 of the partition.
- * On NT4 and above there is one backup copy of the boot sector to
- * be found on the last sector of the partition (not normally accessible
- * from within Windows as the bootsector contained number of sectors
- * value is one less than the actual value!).
- * On versions of NT 3.51 and earlier, the backup copy was located at
- * number of sectors/2 (integer divide), i.e. in the middle of the volume.
- */
-
-/*
- * BIOS parameter block (bpb) structure.
- */
-typedef struct {
- __u16 bytes_per_sector; /* Size of a sector in bytes. */
- __u8 sectors_per_cluster; /* Size of a cluster in sectors. */
- __u16 reserved_sectors; /* zero */
- __u8 fats; /* zero */
- __u16 root_entries; /* zero */
- __u16 sectors; /* zero */
- __u8 media_type; /* 0xf8 = hard disk */
- __u16 sectors_per_fat; /* zero */
- __u16 sectors_per_track; /* irrelevant, we set to zero */
- __u16 heads; /* irrelevant, we set to zero */
- __u32 hidden_sectors; /* zero */
- __u32 large_sectors; /* zero */
-/* sizeof() = 25 (0x19) bytes */
-} __attribute__ ((__packed__)) BIOS_PARAMETER_BLOCK;
-
-/*
- * Boot sector structure.
- */
-typedef struct {
- __u8 jump[3]; /* Irrelevant (jump to boot up code).*/
- __u64 oem_id; /* Magic "NTFS ". */
- BIOS_PARAMETER_BLOCK bpb; /* See BIOS_PARAMETER_BLOCK. */
- __u8 unused[4]; /* zero, NTFS diskedit.exe states that
- this is actually:
- __u8 physical_drive; // 0x80
- __u8 current_head; // zero
- __u8 extended_boot_signature;
- // 0x80
- __u8 unused; // zero
- */
-/*0x28*/__s64 number_of_sectors; /* Number of sectors in volume. Gives
- maximum volume size of 2^63 sectors.
- Assuming standard sector size of 512
- bytes, the maximum byte size is
- approx. 4.7x10^21 bytes. (-; */
- __s64 mft_lcn; /* Cluster location of mft data. */
- __s64 mftmirr_lcn; /* Cluster location of copy of mft. */
- __s8 clusters_per_mft_record; /* Mft record size in clusters. */
- __u8 reserved0[3]; /* zero */
- __s8 clusters_per_index_block; /* Index block size in clusters. */
- __u8 reserved1[3]; /* zero */
- __s64 volume_serial_number; /* Irrelevant (serial number). */
- __u32 checksum; /* Boot sector checksum. */
-/*0x54*/__u8 bootstrap[426]; /* Irrelevant (boot up code). */
- __u16 end_of_sector_marker; /* End of bootsector magic. Always is
- 0xaa55 in little endian. */
-/* sizeof() = 512 (0x200) bytes */
-} __attribute__ ((__packed__)) NTFS_BOOT_SECTOR;
-
/**
* is_boot_sector_ntfs - check a boot sector for describing an ntfs volume
Index: disk_io.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/disk_io.h,v
retrieving revision 1.14
retrieving revision 1.15
diff -U2 -r1.14 -r1.15
--- disk_io.h 18 Apr 2002 18:15:46 -0000 1.14
+++ disk_io.h 20 Apr 2002 23:09:42 -0000 1.15
@@ -25,5 +25,5 @@
#define DISK_IO_H
-#include "types.h"
+#include "volume.h"
extern __s64 ntfs_pread(const int fd, const __s64 pos, __s64 count,
Index: endians.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/endians.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -U2 -r1.4 -r1.5
--- endians.h 9 Nov 2001 19:24:23 -0000 1.4
+++ endians.h 20 Apr 2002 23:09:42 -0000 1.5
@@ -38,6 +38,4 @@
#include <asm/byteorder.h>
-#include "types.h"
-
/* Unsigned from LE to CPU conversion. */
Index: inode.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/inode.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -U2 -r1.6 -r1.7
--- inode.h 19 Apr 2002 21:21:46 -0000 1.6
+++ inode.h 20 Apr 2002 23:09:42 -0000 1.7
@@ -20,9 +20,7 @@
*/
-#ifndef _LINUX_NTFS_INODE_H
-#define _LINUX_NTFS_INODE_H
+#ifndef NTFS_INODE_H
+#define NTFS_INODE_H
-#include "types.h"
-#include "support.h"
#include "volume.h"
@@ -89,12 +87,10 @@
extent records this is -1. */
union { /* This union is only used if nr_extents != 0. */
- ntfs_inode **extent_ntfs_inos; /* For nr_extents > 0, array of
- the ntfs inodes of the extent
- mft records belonging to
- this base inode which have
- been loaded. */
- ntfs_inode *base_ntfs_ino; /* For nr_extents == -1, the
- ntfs inode of the base mft
- record. */
+ ntfs_inode **extent_nis;/* For nr_extents > 0, array of the
+ ntfs inodes of the extent mft
+ records belonging to this base
+ inode which have been loaded. */
+ ntfs_inode *base_ni; /* For nr_extents == -1, the ntfs
+ inode of the base mft record. */
};
};
@@ -104,4 +100,7 @@
extern int ntfs_close_inode(ntfs_inode *ni);
-#endif /* _LINUX_NTFS_FS_INODE_H */
+extern ntfs_inode *ntfs_open_extent_inode(ntfs_inode *base_ni,
+ const MFT_REF mref);
+
+#endif /* NTFS_INODE_H */
Index: layout.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/layout.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -U2 -r1.18 -r1.19
--- layout.h 16 Apr 2002 12:13:52 -0000 1.18
+++ layout.h 20 Apr 2002 23:09:42 -0000 1.19
@@ -28,5 +28,4 @@
#include <linux/types.h>
-#include "list.h"
#include "endians.h"
#include "support.h"
@@ -43,4 +42,71 @@
typedef __s64 LCN;
+/* The NTFS oem_id */
+#define magicNTFS const_cpu_to_le64(0x202020205346544e) /* "NTFS " */
+
+/*
+ * Location of bootsector on partition:
+ * The standard NTFS_BOOT_SECTOR is on sector 0 of the partition.
+ * On NT4 and above there is one backup copy of the boot sector to
+ * be found on the last sector of the partition (not normally accessible
+ * from within Windows as the bootsector contained number of sectors
+ * value is one less than the actual value!).
+ * On versions of NT 3.51 and earlier, the backup copy was located at
+ * number of sectors/2 (integer divide), i.e. in the middle of the volume.
+ */
+
+/*
+ * BIOS parameter block (bpb) structure.
+ */
+typedef struct {
+ __u16 bytes_per_sector; /* Size of a sector in bytes. */
+ __u8 sectors_per_cluster; /* Size of a cluster in sectors. */
+ __u16 reserved_sectors; /* zero */
+ __u8 fats; /* zero */
+ __u16 root_entries; /* zero */
+ __u16 sectors; /* zero */
+ __u8 media_type; /* 0xf8 = hard disk */
+ __u16 sectors_per_fat; /* zero */
+ __u16 sectors_per_track; /* irrelevant */
+ __u16 heads; /* irrelevant */
+ __u32 hidden_sectors; /* zero */
+ __u32 large_sectors; /* zero */
+/* sizeof() = 25 (0x19) bytes */
+} __attribute__ ((__packed__)) BIOS_PARAMETER_BLOCK;
+
+/*
+ * NTFS boot sector structure.
+ */
+typedef struct {
+ __u8 jump[3]; /* Irrelevant (jump to boot up code).*/
+ __u64 oem_id; /* Magic "NTFS ". */
+ BIOS_PARAMETER_BLOCK bpb; /* See BIOS_PARAMETER_BLOCK. */
+ __u8 unused[4]; /* zero, NTFS diskedit.exe states that
+ this is actually:
+ __u8 physical_drive; // 0x80
+ __u8 current_head; // zero
+ __u8 extended_boot_signature;
+ // 0x80
+ __u8 unused; // zero
+ */
+/*0x28*/__s64 number_of_sectors; /* Number of sectors in volume. Gives
+ maximum volume size of 2^63 sectors.
+ Assuming standard sector size of 512
+ bytes, the maximum byte size is
+ approx. 4.7x10^21 bytes. (-; */
+ __s64 mft_lcn; /* Cluster location of mft data. */
+ __s64 mftmirr_lcn; /* Cluster location of copy of mft. */
+ __s8 clusters_per_mft_record; /* Mft record size in clusters. */
+ __u8 reserved0[3]; /* zero */
+ __s8 clusters_per_index_record;/* Index block size in clusters. */
+ __u8 reserved1[3]; /* zero */
+ __u64 volume_serial_number; /* Irrelevant (serial number). */
+ __u32 checksum; /* Boot sector checksum. */
+/*0x54*/__u8 bootstrap[426]; /* Irrelevant (boot up code). */
+ __u16 end_of_sector_marker; /* End of bootsector magic. Always is
+ 0xaa55 in little endian. */
+/* sizeof() = 512 (0x200) bytes */
+} __attribute__ ((__packed__)) NTFS_BOOT_SECTOR;
+
/*
* Magic identifiers present at the beginning of all ntfs record containing
@@ -121,36 +187,38 @@
*/
typedef enum {
- FILE_$MFT = 0, /* Master file table (mft). Data attribute
+ FILE_MFT = 0, /* Master file table (mft). Data attribute
contains the entries and bitmap attribute
records which ones are in use (bit==1). */
- FILE_$MFTMirr = 1, /* Mft mirror (copy of first four mft records)
- in data attribute. */
- FILE_$LogFile = 2, /* Journalling log in data attribute. */
- FILE_$Volume = 3, /* Volume name attribute and volume information
+ FILE_MFTMirr = 1, /* Mft mirror: copy of first four mft records
+ in data attribute. If cluster size > 4kiB,
+ copy of first N mft records, with
+ N = cluster_size / mft_record_size. */
+ FILE_LogFile = 2, /* Journalling log in data attribute. */
+ FILE_Volume = 3, /* Volume name attribute and volume information
attribute (flags and ntfs version). Windows
refers to this file as volume DASD (Direct
Access Storage Device). */
- FILE_$AttrDef = 4, /* Array of attribute definitions in data
+ FILE_AttrDef = 4, /* Array of attribute definitions in data
attribute. */
- FILE_$root = 5, /* Root directory. */
- FILE_$Bitmap = 6, /* Allocation bitmap of all clusters (lcns) in
+ FILE_root = 5, /* Root directory. */
+ FILE_Bitmap = 6, /* Allocation bitmap of all clusters (lcns) in
data attribute. */
- FILE_$Boot = 7, /* Boot sector (always at cluster 0) in data
+ FILE_Boot = 7, /* Boot sector (always at cluster 0) in data
attribute. */
- FILE_$BadClus = 8, /* Contains all bad clusters in the non-resident
+ FILE_BadClus = 8, /* Contains all bad clusters in the non-resident
data attribute. */
- FILE_$Secure = 9, /* Shared security descriptors in data attribute
+ FILE_Secure = 9, /* Shared security descriptors in data attribute
and two indexes into the descriptors.
Appeared in Windows 2000. Before that, this
file was named $Quota but was unused. */
- FILE_$UpCase = 10, /* Uppercase equivalents of all 65536 Unicode
+ FILE_UpCase = 10, /* Uppercase equivalents of all 65536 Unicode
characters in data attribute. */
- FILE_$Extend = 11, /* Directory containing other system files (eg.
+ FILE_Extend = 11, /* Directory containing other system files (eg.
$ObjId, $Quota, $Reparse and $UsnJrnl). This
is new to NTFS3.0. */
- FILE_reserved12 = 12, /* Reserved for future use (records 12-15). */
- FILE_reserved13 = 13,
- FILE_reserved14 = 14,
- FILE_reserved15 = 15,
+ FILE_reserved12 = 12, /* Reserved for future use (records 12-15). */
+ FILE_reserved13 = 13,
+ FILE_reserved14 = 14,
+ FILE_reserved15 = 15,
FILE_first_user = 16, /* First user file, used as test limit for
whether to allow opening a file or not. */
@@ -230,6 +298,6 @@
* The mft record header present at the beginning of every record in the mft.
* This is followed by a sequence of variable length attribute records which
- * is terminated by an attribute of type $END which is a truncated attribute
- * in that it only consists of the attribute type code $END and none of the
+ * is terminated by an attribute of type AT_END which is a truncated attribute
+ * in that it only consists of the attribute type code AT_END and none of the
* other members of the attribute structure are present.
*/
@@ -305,27 +373,27 @@
* by the attribute definitions present in the data attribute of the $AttrDef
* system file. On NTFS 3.0 volumes the names are just as the types are named
- * in the below enum. Note: All system attribute names start with a dollar sign.
- * If that isn't a revealing choice of symbol... (-;
+ * in the below enum exchanging AT_ for the dollar sign ($). If that isn't a
+ * revealing choice of symbol... (-;
*/
typedef enum {
- $UNUSED = const_cpu_to_le32( 0),
- $STANDARD_INFORMATION = const_cpu_to_le32( 0x10),
- $ATTRIBUTE_LIST = const_cpu_to_le32( 0x20),
- $FILE_NAME = const_cpu_to_le32( 0x30),
- $OBJECT_ID = const_cpu_to_le32( 0x40),
- $SECURITY_DESCRIPTOR = const_cpu_to_le32( 0x50),
- $VOLUME_NAME = const_cpu_to_le32( 0x60),
- $VOLUME_INFORMATION = const_cpu_to_le32( 0x70),
- $DATA = const_cpu_to_le32( 0x80),
- $INDEX_ROOT = const_cpu_to_le32( 0x90),
- $INDEX_ALLOCATION = const_cpu_to_le32( 0xa0),
- $BITMAP = const_cpu_to_le32( 0xb0),
- $REPARSE_POINT = const_cpu_to_le32( 0xc0),
- $EA_INFORMATION = const_cpu_to_le32( 0xd0),
- $EA = const_cpu_to_le32( 0xe0),
- $PROPERTY_SET = const_cpu_to_le32( 0xf0),
- $LOGGED_UTILITY_STREAM = const_cpu_to_le32( 0x100),
- $FIRST_USER_DEFINED_ATTRIBUTE = const_cpu_to_le32( 0x1000),
- $END = const_cpu_to_le32(0xffffffff),
+ AT_UNUSED = const_cpu_to_le32( 0),
+ AT_STANDARD_INFORMATION = const_cpu_to_le32( 0x10),
+ AT_ATTRIBUTE_LIST = const_cpu_to_le32( 0x20),
+ AT_FILE_NAME = const_cpu_to_le32( 0x30),
+ AT_OBJECT_ID = const_cpu_to_le32( 0x40),
+ AT_SECURITY_DESCRIPTOR = const_cpu_to_le32( 0x50),
+ AT_VOLUME_NAME = const_cpu_to_le32( 0x60),
+ AT_VOLUME_INFORMATION = const_cpu_to_le32( 0x70),
+ AT_DATA = const_cpu_to_le32( 0x80),
+ AT_INDEX_ROOT = const_cpu_to_le32( 0x90),
+ AT_INDEX_ALLOCATION = const_cpu_to_le32( 0xa0),
+ AT_BITMAP = const_cpu_to_le32( 0xb0),
+ AT_REPARSE_POINT = const_cpu_to_le32( 0xc0),
+ AT_EA_INFORMATION = const_cpu_to_le32( 0xd0),
+ AT_EA = const_cpu_to_le32( 0xe0),
+ AT_PROPERTY_SET = const_cpu_to_le32( 0xf0),
+ AT_LOGGED_UTILITY_STREAM = const_cpu_to_le32( 0x100),
+ AT_FIRST_USER_DEFINED_ATTRIBUTE = const_cpu_to_le32( 0x1000),
+ AT_END = const_cpu_to_le32(0xffffffff),
} ATTR_TYPES;
@@ -344,13 +412,13 @@
* treatment to any characters at all, but this is speculation.
* COLLATION_NTOFS_ULONG - Sorting is done according to ascending __u32 key
- * values. E.g. used for $SII index in FILE_$Secure, which sorts by
+ * values. E.g. used for $SII index in FILE_Secure, which sorts by
* security_id (__u32).
* COLLATION_NTOFS_SID - Sorting is done according to ascending SID values.
- * E.g. used for $O index in FILE_$Extend/$Quota.
+ * E.g. used for $O index in FILE_Extend/$Quota.
* COLLATION_NTOFS_SECURITY_HASH - Sorting is done first by ascending hash
* values and second by ascending security_id values. E.g. used for $SDH
- * index in FILE_$Secure.
+ * index in FILE_Secure.
* COLLATION_NTOFS_ULONGS - Sorting is done according to a sequence of ascending
- * __u32 key values. E.g. used for $O index in FILE_$Extend/$ObjId, which
+ * __u32 key values. E.g. used for $O index in FILE_Extend/$ObjId, which
* sorts by object_id (16-byte), by splitting up the object_id in four
* __u32 values and using them as individual keys. E.g. take the following
@@ -402,5 +470,5 @@
/*
- * The data attribute of FILE_$AttrDef contains a sequence of attribute
+ * The data attribute of FILE_AttrDef contains a sequence of attribute
* definitions for the NTFS volume. With this, it is supposed to be safe for an
* older NTFS driver to mount a volume containing a newer NTFS version without
@@ -730,10 +798,10 @@
class id index (?). */
/* 48*/ __u32 owner_id; /* Owner_id of the user owning
- the file. Translate via $Q index in FILE_$Extend
+ the file. Translate via $Q index in FILE_Extend
/$Quota to the quota control entry for the user
owning the file. Zero if quotas are disabled. */
/* 52*/ __u32 security_id; /* Security_id for the file.
Translate via $SII index and $SDS data stream
- in FILE_$Secure to the security descriptor. */
+ in FILE_Secure to the security descriptor. */
/* 56*/ __u64 quota_charged; /* Byte size of the charge to
the quota for all streams of the file. Note: Is
@@ -747,5 +815,5 @@
whole mft and set all Usn entries in all mft
records to zero! (This can take a while!)
- The journal is FILE_$Extend/$UsnJrnl. Win2k
+ The journal is FILE_Extend/$UsnJrnl. Win2k
will recreate the journal and initiate
logging if necessary when mounting the
@@ -918,9 +986,9 @@
/*
- * FILE_$Extend/$ObjId contains an index named $O. This index contains all
+ * FILE_Extend/$ObjId contains an index named $O. This index contains all
* object_ids present on the volume as the index keys and the corresponding
* mft_record numbers as the index entry data parts. The data part (defined
* below) also contains three other object_ids:
- * birth_volume_id - object_id of FILE_$Volume on which the file was first
+ * birth_volume_id - object_id of FILE_Volume on which the file was first
* created. Optional (i.e. can be zero).
* birth_object_id - object_id of file when it was first created. Usually
@@ -1570,5 +1638,5 @@
* NOTE: Can be resident or non-resident.
* NOTE: Not used in NTFS 3.0+, as security descriptors are stored centrally
- * in FILE_$Secure and the correct descriptor is found using the security_id
+ * in FILE_Secure and the correct descriptor is found using the security_id
* from the standard information attribute.
*/
@@ -1576,8 +1644,8 @@
/*
- * On NTFS 3.0+, all security descriptors are stored in FILE_$Secure. Only one
+ * On NTFS 3.0+, all security descriptors are stored in FILE_Secure. Only one
* referenced instance of each unique security descriptor is stored.
*
- * FILE_$Secure contains no unnamed data attribute, i.e. it has zero length. It
+ * FILE_Secure contains no unnamed data attribute, i.e. it has zero length. It
* does, however, contain two indexes ($SDH and $SII) as well as a named data
* stream ($SDS).
@@ -1610,5 +1678,5 @@
* added to the $SDH and $SII indexes.
*
- * Note: Entries are never deleted from FILE_$Secure, even if nothing
+ * Note: Entries are never deleted from FILE_Secure, even if nothing
* references an entry any more.
*/
@@ -1664,5 +1732,5 @@
*
* NOTE: Always resident.
- * NOTE: Present only in FILE_$Volume.
+ * NOTE: Present only in FILE_Volume.
*/
typedef struct {
@@ -1688,5 +1756,5 @@
*
* NOTE: Always resident.
- * NOTE: Present only in FILE_$Volume.
+ * NOTE: Present only in FILE_Volume.
* NOTE: Windows 2000 uses NTFS 3.0 while Windows NT4 service pack 6a uses
* NTFS 1.2. I haven't personally seen other values yet.
@@ -1776,5 +1844,5 @@
* index block.
*
- * NOTE: The root directory (FILE_$root) contains an entry for itself. Other
+ * NOTE: The root directory (FILE_root) contains an entry for itself. Other
* dircetories do not contain entries for themselves, though.
*/
@@ -1832,5 +1900,5 @@
/*
- * The system file FILE_$Extend/$Reparse contains an index named $R listing
+ * The system file FILE_Extend/$Reparse contains an index named $R listing
* all reparse points on the volume. The index entry keys are as defined
* below. Note, that there is no index data associated with the index entries.
@@ -1871,5 +1939,5 @@
/*
- * The system file FILE_$Extend/$Quota contains two indexes $O and $Q. Quotas
+ * The system file FILE_Extend/$Quota contains two indexes $O and $Q. Quotas
* are on a per volume and per user basis.
*
@@ -1972,11 +2040,11 @@
SII_INDEX_KEY sii; /* $SII index in $Secure. */
SDH_INDEX_KEY sdh; /* $SDH index in $Secure. */
- GUID object_id; /* $O index in FILE_$Extend/$ObjId: The
+ GUID object_id; /* $O index in FILE_Extend/$ObjId: The
object_id of the mft record found in
the data part of the index. */
- REPARSE_INDEX_KEY; /* $R index in FILE_$Extend/$Reparse. */
- SID sid; /* $O index in FILE_$Extend/$Quota:
+ REPARSE_INDEX_KEY; /* $R index in FILE_Extend/$Reparse. */
+ SID sid; /* $O index in FILE_Extend/$Quota:
SID of the owner of the user_id. */
- __u32 owner_id; /* $Q index in FILE_$Extend/$Quota:
+ __u32 owner_id; /* $Q index in FILE_Extend/$Quota:
user_id of the owner of the quota
control entry in the data part of
Index: logfile.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/logfile.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -U2 -r1.12 -r1.13
--- logfile.h 26 Jan 2002 03:21:07 -0000 1.12
+++ logfile.h 20 Apr 2002 23:09:42 -0000 1.13
@@ -25,5 +25,4 @@
#define LOGFILE_H
-#include "endians.h"
#include "types.h"
Index: mft.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/mft.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -U2 -r1.31 -r1.32
--- mft.h 20 Apr 2002 01:53:02 -0000 1.31
+++ mft.h 20 Apr 2002 23:09:42 -0000 1.32
@@ -25,6 +25,5 @@
#define MFT_H
-#include "types.h"
-#include "endians.h"
+#include "volume.h"
extern int ntfs_read_mft_records(const ntfs_volume *vol, const MFT_REF mref,
Index: mst.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/mst.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -U2 -r1.3 -r1.4
--- mst.h 18 Apr 2002 18:15:46 -0000 1.3
+++ mst.h 20 Apr 2002 23:09:42 -0000 1.4
@@ -27,5 +27,4 @@
#include "types.h"
-#include "endians.h"
extern int ntfs_post_read_mst_fixup(NTFS_RECORD *b, const __u32 size);
Index: types.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/types.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -U2 -r1.7 -r1.8
--- types.h 14 Apr 2002 13:56:45 -0000 1.7
+++ types.h 20 Apr 2002 23:09:42 -0000 1.8
@@ -26,5 +26,4 @@
#define NTFS_TYPES_H
-#include "list.h"
#include "layout.h"
@@ -91,44 +90,4 @@
} attr_val;
-/*
- * ntfs_volume - structure describing an open volume in memory
- */
-typedef struct {
- int fd; /* File descriptor associated with volume. */
- char *dev_name; /* Name of the device/file the volume is in. */
- char *vol_name; /* Name of the volume. */
- __u8 major_ver; /* Ntfs major version of volume. */
- __u8 minor_ver; /* Ntfs minor version of volume. */
- __u16 flags; /* Bit array of VOLUME_* flags. */
- __s64 number_of_clusters;/* Volume size in clusters, hence also the
- number of bits in lcn_bitmap. */
- __u32 cluster_size; /* Byte size of a cluster. */
- __u32 mft_record_size; /* Byte size of a mft record. */
- __s64 mft_lcn; /* Logical cluster number of the data attribute
- for FILE_$Mft. */
- __s64 mftmirr_lcn; /* Logical cluster number of the data attribute
- for FILE_$MftMirr. */
- __u8 cluster_size_bits; /* Log(2) of the byte size of a cluster. */
- __u8 mft_record_size_bits;/* Log(2) of the byte size of a mft record. */
- __u8 *lcn_bitmap; /* Value of data attribute of FILE_$Bitmap. Each
- bit represents a cluster on the volume, bit 0
- representing lcn 0 and so on. A set bit means
- that the cluster is in use and a zero bit
- means the cluster is free. */
- __u8 *mft_bitmap; /* Value of bitmap attribute of FILE_$Mft. Has
- same interpretation as the lcn_bitmap above
- but except that it keeps track of the usage
- of the mft records rather than the lcns. */
- run_list *mft_runlist; /* Decompressed run list of the data attribute
- of FILE_$Mft. */
- __s64 number_of_mft_records; /* Number of records in the mft, equals
- the number of bits in mft_bitmap. */
- uchar_t *upcase; /* Upper case equivalents of all 65536
- 2-byte Unicode characters. Obtained
- from FILE_$UpCase. */
- __u32 upcase_len; /* Length in Unicode characters of the
- upcase table. */
-} ntfs_volume;
-
#endif /* defined NTFS_TYPES_H */
Index: unistr.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/unistr.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -U2 -r1.12 -r1.13
--- unistr.h 19 Apr 2002 18:23:56 -0000 1.12
+++ unistr.h 20 Apr 2002 23:09:42 -0000 1.13
@@ -27,6 +27,4 @@
#include "types.h"
-#include "endians.h"
-#include "support.h"
extern const __u8 legal_ansi_char_array[0x40];
Index: volume.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/volume.h,v
retrieving revision 1.16
retrieving revision 1.17
diff -U2 -r1.16 -r1.17
--- volume.h 14 Apr 2002 13:56:45 -0000 1.16
+++ volume.h 20 Apr 2002 23:09:42 -0000 1.17
@@ -29,4 +29,44 @@
#include "types.h"
+/*
+ * ntfs_volume - structure describing an open volume in memory
+ */
+typedef struct {
+ int fd; /* File descriptor associated with volume. */
+ char *dev_name; /* Name of the device/file the volume is in. */
+ char *vol_name; /* Name of the volume. */
+ __u8 major_ver; /* Ntfs major version of volume. */
+ __u8 minor_ver; /* Ntfs minor version of volume. */
+ __u16 flags; /* Bit array of VOLUME_* flags. */
+ __s64 number_of_clusters;/* Volume size in clusters, hence also the
+ number of bits in lcn_bitmap. */
+ __u32 cluster_size; /* Byte size of a cluster. */
+ __u32 mft_record_size; /* Byte size of a mft record. */
+ __s64 mft_lcn; /* Logical cluster number of the data attribute
+ for FILE_Mft. */
+ __s64 mftmirr_lcn; /* Logical cluster number of the data attribute
+ for FILE_MftMirr. */
+ __u8 cluster_size_bits; /* Log(2) of the byte size of a cluster. */
+ __u8 mft_record_size_bits;/* Log(2) of the byte size of a mft record. */
+ __u8 *lcn_bitmap; /* Value of data attribute of FILE_Bitmap. Each
+ bit represents a cluster on the volume, bit 0
+ representing lcn 0 and so on. A set bit means
+ that the cluster is in use and a zero bit
+ means the cluster is free. */
+ __u8 *mft_bitmap; /* Value of bitmap attribute of FILE_Mft. Has
+ same interpretation as the lcn_bitmap above
+ but except that it keeps track of the usage
+ of the mft records rather than the lcns. */
+ run_list *mft_runlist; /* Decompressed run list of the data attribute
+ of FILE_Mft. */
+ __s64 number_of_mft_records; /* Number of records in the mft, equals
+ the number of bits in mft_bitmap. */
+ uchar_t *upcase; /* Upper case equivalents of all 65536
+ 2-byte Unicode characters. Obtained
+ from FILE_UpCase. */
+ __u32 upcase_len; /* Length in Unicode characters of the
+ upcase table. */
+} ntfs_volume;
+
extern ntfs_volume *ntfs_mount(const char *name, unsigned long rwflag);
|