Changes by: szaka
Update of /cvsroot/linux-ntfs/ntfsprogs/include/ntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2356/include/ntfs
Modified Files:
dir.h layout.h security.h
Log Message:
Optionally create NTFS version 3.0 (W2K) or 3.1 (XP, W2K3, Vista).
Contributed by Erik Sornes. No side-effect for v1.2 NTFS which is still
the default. The implementation needs some minor work: see e.g. the chkdsk
messages and the result of ntfscmp'ing the two images.
Index: dir.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/dir.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -p -r1.7 -r1.8
--- dir.h 16 Oct 2005 23:33:04 -0000 1.7
+++ dir.h 19 Oct 2005 22:04:46 -0000 1.8
@@ -32,8 +32,14 @@
#define MAX_PATH 1024
#endif
-/* The little endian Unicode string $I30 as a global constant. */
+/* The little endian Unicode strings $I30, $SII, $SDH, $O, $Q
+ * as a global constant.
+ */
extern ntfschar I30[5];
+extern ntfschar SII[5];
+extern ntfschar SDH[5];
+extern ntfschar O[3];
+extern ntfschar Q[3];
extern u64 ntfs_inode_lookup_by_name(ntfs_inode *dir_ni,
const ntfschar *uname, const int uname_len);
Index: layout.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/layout.h,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -p -r1.31 -r1.32
--- layout.h 16 Oct 2005 19:21:47 -0000 1.31
+++ layout.h 19 Oct 2005 22:04:46 -0000 1.32
@@ -241,10 +241,15 @@ typedef enum {
/*
* These are the so far known MFT_RECORD_* flags (16-bit) which contain
* information about the mft record in which they are present.
+ * _4 and _8 are needed by $Extend sub-files (don't know what to
+ * call them yet...)
*/
+
typedef enum {
MFT_RECORD_IN_USE = const_cpu_to_le16(0x0001),
MFT_RECORD_IS_DIRECTORY = const_cpu_to_le16(0x0002),
+ MFT_RECORD_IS_4 = const_cpu_to_le16(0x0004),
+ MFT_RECORD_IS_8 = const_cpu_to_le16(0x0008),
MFT_REC_SPACE_FILLER = 0xffff /* Just to make flags 16-bit. */
} __attribute__ ((__packed__)) MFT_RECORD_FLAGS;
@@ -1822,6 +1827,25 @@ typedef struct {
u32 length; /* Size in bytes of this entry in $SDS stream. */
} __attribute__ ((__packed__)) SECURITY_DESCRIPTOR_HEADER;
+typedef struct {
+ u32 hash; /* Hash of the security descriptor. */
+ u32 security_id; /* The security_id assigned to the descriptor. */
+ u64 offset_in_sds; /* Offset of the descriptor in SDS data stream */
+ u32 size_in_sds; /* Size of the descriptor in SDS data stream */
+ u64 reserved_II; /* Padding - always unicode "II" */
+} __attribute__ ((__packed__)) SDH_INDEX_DATA;
+
+typedef struct {
+ u32 hash; /* Hash of the security descriptor. */
+ u32 security_id; /* The security_id assigned to the descriptor. */
+ u64 offset_in_sds; /* Offset of the descriptor in SDS data stream */
+ u32 size_in_sds; /* Size of the descriptor in SDS data stream */
+} __attribute__ ((__packed__)) SII_INDEX_DATA;
+
+typedef struct {
+ u64 owner_id;
+} __attribute__ ((__packed__)) QUOTA_O_INDEX_DATA;
+
/*
* The $SDS data stream contains the security descriptors, aligned on 16-byte
* boundaries, sorted by security_id in a B+ tree. Security descriptors cannot
@@ -2211,6 +2235,7 @@ typedef struct {
control entry in the data part of
the index. */
} __attribute__ ((__packed__)) key;
+
/* The (optional) index data is inserted here when creating. */
// VCN vcn; /* If INDEX_ENTRY_NODE bit in flags is set, the last
// eight bytes of this index entry contain the virtual
Index: security.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/security.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- security.h 15 Apr 2004 11:10:40 -0000 1.4
+++ security.h 19 Oct 2005 22:04:46 -0000 1.5
@@ -50,5 +50,6 @@ static __inline__ BOOL ntfs_sid_is_valid
extern int ntfs_sid_to_mbs_size(const SID *sid);
extern char *ntfs_sid_to_mbs(const SID *sid, char *sid_str,
size_t sid_str_size);
+extern GUID *generate_guid(GUID *guid);
#endif /* defined _NTFS_SECURITY_H */
|