Changes by: flatcap
Update of /cvsroot/linux-ntfs/linux-ntfs/include
In directory usw-pr-cvs1:/tmp/cvs-serv21991/include
Modified Files:
attrib.h bootsect.h inode.h layout.h mft.h mst.h runlist.h
types.h unistr.h volume.h
Log Message:
start to break up the dependency loops in the header files
Index: attrib.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/attrib.h,v
retrieving revision 1.45
retrieving revision 1.46
diff -U2 -r1.45 -r1.46
--- attrib.h 9 Jul 2002 19:17:48 -0000 1.45
+++ attrib.h 11 Jul 2002 13:18:11 -0000 1.46
@@ -25,6 +25,12 @@
#define ATTRIB_H
+/* Forward declarations */
+typedef struct _ntfs_attr ntfs_attr;
+typedef struct _ntfs_attr_search_ctx ntfs_attr_search_ctx;
+
#include "types.h"
#include "unistr.h"
+#include "runlist.h"
+#include "volume.h"
extern uchar_t AT_NONAME[];
@@ -199,4 +205,30 @@
u8 compression_block_clusters;
};
+
+/*
+ * Union of all known attribute values. For convenience. Used in the attr
+ * structure.
+ */
+typedef union {
+ u8; /* Unnamed u8 to serve as default when just using
+ a_val without specifying any of the below. */
+ STANDARD_INFORMATION std_inf;
+ ATTR_LIST_ENTRY al_entry;
+ FILE_NAME_ATTR filename;
+ OBJECT_ID_ATTR obj_id;
+ SECURITY_DESCRIPTOR_ATTR sec_desc;
+ VOLUME_NAME vol_name;
+ VOLUME_INFORMATION vol_inf;
+ DATA_ATTR data;
+ INDEX_ROOT index_root;
+ INDEX_BLOCK index_blk;
+ BITMAP_ATTR bmp;
+ REPARSE_POINT reparse;
+ EA_INFORMATION ea_inf;
+ EA_ATTR ea;
+ PROPERTY_SET property_set;
+ LOGGED_UTILITY_STREAM logged_util_stream;
+ EFS_ATTR efs;
+} attr_val;
extern void ntfs_attr_init(ntfs_attr *na, const BOOL non_resident,
Index: bootsect.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/bootsect.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -U2 -r1.11 -r1.12
--- bootsect.h 2 Jun 2002 23:02:20 -0000 1.11
+++ bootsect.h 11 Jul 2002 13:18:11 -0000 1.12
@@ -28,4 +28,5 @@
#include "types.h"
#include "volume.h"
+#include "layout.h"
/**
Index: inode.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/inode.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -U2 -r1.10 -r1.11
--- inode.h 2 Jul 2002 23:47:10 -0000 1.10
+++ inode.h 11 Jul 2002 13:18:11 -0000 1.11
@@ -23,6 +23,10 @@
#define NTFS_INODE_H
+/* Forward declaration */
+typedef struct _ntfs_inode ntfs_inode;
+
#include "types.h"
#include "support.h"
+#include "runlist.h"
/*
Index: layout.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/layout.h,v
retrieving revision 1.23
retrieving revision 1.24
diff -U2 -r1.23 -r1.24
--- layout.h 2 Jul 2002 23:47:10 -0000 1.23
+++ layout.h 11 Jul 2002 13:18:11 -0000 1.24
@@ -25,31 +25,7 @@
#define LAYOUT_H
-#include <stdint.h>
-#include <sys/types.h>
-#include <linux/types.h>
-
-typedef uint8_t u8;
-typedef uint16_t u16;
-typedef uint32_t u32;
-typedef uint64_t u64;
-
-typedef int8_t s8;
-typedef int16_t s16;
-typedef int32_t s32;
-typedef int64_t s64;
-
+#include "types.h"
#include "endians.h"
#include "support.h"
-
-/* 2-byte Unicode character type. */
-typedef u16 uchar_t;
-#define UCHAR_T_SIZE_BITS 1
-
-/*
- * 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;
/* The NTFS oem_id */
Index: mft.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/mft.h,v
retrieving revision 1.35
retrieving revision 1.36
diff -U2 -r1.35 -r1.36
--- mft.h 2 Jul 2002 23:47:10 -0000 1.35
+++ mft.h 11 Jul 2002 13:18:11 -0000 1.36
@@ -26,4 +26,5 @@
#include "volume.h"
+#include "layout.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.5
retrieving revision 1.6
diff -U2 -r1.5 -r1.6
--- mst.h 2 Jul 2002 23:47:10 -0000 1.5
+++ mst.h 11 Jul 2002 13:18:11 -0000 1.6
@@ -27,4 +27,5 @@
#include "types.h"
+#include "layout.h"
extern int ntfs_post_read_mst_fixup(NTFS_RECORD *b, const u32 size);
Index: runlist.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/runlist.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -U2 -r1.1 -r1.2
--- runlist.h 9 Jul 2002 19:17:48 -0000 1.1
+++ runlist.h 11 Jul 2002 13:18:11 -0000 1.2
@@ -27,6 +27,28 @@
#include "types.h"
-#include "layout.h"
+
+/* In memory vcn to lcn mapping array. */
+typedef struct _run_list_element run_list_element;
+typedef run_list_element run_list;
+
#include "attrib.h"
+#include "volume.h"
+
+/**
+ * run_list_element - in memory vcn to lcn mapping array element
+ * @vcn: starting vcn of the current array element
+ * @lcn: starting lcn of the current array element
+ * @length: length in clusters of the current array element
+ *
+ * The last vcn (in fact the last vcn + 1) is reached when length == 0.
+ *
+ * When lcn == -1 this means that the count vcns starting at vcn are not
+ * physically allocated (i.e. this is a hole / data is sparse).
+ */
+struct _run_list_element {/* In memory vcn to lcn mapping structure element. */
+ VCN vcn; /* vcn = Starting virtual cluster number. */
+ LCN lcn; /* lcn = Starting logical cluster number. */
+ s64 length; /* Run length in clusters. */
+};
extern LCN ntfs_rl_vcn_to_lcn(const run_list_element *rl, const VCN vcn);
Index: types.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/types.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -U2 -r1.10 -r1.11
--- types.h 2 Jul 2002 23:47:10 -0000 1.10
+++ types.h 11 Jul 2002 13:18:11 -0000 1.11
@@ -26,24 +26,27 @@
#define NTFS_TYPES_H
-#include "layout.h"
+#include <stdint.h>
+#include <sys/types.h>
+#include <linux/types.h>
+
+typedef uint8_t u8; /* Unsigned types of an exact size */
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+
+typedef int8_t s8; /* Signed types of an exact size */
+typedef int16_t s16;
+typedef int32_t s32;
+typedef int64_t s64;
-/**
- * run_list_element - in memory vcn to lcn mapping array element
- * @vcn: starting vcn of the current array element
- * @lcn: starting lcn of the current array element
- * @length: length in clusters of the current array element
- *
- * The last vcn (in fact the last vcn + 1) is reached when length == 0.
- *
- * When lcn == -1 this means that the count vcns starting at vcn are not
- * physically allocated (i.e. this is a hole / data is sparse).
- */
-typedef struct { /* In memory vcn to lcn mapping structure element. */
- VCN vcn; /* vcn = Starting virtual cluster number. */
- LCN lcn; /* lcn = Starting logical cluster number. */
- s64 length; /* Run length in clusters. */
-} run_list_element;
+typedef u16 uchar_t; /* 2-byte Unicode character type. */
+#define UCHAR_T_SIZE_BITS 1
-typedef run_list_element run_list; /* In memory vcn to lcn mapping array. */
+/*
+ * 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;
/*
@@ -63,39 +66,4 @@
IGNORE_CASE = 1,
} IGNORE_CASE_BOOL;
-
-/*
- * Union of all known attribute values. For convenience. Used in the attr
- * structure.
- */
-typedef union {
- u8; /* Unnamed u8 to serve as default when just using
- a_val without specifying any of the below. */
- STANDARD_INFORMATION std_inf;
- ATTR_LIST_ENTRY al_entry;
- FILE_NAME_ATTR filename;
- OBJECT_ID_ATTR obj_id;
- SECURITY_DESCRIPTOR_ATTR sec_desc;
- VOLUME_NAME vol_name;
- VOLUME_INFORMATION vol_inf;
- DATA_ATTR data;
- INDEX_ROOT index_root;
- INDEX_BLOCK index_blk;
- BITMAP_ATTR bmp;
- REPARSE_POINT reparse;
- EA_INFORMATION ea_inf;
- EA_ATTR ea;
- PROPERTY_SET property_set;
- LOGGED_UTILITY_STREAM logged_util_stream;
- EFS_ATTR efs;
-} attr_val;
-
-/*
- * Forward definitions for the global ntfs specific structures. Avoids the big
- * include file interdependencies mess.
- */
-typedef struct _ntfs_volume ntfs_volume;
-typedef struct _ntfs_inode ntfs_inode;
-typedef struct _ntfs_attr ntfs_attr;
-typedef struct _ntfs_attr_search_ctx ntfs_attr_search_ctx;
#endif /* defined NTFS_TYPES_H */
Index: unistr.h
===================================================================
RCS file: /cvsroot/linux-ntfs/linux-ntfs/include/unistr.h,v
retrieving revision 1.15
retrieving revision 1.16
diff -U2 -r1.15 -r1.16
--- unistr.h 2 Jul 2002 23:47:10 -0000 1.15
+++ unistr.h 11 Jul 2002 13:18:11 -0000 1.16
@@ -27,4 +27,5 @@
#include "types.h"
+#include "layout.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.25
retrieving revision 1.26
diff -U2 -r1.25 -r1.26
--- volume.h 2 Jul 2002 23:47:10 -0000 1.25
+++ volume.h 11 Jul 2002 13:18:11 -0000 1.26
@@ -32,6 +32,10 @@
#endif
+/* Forward declaration */
+typedef struct _ntfs_volume ntfs_volume;
+
#include "types.h"
#include "support.h"
+#include "inode.h"
/*
|