Changes by: cha0smaster
Update of /cvsroot/linux-ntfs/ntfsprogs/include/ntfs
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31630/include/ntfs
Modified Files:
attrib.h inode.h layout.h
Log Message:
see changelog
Index: attrib.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/attrib.h,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -p -r1.25 -r1.26
--- attrib.h 31 Oct 2005 01:15:12 -0000 1.25
+++ attrib.h 7 Nov 2005 20:37:08 -0000 1.26
@@ -203,30 +203,30 @@ typedef enum {
#define NAttrSetNonResident(na) set_nattr_flag(na, NonResident)
#define NAttrClearNonResident(na) clear_nattr_flag(na, NonResident)
-#define GenNAttrIno(flag) \
-static inline int NAttr##flag(ntfs_attr *na) \
+#define GenNAttrIno(func_name,flag) \
+static inline int NAttr##func_name(ntfs_attr *na) \
{ \
if (na->type == AT_DATA && na->name == AT_UNNAMED) \
- return NIno##flag(na->ni); \
+ return (na->ni->flags & FILE_ATTR_##flag); \
return 0; \
} \
-static inline void NAttrSet##flag(ntfs_attr *na) \
+static inline void NAttrSet##func_name(ntfs_attr *na) \
{ \
if (na->type == AT_DATA && na->name == AT_UNNAMED) \
- NInoSet##flag(na->ni); \
+ na->ni->flags |= FILE_ATTR_##flag; \
else \
ntfs_log_trace("BUG! Should be called only for "\
"unnamed data attribute.\n"); \
} \
-static inline void NAttrClear##flag(ntfs_attr *na) \
+static inline void NAttrClear##func_name(ntfs_attr *na) \
{ \
if (na->type == AT_DATA && na->name == AT_UNNAMED) \
- NInoClear##flag(na->ni); \
+ na->ni->flags &= ~FILE_ATTR_##flag; \
}
-GenNAttrIno(Compressed)
-GenNAttrIno(Encrypted)
-GenNAttrIno(Sparse)
+GenNAttrIno(Compressed, COMPRESSED)
+GenNAttrIno(Encrypted, ENCRYPTED)
+GenNAttrIno(Sparse, SPARSE_FILE)
/*
* Union of all known attribute values. For convenience. Used in the attr
Index: inode.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/inode.h,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -p -r1.21 -r1.22
--- inode.h 5 Nov 2005 22:54:43 -0000 1.21
+++ inode.h 7 Nov 2005 20:37:08 -0000 1.22
@@ -45,9 +45,6 @@ typedef enum {
NI_AttrList, /* 1: Mft record contains an attribute list. */
NI_AttrListDirty, /* 1: Attribute list needs to be written to the
mft record and then to disk. */
- NI_Compressed, /* 1: Inode is compressed. */
- NI_Encrypted, /* 1: Inode is encrypted. */
- NI_Sparse, /* 1: Inode is sparse. */
NI_FileNameDirty, /* 1: FILE_NAME attributes need to be updated
in the index. */
} ntfs_inode_state_bits;
@@ -87,18 +84,6 @@ typedef enum {
#define NInoAttrListTestAndSetDirty(ni) test_and_set_nino_al_flag(ni, Dirty)
#define NInoAttrListTestAndClearDirty(ni) test_and_clear_nino_al_flag(ni, Dirty)
-#define NInoCompressed(ni) test_nino_flag(ni, Compressed)
-#define NInoSetCompressed(ni) set_nino_flag(ni, Compressed)
-#define NInoClearCompressed(ni) clear_nino_flag(ni, Compressed)
-
-#define NInoEncrypted(ni) test_nino_flag(ni, Encrypted)
-#define NInoSetEncrypted(ni) set_nino_flag(ni, Encrypted)
-#define NInoClearEncrypted(ni) clear_nino_flag(ni, Encrypted)
-
-#define NInoSparse(ni) test_nino_flag(ni, Sparse)
-#define NInoSetSparse(ni) set_nino_flag(ni, Sparse)
-#define NInoClearSparse(ni) clear_nino_flag(ni, Sparse)
-
#define NInoFileNameDirty(ni) \
test_nino_flag(ni, FileNameDirty)
#define NInoFileNameSetDirty(ni) \
@@ -148,7 +133,7 @@ struct _ntfs_inode {
void *private_data; /* ntfs_dt containing this inode */
int ref_count;
- /* Below 2 fields needed to update indexes. They valid if != -1. */
+ /* Below fields are valid only for base inode. */
s64 data_size;
s64 allocated_size;
Index: layout.h
===================================================================
RCS file: /cvsroot/linux-ntfs/ntfsprogs/include/ntfs/layout.h,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -p -r1.43 -r1.44
--- layout.h 6 Nov 2005 14:15:38 -0000 1.43
+++ layout.h 7 Nov 2005 20:37:08 -0000 1.44
@@ -852,9 +852,10 @@ typedef enum {
is used to obtain all flags that are valid for reading. */
FILE_ATTR_VALID_SET_FLAGS = const_cpu_to_le32(0x000031a7),
/* FILE_ATTR_VALID_SET_FLAGS masks out the old DOS VolId, the
- F_A_DEVICE, F_A_DIRECTORY, F_A_SPARSE_FILE, F_A_REPARSE_POINT,
- F_A_COMPRESSED and F_A_ENCRYPTED and preserves the rest. This mask
- is used to to obtain all flags that are valid for setting. */
+ FILE_ATTR_DEVICE, FILE_ATTR_DIRECTORY, FILE_ATTR_SPARSE_FILE,
+ FILE_ATTR_REPARSE_POINT, FILE_ATRE_COMPRESSED and FILE_ATTR_ENCRYPTED
+ and preserves the rest. This mask is used to to obtain all flags that
+ are valid for setting. */
/*
* These flags are only present in the FILE_NAME attribute (in the
|