Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
ee05a6ce
Commit
ee05a6ce
authored
Sep 28, 2004
by
Richard Russon
Browse files
Options
Browse Files
Download
Plain Diff
Merge
ssh://linux-ntfs@bkbits.net/ntfs-2.6
into flatcap.org:/home/flatcap/backup/bk/ntfs-2.6
parents
bf1a985a
11d92b56
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
384 additions
and
328 deletions
+384
-328
fs/ntfs/ChangeLog
fs/ntfs/ChangeLog
+3
-3
fs/ntfs/layout.h
fs/ntfs/layout.h
+377
-324
fs/ntfs/logfile.h
fs/ntfs/logfile.h
+4
-1
No files found.
fs/ntfs/ChangeLog
View file @
ee05a6ce
...
@@ -48,9 +48,9 @@ ToDo/Notes:
...
@@ -48,9 +48,9 @@ ToDo/Notes:
Affected files are fs/ntfs/layout.h, logfile.h, and time.h.
Affected files are fs/ntfs/layout.h, logfile.h, and time.h.
- Do proper type casting when using ntfs_is_*_recordp() in
- Do proper type casting when using ntfs_is_*_recordp() in
fs/ntfs/logfile.c, mft.c, and super.c.
fs/ntfs/logfile.c, mft.c, and super.c.
- Fix all the sparse bitwise warnings. Had to change all the
enums
- Fix all the sparse bitwise warnings. Had to change all the
typedef
storing little endian values to #defines because we cannot set enums
enums storing little endian values to simple enums plus a typedef for
t
o be little endian so we had lots of bitwise warnings from sparse
.
t
he datatype to make sparse happy
.
- Fix a bug found by the new sparse bitwise warnings where the default
- Fix a bug found by the new sparse bitwise warnings where the default
upcase table was defined as a pointer to wchar_t rather than ntfschar
upcase table was defined as a pointer to wchar_t rather than ntfschar
in fs/ntfs/ntfs.h and super.c.
in fs/ntfs/ntfs.h and super.c.
...
...
fs/ntfs/layout.h
View file @
ee05a6ce
...
@@ -112,28 +112,29 @@ typedef struct {
...
@@ -112,28 +112,29 @@ typedef struct {
* Magic identifiers present at the beginning of all ntfs record containing
* Magic identifiers present at the beginning of all ntfs record containing
* records (like mft records for example).
* records (like mft records for example).
*/
*/
/* Found in $MFT/$DATA. */
enum
{
#define magic_FILE const_cpu_to_le32(0x454c4946)
/* Mft entry. */
/* Found in $MFT/$DATA. */
#define magic_INDX const_cpu_to_le32(0x58444e49)
/* Index buffer. */
magic_FILE
=
const_cpu_to_le32
(
0x454c4946
),
/* Mft entry. */
#define magic_HOLE const_cpu_to_le32(0x454c4f48)
/* ? (NTFS 3.0+?) */
magic_INDX
=
const_cpu_to_le32
(
0x58444e49
),
/* Index buffer. */
magic_HOLE
=
const_cpu_to_le32
(
0x454c4f48
),
/* ? (NTFS 3.0+?) */
/* Found in $LogFile/$DATA. */
#define magic_RSTR const_cpu_to_le32(0x52545352)
/* Restart page. */
/* Found in $LogFile/$DATA. */
#define magic_RCRD const_cpu_to_le32(0x44524352)
/* Log record page. */
magic_RSTR
=
const_cpu_to_le32
(
0x52545352
),
/* Restart page. */
magic_RCRD
=
const_cpu_to_le32
(
0x44524352
),
/* Log record page. */
/* Found in $LogFile/$DATA. (May be found in $MFT/$DATA, also?) */
#define magic_CHKD const_cpu_to_le32(0x424b4843)
/* Modified by chkdsk. */
/* Found in $LogFile/$DATA. (May be found in $MFT/$DATA, also?) */
magic_CHKD
=
const_cpu_to_le32
(
0x424b4843
),
/* Modified by chkdsk. */
/* Found in all ntfs record containing records. */
magic_BAAD
=
const_cpu_to_le32
(
0x44414142
),
/* Failed multi sector
transfer was detected. */
/*
* Found in $LogFile/$DATA when a page is full of 0xff bytes and is
* thus not initialized. Page must be initialized before using it.
*/
magic_empty
=
const_cpu_to_le32
(
0xffffffff
)
/* Record is empty. */
};
/* Found in all ntfs record containing records. */
#define magic_BAAD const_cpu_to_le32(0x44414142)
/* Failed multi sector
transfer was detected. */
/*
* Found in $LogFile/$DATA when a page is full or 0xff bytes and is thus not
* initialized. User has to initialize the page before using it.
*/
#define magic_empty const_cpu_to_le32(0xffffffff)
/* Record is empty and has to
be initialized before it
can be used. */
typedef
le32
NTFS_RECORD_TYPE
;
typedef
le32
NTFS_RECORD_TYPE
;
/*
/*
...
@@ -256,8 +257,10 @@ typedef enum {
...
@@ -256,8 +257,10 @@ typedef enum {
* These are the so far known MFT_RECORD_* flags (16-bit) which contain
* These are the so far known MFT_RECORD_* flags (16-bit) which contain
* information about the mft record in which they are present.
* information about the mft record in which they are present.
*/
*/
#define MFT_RECORD_IN_USE const_cpu_to_le16(0x0001)
enum
{
#define MFT_RECORD_IS_DIRECTORY const_cpu_to_le16(0x0002)
MFT_RECORD_IN_USE
=
const_cpu_to_le16
(
0x0001
),
MFT_RECORD_IS_DIRECTORY
=
const_cpu_to_le16
(
0x0002
),
};
typedef
le16
MFT_RECORD_FLAGS
;
typedef
le16
MFT_RECORD_FLAGS
;
...
@@ -406,25 +409,27 @@ typedef struct {
...
@@ -406,25 +409,27 @@ typedef struct {
* in the below defines exchanging AT_ for the dollar sign ($). If that is not
* in the below defines exchanging AT_ for the dollar sign ($). If that is not
* a revealing choice of symbol I do not know what is... (-;
* a revealing choice of symbol I do not know what is... (-;
*/
*/
#define AT_UNUSED const_cpu_to_le32( 0)
enum
{
#define AT_STANDARD_INFORMATION const_cpu_to_le32( 0x10)
AT_UNUSED
=
const_cpu_to_le32
(
0
),
#define AT_ATTRIBUTE_LIST const_cpu_to_le32( 0x20)
AT_STANDARD_INFORMATION
=
const_cpu_to_le32
(
0x10
),
#define AT_FILE_NAME const_cpu_to_le32( 0x30)
AT_ATTRIBUTE_LIST
=
const_cpu_to_le32
(
0x20
),
#define AT_OBJECT_ID const_cpu_to_le32( 0x40)
AT_FILE_NAME
=
const_cpu_to_le32
(
0x30
),
#define AT_SECURITY_DESCRIPTOR const_cpu_to_le32( 0x50)
AT_OBJECT_ID
=
const_cpu_to_le32
(
0x40
),
#define AT_VOLUME_NAME const_cpu_to_le32( 0x60)
AT_SECURITY_DESCRIPTOR
=
const_cpu_to_le32
(
0x50
),
#define AT_VOLUME_INFORMATION const_cpu_to_le32( 0x70)
AT_VOLUME_NAME
=
const_cpu_to_le32
(
0x60
),
#define AT_DATA const_cpu_to_le32( 0x80)
AT_VOLUME_INFORMATION
=
const_cpu_to_le32
(
0x70
),
#define AT_INDEX_ROOT const_cpu_to_le32( 0x90)
AT_DATA
=
const_cpu_to_le32
(
0x80
),
#define AT_INDEX_ALLOCATION const_cpu_to_le32( 0xa0)
AT_INDEX_ROOT
=
const_cpu_to_le32
(
0x90
),
#define AT_BITMAP const_cpu_to_le32( 0xb0)
AT_INDEX_ALLOCATION
=
const_cpu_to_le32
(
0xa0
),
#define AT_REPARSE_POINT const_cpu_to_le32( 0xc0)
AT_BITMAP
=
const_cpu_to_le32
(
0xb0
),
#define AT_EA_INFORMATION const_cpu_to_le32( 0xd0)
AT_REPARSE_POINT
=
const_cpu_to_le32
(
0xc0
),
#define AT_EA const_cpu_to_le32( 0xe0)
AT_EA_INFORMATION
=
const_cpu_to_le32
(
0xd0
),
#define AT_PROPERTY_SET const_cpu_to_le32( 0xf0)
AT_EA
=
const_cpu_to_le32
(
0xe0
),
#define AT_LOGGED_UTILITY_STREAM const_cpu_to_le32( 0x100)
AT_PROPERTY_SET
=
const_cpu_to_le32
(
0xf0
),
#define AT_FIRST_USER_DEFINED_ATTRIBUTE const_cpu_to_le32( 0x1000)
AT_LOGGED_UTILITY_STREAM
=
const_cpu_to_le32
(
0x100
),
#define AT_END const_cpu_to_le32(0xffffffff)
AT_FIRST_USER_DEFINED_ATTRIBUTE
=
const_cpu_to_le32
(
0x1000
),
AT_END
=
const_cpu_to_le32
(
0xffffffff
)
};
typedef
le32
ATTR_TYPE
;
typedef
le32
ATTR_TYPE
;
...
@@ -466,13 +471,15 @@ typedef le32 ATTR_TYPE;
...
@@ -466,13 +471,15 @@ typedef le32 ATTR_TYPE;
* the 2nd object_id. If the first le32 values of both object_ids were
* the 2nd object_id. If the first le32 values of both object_ids were
* equal then the second le32 values would be compared, etc.
* equal then the second le32 values would be compared, etc.
*/
*/
#define COLLATION_BINARY const_cpu_to_le32(0x00)
enum
{
#define COLLATION_FILE_NAME const_cpu_to_le32(0x01)
COLLATION_BINARY
=
const_cpu_to_le32
(
0x00
),
#define COLLATION_UNICODE_STRING const_cpu_to_le32(0x02)
COLLATION_FILE_NAME
=
const_cpu_to_le32
(
0x01
),
#define COLLATION_NTOFS_ULONG const_cpu_to_le32(0x10)
COLLATION_UNICODE_STRING
=
const_cpu_to_le32
(
0x02
),
#define COLLATION_NTOFS_SID const_cpu_to_le32(0x11)
COLLATION_NTOFS_ULONG
=
const_cpu_to_le32
(
0x10
),
#define COLLATION_NTOFS_SECURITY_HASH const_cpu_to_le32(0x12)
COLLATION_NTOFS_SID
=
const_cpu_to_le32
(
0x11
),
#define COLLATION_NTOFS_ULONGS const_cpu_to_le32(0x13)
COLLATION_NTOFS_SECURITY_HASH
=
const_cpu_to_le32
(
0x12
),
COLLATION_NTOFS_ULONGS
=
const_cpu_to_le32
(
0x13
)
};
typedef
le32
COLLATION_RULE
;
typedef
le32
COLLATION_RULE
;
...
@@ -483,13 +490,15 @@ typedef le32 COLLATION_RULE;
...
@@ -483,13 +490,15 @@ typedef le32 COLLATION_RULE;
* The INDEXABLE flag is fairly certainly correct as only the file name
* The INDEXABLE flag is fairly certainly correct as only the file name
* attribute has this flag set and this is the only attribute indexed in NT4.
* attribute has this flag set and this is the only attribute indexed in NT4.
*/
*/
#define INDEXABLE const_cpu_to_le32(0x02)
/* Attribute can be
enum
{
indexed. */
INDEXABLE
=
const_cpu_to_le32
(
0x02
),
/* Attribute can be
#define NEED_TO_REGENERATE const_cpu_to_le32(0x40)
/* Need to regenerate
indexed. */
during regeneration
NEED_TO_REGENERATE
=
const_cpu_to_le32
(
0x40
),
/* Need to regenerate
phase. */
during regeneration
#define CAN_BE_NON_RESIDENT const_cpu_to_le32(0x80)
/* Attribute can be
phase. */
non-resident. */
CAN_BE_NON_RESIDENT
=
const_cpu_to_le32
(
0x80
),
/* Attribute can be
non-resident. */
};
typedef
le32
ATTR_DEF_FLAGS
;
typedef
le32
ATTR_DEF_FLAGS
;
...
@@ -519,12 +528,14 @@ typedef struct {
...
@@ -519,12 +528,14 @@ typedef struct {
/*
/*
* Attribute flags (16-bit).
* Attribute flags (16-bit).
*/
*/
#define ATTR_IS_COMPRESSED const_cpu_to_le16(0x0001)
enum
{
#define ATTR_COMPRESSION_MASK const_cpu_to_le16(0x00ff)
/* Compression method
ATTR_IS_COMPRESSED
=
const_cpu_to_le16
(
0x0001
),
mask. Also, first
ATTR_COMPRESSION_MASK
=
const_cpu_to_le16
(
0x00ff
),
/* Compression method
illegal value. */
mask. Also, first
#define ATTR_IS_ENCRYPTED const_cpu_to_le16(0x4000)
illegal value. */
#define ATTR_IS_SPARSE const_cpu_to_le16(0x8000)
ATTR_IS_ENCRYPTED
=
const_cpu_to_le16
(
0x4000
),
ATTR_IS_SPARSE
=
const_cpu_to_le16
(
0x8000
),
}
__attribute__
((
__packed__
));
typedef
le16
ATTR_FLAGS
;
typedef
le16
ATTR_FLAGS
;
...
@@ -598,9 +609,11 @@ typedef le16 ATTR_FLAGS;
...
@@ -598,9 +609,11 @@ typedef le16 ATTR_FLAGS;
/*
/*
* Flags of resident attributes (8-bit).
* Flags of resident attributes (8-bit).
*/
*/
#define RESIDENT_ATTR_IS_INDEXED 0x01
/* Attribute is referenced in an index
enum
{
(has implications for deleting and
RESIDENT_ATTR_IS_INDEXED
=
0x01
,
/* Attribute is referenced in an index
modifying the attribute). */
(has implications for deleting and
modifying the attribute). */
}
__attribute__
((
__packed__
));
typedef
u8
RESIDENT_ATTR_FLAGS
;
typedef
u8
RESIDENT_ATTR_FLAGS
;
...
@@ -703,54 +716,57 @@ typedef ATTR_RECORD ATTR_REC;
...
@@ -703,54 +716,57 @@ typedef ATTR_RECORD ATTR_REC;
/*
/*
* File attribute flags (32-bit).
* File attribute flags (32-bit).
*
*/
* The following flags are only present in the STANDARD_INFORMATION attribute
enum
{
* (in the field file_attributes).
/*
*/
* The following flags are only present in the STANDARD_INFORMATION
#define FILE_ATTR_READONLY const_cpu_to_le32(0x00000001)
* attribute (in the field file_attributes).
#define FILE_ATTR_HIDDEN const_cpu_to_le32(0x00000002)
*/
#define FILE_ATTR_SYSTEM const_cpu_to_le32(0x00000004)
FILE_ATTR_READONLY
=
const_cpu_to_le32
(
0x00000001
),
/* Old DOS volid. Unused in NT. = cpu_to_le32(0x00000008), */
FILE_ATTR_HIDDEN
=
const_cpu_to_le32
(
0x00000002
),
FILE_ATTR_SYSTEM
=
const_cpu_to_le32
(
0x00000004
),
#define FILE_ATTR_DIRECTORY const_cpu_to_le32(0x00000010)
/* Old DOS volid. Unused in NT. = const_cpu_to_le32(0x00000008), */
/* FILE_ATTR_DIRECTORY is not considered valid in NT. It is reserved for the
DOS SUBDIRECTORY flag. */
FILE_ATTR_DIRECTORY
=
const_cpu_to_le32
(
0x00000010
),
#define FILE_ATTR_ARCHIVE const_cpu_to_le32(0x00000020)
/* Note, FILE_ATTR_DIRECTORY is not considered valid in NT. It is
#define FILE_ATTR_DEVICE const_cpu_to_le32(0x00000040)
reserved for the DOS SUBDIRECTORY flag. */
#define FILE_ATTR_NORMAL const_cpu_to_le32(0x00000080)
FILE_ATTR_ARCHIVE
=
const_cpu_to_le32
(
0x00000020
),
FILE_ATTR_DEVICE
=
const_cpu_to_le32
(
0x00000040
),
#define FILE_ATTR_TEMPORARY const_cpu_to_le32(0x00000100)
FILE_ATTR_NORMAL
=
const_cpu_to_le32
(
0x00000080
),
#define FILE_ATTR_SPARSE_FILE const_cpu_to_le32(0x00000200)
#define FILE_ATTR_REPARSE_POINT const_cpu_to_le32(0x00000400)
FILE_ATTR_TEMPORARY
=
const_cpu_to_le32
(
0x00000100
),
#define FILE_ATTR_COMPRESSED const_cpu_to_le32(0x00000800)
FILE_ATTR_SPARSE_FILE
=
const_cpu_to_le32
(
0x00000200
),
FILE_ATTR_REPARSE_POINT
=
const_cpu_to_le32
(
0x00000400
),
#define FILE_ATTR_OFFLINE const_cpu_to_le32(0x00001000)
FILE_ATTR_COMPRESSED
=
const_cpu_to_le32
(
0x00000800
),
#define FILE_ATTR_NOT_CONTENT_INDEXED const_cpu_to_le32(0x00002000)
#define FILE_ATTR_ENCRYPTED const_cpu_to_le32(0x00004000)
FILE_ATTR_OFFLINE
=
const_cpu_to_le32
(
0x00001000
),
FILE_ATTR_NOT_CONTENT_INDEXED
=
const_cpu_to_le32
(
0x00002000
),
#define FILE_ATTR_VALID_FLAGS const_cpu_to_le32(0x00007fb7)
FILE_ATTR_ENCRYPTED
=
const_cpu_to_le32
(
0x00004000
),
/* FILE_ATTR_VALID_FLAGS masks out the old DOS VolId and the FILE_ATTR_DEVICE
and preserves everything else. This mask is used to obtain all flags that
FILE_ATTR_VALID_FLAGS
=
const_cpu_to_le32
(
0x00007fb7
),
are valid for reading. */
/* Note, FILE_ATTR_VALID_FLAGS masks out the old DOS VolId and the
#define FILE_ATTR_VALID_SET_FLAGS const_cpu_to_le32(0x000031a7)
FILE_ATTR_DEVICE and preserves everything else. This mask is used
/* FILE_ATTR_VALID_SET_FLAGS masks out the old DOS VolId, the F_A_DEVICE,
to obtain all flags that are valid for reading. */
F_A_DIRECTORY, F_A_SPARSE_FILE, F_A_REPARSE_POINT, F_A_COMPRESSED, and
FILE_ATTR_VALID_SET_FLAGS
=
const_cpu_to_le32
(
0x000031a7
),
F_A_ENCRYPTED and preserves the rest. This mask is used to to obtain all
/* Note, FILE_ATTR_VALID_SET_FLAGS masks out the old DOS VolId, the
flags that are valid for setting. */
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. */
* The following flags are only present in the FILE_NAME attribute (in the
* field file_attributes).
/*
*/
* The following flags are only present in the FILE_NAME attribute (in
#define FILE_ATTR_DUP_FILE_NAME_INDEX_PRESENT const_cpu_to_le32(0x10000000)
* the field file_attributes).
/* This is a copy of the corresponding bit from the mft record, telling us
*/
whether this is a directory or not, i.e. whether it has an index root
FILE_ATTR_DUP_FILE_NAME_INDEX_PRESENT
=
const_cpu_to_le32
(
0x10000000
),
attribute or not. */
/* Note, this is a copy of the corresponding bit from the mft record,
#define FILE_ATTR_DUP_VIEW_INDEX_PRESENT const_cpu_to_le32(0x20000000)
telling us whether this is a directory or not, i.e. whether it has
/* This is a copy of the corresponding bit from the mft record, telling us
an index root attribute or not. */
whether this file has a view index present (eg. object id index, quota
FILE_ATTR_DUP_VIEW_INDEX_PRESENT
=
const_cpu_to_le32
(
0x20000000
),
index, one of the security indexes or the encrypting file system related
/* Note, this is a copy of the corresponding bit from the mft record,
indexes). */
telling us whether this file has a view index present (eg. object id
index, quota index, one of the security indexes or the encrypting
file system related indexes). */
};
typedef
le32
FILE_ATTR_FLAGS
;
typedef
le32
FILE_ATTR_FLAGS
;
...
@@ -923,24 +939,26 @@ typedef struct {
...
@@ -923,24 +939,26 @@ typedef struct {
/*
/*
* Possible namespaces for filenames in ntfs (8-bit).
* Possible namespaces for filenames in ntfs (8-bit).
*/
*/
#define FILE_NAME_POSIX 0x00
enum
{
FILE_NAME_POSIX
=
0x00
,
/* This is the largest namespace. It is case sensitive and allows all
/* This is the largest namespace. It is case sensitive and allows all
Unicode characters except for: '\0' and '/'. Beware that in
Unicode characters except for: '\0' and '/'. Beware that in
WinNT/2k files which eg have the same name except for their case
WinNT/2k files which eg have the same name except for their case
will not be distinguished by the standard utilities and thus a "del
will not be distinguished by the standard utilities and thus a "del
filename" will delete both "filename" and "fileName" without
filename" will delete both "filename" and "fileName" without
warning. */
warning. */
#define FILE_NAME_WIN32 0x01
FILE_NAME_WIN32
=
0x01
,
/* The standard WinNT/2k NTFS long filenames. Case insensitive. All
/* The standard WinNT/2k NTFS long filenames. Case insensitive. All
Unicode chars except: '\0', '"', '*', '/', ':', '<', '>', '?', '\',
Unicode chars except: '\0', '"', '*', '/', ':', '<', '>', '?', '\',
and '|'. Further, names cannot end with a '.' or a space. */
and '|'. Further, names cannot end with a '.' or a space. */
#define FILE_NAME_DOS 0x02
FILE_NAME_DOS
=
0x02
,
/* The standard DOS filenames (8.3 format). Uppercase only. All 8-bit
/* The standard DOS filenames (8.3 format). Uppercase only. All 8-bit
characters greater space, except: '"', '*', '+', ',', '/', ':', ';',
characters greater space, except: '"', '*', '+', ',', '/', ':', ';',
'<', '=', '>', '?', and '\'. */
'<', '=', '>', '?', and '\'. */
#define FILE_NAME_WIN32_AND_DOS 0x03
FILE_NAME_WIN32_AND_DOS
=
0x03
,
/* 3 means that both the Win32 and the DOS filenames are identical and
/* 3 means that both the Win32 and the DOS filenames are identical and
hence have been saved in this single filename record. */
hence have been saved in this single filename record. */
}
__attribute__
((
__packed__
));
typedef
u8
FILE_NAME_TYPE_FLAGS
;
typedef
u8
FILE_NAME_TYPE_FLAGS
;
...
@@ -1248,29 +1266,30 @@ typedef enum {
...
@@ -1248,29 +1266,30 @@ typedef enum {
/*
/*
* The predefined ACE types (8-bit, see below).
* The predefined ACE types (8-bit, see below).
*/
*/
#define ACCESS_MIN_MS_ACE_TYPE 0
enum
{
#define ACCESS_ALLOWED_ACE_TYPE 0
ACCESS_MIN_MS_ACE_TYPE
=
0
,
#define ACCESS_DENIED_ACE_TYPE 1
ACCESS_ALLOWED_ACE_TYPE
=
0
,
#define SYSTEM_AUDIT_ACE_TYPE 2
ACCESS_DENIED_ACE_TYPE
=
1
,
#define SYSTEM_ALARM_ACE_TYPE 3
/* Not implemented as of
SYSTEM_AUDIT_ACE_TYPE
=
2
,
Win2k. */
SYSTEM_ALARM_ACE_TYPE
=
3
,
/* Not implemented as of
Win2k. */
#define ACCESS_MAX_MS_V2_ACE_TYPE 3
ACCESS_MAX_MS_V2_ACE_TYPE
=
3
,
#define ACCESS_ALLOWED_COMPOUND_ACE_TYPE 4
ACCESS_ALLOWED_COMPOUND_ACE_TYPE
=
4
,
#define ACCESS_MAX_MS_V3_ACE_TYPE 4
ACCESS_MAX_MS_V3_ACE_TYPE
=
4
,
/* The following are Win2k only. */
/* The following are Win2k only. */
#define ACCESS_MIN_MS_OBJECT_ACE_TYPE 5
ACCESS_MIN_MS_OBJECT_ACE_TYPE
=
5
,
#define ACCESS_ALLOWED_OBJECT_ACE_TYPE 5
ACCESS_ALLOWED_OBJECT_ACE_TYPE
=
5
,
#define ACCESS_DENIED_OBJECT_ACE_TYPE 6
ACCESS_DENIED_OBJECT_ACE_TYPE
=
6
,
#define SYSTEM_AUDIT_OBJECT_ACE_TYPE 7
SYSTEM_AUDIT_OBJECT_ACE_TYPE
=
7
,
#define SYSTEM_ALARM_OBJECT_ACE_TYPE 8
SYSTEM_ALARM_OBJECT_ACE_TYPE
=
8
,
#define ACCESS_MAX_MS_OBJECT_ACE_TYPE 8
ACCESS_MAX_MS_OBJECT_ACE_TYPE
=
8
,
#define ACCESS_MAX_MS_V4_ACE_TYPE 8
ACCESS_MAX_MS_V4_ACE_TYPE
=
8
,
/* This one is for WinNT/2k. */
/* This one is for WinNT/2k. */
#define ACCESS_MAX_MS_ACE_TYPE 8
ACCESS_MAX_MS_ACE_TYPE
=
8
,
}
__attribute__
((
__packed__
));
typedef
u8
ACE_TYPES
;
typedef
u8
ACE_TYPES
;
...
@@ -1284,17 +1303,19 @@ typedef u8 ACE_TYPES;
...
@@ -1284,17 +1303,19 @@ typedef u8 ACE_TYPES;
* FAILED_ACCESS_ACE_FLAG is only used with system audit and alarm ACE types
* FAILED_ACCESS_ACE_FLAG is only used with system audit and alarm ACE types
* to indicate that a message is generated (in Windows!) for failed accesses.
* to indicate that a message is generated (in Windows!) for failed accesses.
*/
*/
/* The inheritance flags. */
enum
{
#define OBJECT_INHERIT_ACE 0x01
/* The inheritance flags. */
#define CONTAINER_INHERIT_ACE 0x02
OBJECT_INHERIT_ACE
=
0x01
,
#define NO_PROPAGATE_INHERIT_ACE 0x04
CONTAINER_INHERIT_ACE
=
0x02
,
#define INHERIT_ONLY_ACE 0x08
NO_PROPAGATE_INHERIT_ACE
=
0x04
,
#define INHERITED_ACE 0x10
/* Win2k only. */
INHERIT_ONLY_ACE
=
0x08
,
#define VALID_INHERIT_FLAGS 0x1f
INHERITED_ACE
=
0x10
,
/* Win2k only. */
VALID_INHERIT_FLAGS
=
0x1f
,
/* The audit flags. */
/* The audit flags. */
#define SUCCESSFUL_ACCESS_ACE_FLAG 0x40
SUCCESSFUL_ACCESS_ACE_FLAG
=
0x40
,
#define FAILED_ACCESS_ACE_FLAG 0x80
FAILED_ACCESS_ACE_FLAG
=
0x80
,
}
__attribute__
((
__packed__
));
typedef
u8
ACE_FLAGS
;
typedef
u8
ACE_FLAGS
;
...
@@ -1322,129 +1343,130 @@ typedef struct {
...
@@ -1322,129 +1343,130 @@ typedef struct {
* The specific rights (bits 0 to 15). These depend on the type of the object
* The specific rights (bits 0 to 15). These depend on the type of the object
* being secured by the ACE.
* being secured by the ACE.
*/
*/
enum
{
/* Specific rights for files and directories are as follows: */
/* Specific rights for files and directories are as follows: */
/* Right to read data from the file. (FILE) */
FILE_READ_DATA
=
const_cpu_to_le32
(
0x00000001
),
/* Right to read data from the file. (FILE) */
/* Right to list contents of a directory. (DIRECTORY) */
#define FILE_READ_DATA const_cpu_to_le32(0x00000001)
FILE_LIST_DIRECTORY
=
const_cpu_to_le32
(
0x00000001
),
/* Right to list contents of a directory. (DIRECTORY) */
#define FILE_LIST_DIRECTORY const_cpu_to_le32(0x00000001)
/* Right to write data to the file. (FILE) */
/* Right to write data to the file. (FILE) */
#define FILE_WRITE_DATA const_cpu_to_le32(0x00000002)
FILE_WRITE_DATA
=
const_cpu_to_le32
(
0x00000002
),
/* Right to create a file in the directory. (DIRECTORY) */
/* Right to create a file in the directory. (DIRECTORY) */
#define FILE_ADD_FILE const_cpu_to_le32(0x00000002)
FILE_ADD_FILE
=
const_cpu_to_le32
(
0x00000002
),
/* Right to append data to the file. (FILE) */
/* Right to append data to the file. (FILE) */
#define FILE_APPEND_DATA const_cpu_to_le32(0x00000004)
FILE_APPEND_DATA
=
const_cpu_to_le32
(
0x00000004
),
/* Right to create a subdirectory. (DIRECTORY) */
/* Right to create a subdirectory. (DIRECTORY) */
#define FILE_ADD_SUBDIRECTORY const_cpu_to_le32(0x00000004)
FILE_ADD_SUBDIRECTORY
=
const_cpu_to_le32
(
0x00000004
),
/* Right to read extended attributes. (FILE/DIRECTORY) */
/* Right to read extended attributes. (FILE/DIRECTORY) */
#define FILE_READ_EA const_cpu_to_le32(0x00000008)
FILE_READ_EA
=
const_cpu_to_le32
(
0x00000008
),
/* Right to write extended attributes. (FILE/DIRECTORY) */
/* Right to write extended attributes. (FILE/DIRECTORY) */
#define FILE_WRITE_EA const_cpu_to_le32(0x00000010)
FILE_WRITE_EA
=
const_cpu_to_le32
(
0x00000010
),
/* Right to execute a file. (FILE) */
/* Right to execute a file. (FILE) */
#define FILE_EXECUTE const_cpu_to_le32(0x00000020)
FILE_EXECUTE
=
const_cpu_to_le32
(
0x00000020
),
/* Right to traverse the directory. (DIRECTORY) */
/* Right to traverse the directory. (DIRECTORY) */
#define FILE_TRAVERSE const_cpu_to_le32(0x00000020)
FILE_TRAVERSE
=
const_cpu_to_le32
(
0x00000020
),
/*
/*
* Right to delete a directory and all the files it contains (its children),
* Right to delete a directory and all the files it contains (its
*
even if the files are read-only. (DIRECTORY)
* children),
even if the files are read-only. (DIRECTORY)
*/
*/
#define FILE_DELETE_CHILD const_cpu_to_le32(0x00000040)
FILE_DELETE_CHILD
=
const_cpu_to_le32
(
0x00000040
),
/* Right to read file attributes. (FILE/DIRECTORY) */
/* Right to read file attributes. (FILE/DIRECTORY) */
#define FILE_READ_ATTRIBUTES const_cpu_to_le32(0x00000080)
FILE_READ_ATTRIBUTES
=
const_cpu_to_le32
(
0x00000080
),
/* Right to change file attributes. (FILE/DIRECTORY) */
/* Right to change file attributes. (FILE/DIRECTORY) */
#define FILE_WRITE_ATTRIBUTES const_cpu_to_le32(0x00000100)
FILE_WRITE_ATTRIBUTES
=
const_cpu_to_le32
(
0x00000100
),
/*
/*
* The standard rights (bits 16 to 23). These are independent of the type of
* The standard rights (bits 16 to 23). These are independent of the
*
object being secured.
* type of
object being secured.
*/
*/
/* Right to delete the object. */
/* Right to delete the object. */
#define DELETE const_cpu_to_le32(0x00010000)
DELETE
=
const_cpu_to_le32
(
0x00010000
),
/*
/*
* Right to read the information in the object's security descriptor, not
* Right to read the information in the object's security descriptor,
* including the information in the SACL. I.e. right to read the security
* not including the information in the SACL, i.e. right to read the
*
descriptor and owner.
* security
descriptor and owner.
*/
*/
#define READ_CONTROL const_cpu_to_le32(0x00020000)
READ_CONTROL
=
const_cpu_to_le32
(
0x00020000
),
/* Right to modify the DACL in the object's security descriptor. */
/* Right to modify the DACL in the object's security descriptor. */
#define WRITE_DAC const_cpu_to_le32(0x00040000)
WRITE_DAC
=
const_cpu_to_le32
(
0x00040000
),
/* Right to change the owner in the object's security descriptor. */
/* Right to change the owner in the object's security descriptor. */
#define WRITE_OWNER const_cpu_to_le32(0x00080000)
WRITE_OWNER
=
const_cpu_to_le32
(
0x00080000
),
/*
/*
* Right to use the object for synchronization. Enables a process to wait until
* Right to use the object for synchronization. Enables a process to
* the object is in the signalled state. Some object types do not support thi
s
* wait until the object is in the signalled state. Some object type
s
*
access right.
* do not support this
access right.
*/
*/
#define SYNCHRONIZE const_cpu_to_le32(0x00100000)
SYNCHRONIZE
=
const_cpu_to_le32
(
0x00100000
),
/*
/*
* The following STANDARD_RIGHTS_* are combinations of the above for
* The following STANDARD_RIGHTS_* are combinations of the above for
* convenience and are defined by the Win32 API.
* convenience and are defined by the Win32 API.
*/
*/
/* These are currently defined to READ_CONTROL. */
/* These are currently defined to READ_CONTROL. */
#define STANDARD_RIGHTS_READ const_cpu_to_le32(0x00020000)
STANDARD_RIGHTS_READ
=
const_cpu_to_le32
(
0x00020000
),
#define STANDARD_RIGHTS_WRITE const_cpu_to_le32(0x00020000)
STANDARD_RIGHTS_WRITE
=
const_cpu_to_le32
(
0x00020000
),
#define STANDARD_RIGHTS_EXECUTE const_cpu_to_le32(0x00020000)
STANDARD_RIGHTS_EXECUTE
=
const_cpu_to_le32
(
0x00020000
),
/* Combines DELETE, READ_CONTROL, WRITE_DAC, and WRITE_OWNER access. */
/* Combines DELETE, READ_CONTROL, WRITE_DAC, and WRITE_OWNER access. */
#define STANDARD_RIGHTS_REQUIRED const_cpu_to_le32(0x000f0000)
STANDARD_RIGHTS_REQUIRED
=
const_cpu_to_le32
(
0x000f0000
),
/*
/*
* Combines DELETE, READ_CONTROL, WRITE_DAC, WRITE_OWNER, and
* Combines DELETE, READ_CONTROL, WRITE_DAC, WRITE_OWNER, and
* SYNCHRONIZE access.
* SYNCHRONIZE access.
*/
*/
#define STANDARD_RIGHTS_ALL const_cpu_to_le32(0x001f0000)
STANDARD_RIGHTS_ALL
=
const_cpu_to_le32
(
0x001f0000
),
/*
/*
* The access system ACL and maximum allowed access types (bits 24 to
* The access system ACL and maximum allowed access types (bits 24 to
* 25, bits 26 to 27 are reserved).
* 25, bits 26 to 27 are reserved).
*/
*/
#define ACCESS_SYSTEM_SECURITY const_cpu_to_le32(0x01000000)
ACCESS_SYSTEM_SECURITY
=
const_cpu_to_le32
(
0x01000000
),
#define MAXIMUM_ALLOWED const_cpu_to_le32(0x02000000)
MAXIMUM_ALLOWED
=
const_cpu_to_le32
(
0x02000000
),
/*
/*
* The generic rights (bits 28 to 31). These map onto the standard and specific
* The generic rights (bits 28 to 31). These map onto the standard and
*
rights.
* specific
rights.
*/
*/
/* Read, write, and execute access. */
/* Read, write, and execute access. */
#define GENERIC_ALL const_cpu_to_le32(0x10000000)
GENERIC_ALL
=
const_cpu_to_le32
(
0x10000000
),
/* Execute access. */
/* Execute access. */
#define GENERIC_EXECUTE const_cpu_to_le32(0x20000000)
GENERIC_EXECUTE
=
const_cpu_to_le32
(
0x20000000
),
/*
/*
* Write access.
For files, this maps onto:
* Write access.
For files, this maps onto:
* FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA |
* FILE_APPEND_DATA | FILE_WRITE_ATTRIBUTES | FILE_WRITE_DATA |
* FILE_WRITE_EA | STANDARD_RIGHTS_WRITE | SYNCHRONIZE
* FILE_WRITE_EA | STANDARD_RIGHTS_WRITE | SYNCHRONIZE
* For directories, the mapping has the same numberical value. See above for
* For directories, the mapping has the same numerical value. See
*
the descriptions of the rights granted.
* above for
the descriptions of the rights granted.
*/
*/
#define GENERIC_WRITE const_cpu_to_le32(0x40000000)
GENERIC_WRITE
=
const_cpu_to_le32
(
0x40000000
),
/*
/*
* Read access. For files, this maps onto:
* Read access. For files, this maps onto:
* FILE_READ_ATTRIBUTES | FILE_READ_DATA | FILE_READ_EA |
* FILE_READ_ATTRIBUTES | FILE_READ_DATA | FILE_READ_EA |
* STANDARD_RIGHTS_READ | SYNCHRONIZE
* STANDARD_RIGHTS_READ | SYNCHRONIZE
* For directories, the mapping has the same numberical value. See above for
* For directories, the mapping has the same numberical value. See
* the descriptions of the rights granted.
* above for the descriptions of the rights granted.
*/
*/
#define GENERIC_READ const_cpu_to_le32(0x80000000)
GENERIC_READ
=
const_cpu_to_le32
(
0x80000000
),
};
typedef
le32
ACCESS_MASK
;
typedef
le32
ACCESS_MASK
;
...
@@ -1482,8 +1504,10 @@ typedef struct {
...
@@ -1482,8 +1504,10 @@ typedef struct {
/*
/*
* The object ACE flags (32-bit).
* The object ACE flags (32-bit).
*/
*/
#define ACE_OBJECT_TYPE_PRESENT const_cpu_to_le32(1)
enum
{
#define ACE_INHERITED_OBJECT_TYPE_PRESENT const_cpu_to_le32(2)
ACE_OBJECT_TYPE_PRESENT
=
const_cpu_to_le32
(
1
),
ACE_INHERITED_OBJECT_TYPE_PRESENT
=
const_cpu_to_le32
(
2
),
};
typedef
le32
OBJECT_ACE_FLAGS
;
typedef
le32
OBJECT_ACE_FLAGS
;
...
@@ -1582,20 +1606,25 @@ typedef enum {
...
@@ -1582,20 +1606,25 @@ typedef enum {
* security descriptor are contiguous in memory and all pointer fields are
* security descriptor are contiguous in memory and all pointer fields are
* expressed as offsets from the beginning of the security descriptor.
* expressed as offsets from the beginning of the security descriptor.
*/
*/
#define SE_OWNER_DEFAULTED const_cpu_to_le16(0x0001)
enum
{
#define SE_GROUP_DEFAULTED const_cpu_to_le16(0x0002)
SE_OWNER_DEFAULTED
=
const_cpu_to_le16
(
0x0001
),
#define SE_DACL_PRESENT const_cpu_to_le16(0x0004)
SE_GROUP_DEFAULTED
=
const_cpu_to_le16
(
0x0002
),
#define SE_DACL_DEFAULTED const_cpu_to_le16(0x0008)
SE_DACL_PRESENT
=
const_cpu_to_le16
(
0x0004
),
#define SE_SACL_PRESENT const_cpu_to_le16(0x0010)
SE_DACL_DEFAULTED
=
const_cpu_to_le16
(
0x0008
),
#define SE_SACL_DEFAULTED const_cpu_to_le16(0x0020)
#define SE_DACL_AUTO_INHERIT_REQ const_cpu_to_le16(0x0100)
SE_SACL_PRESENT
=
const_cpu_to_le16
(
0x0010
),
#define SE_SACL_AUTO_INHERIT_REQ const_cpu_to_le16(0x0200)
SE_SACL_DEFAULTED
=
const_cpu_to_le16
(
0x0020
),
#define SE_DACL_AUTO_INHERITED const_cpu_to_le16(0x0400)
#define SE_SACL_AUTO_INHERITED const_cpu_to_le16(0x0800)
SE_DACL_AUTO_INHERIT_REQ
=
const_cpu_to_le16
(
0x0100
),
#define SE_DACL_PROTECTED const_cpu_to_le16(0x1000)
SE_SACL_AUTO_INHERIT_REQ
=
const_cpu_to_le16
(
0x0200
),
#define SE_SACL_PROTECTED const_cpu_to_le16(0x2000)
SE_DACL_AUTO_INHERITED
=
const_cpu_to_le16
(
0x0400
),
#define SE_RM_CONTROL_VALID const_cpu_to_le16(0x4000)
SE_SACL_AUTO_INHERITED
=
const_cpu_to_le16
(
0x0800
),
#define SE_SELF_RELATIVE const_cpu_to_le16(0x8000)
SE_DACL_PROTECTED
=
const_cpu_to_le16
(
0x1000
),
SE_SACL_PROTECTED
=
const_cpu_to_le16
(
0x2000
),
SE_RM_CONTROL_VALID
=
const_cpu_to_le16
(
0x4000
),
SE_SELF_RELATIVE
=
const_cpu_to_le16
(
0x8000
)
}
__attribute__
((
__packed__
));
typedef
le16
SECURITY_DESCRIPTOR_CONTROL
;
typedef
le16
SECURITY_DESCRIPTOR_CONTROL
;
...
@@ -1781,17 +1810,22 @@ typedef struct {
...
@@ -1781,17 +1810,22 @@ typedef struct {
/*
/*
* Possible flags for the volume (16-bit).
* Possible flags for the volume (16-bit).
*/
*/
#define VOLUME_IS_DIRTY const_cpu_to_le16(0x0001)
enum
{
#define VOLUME_RESIZE_LOG_FILE const_cpu_to_le16(0x0002)
VOLUME_IS_DIRTY
=
const_cpu_to_le16
(
0x0001
),
#define VOLUME_UPGRADE_ON_MOUNT const_cpu_to_le16(0x0004)
VOLUME_RESIZE_LOG_FILE
=
const_cpu_to_le16
(
0x0002
),
#define VOLUME_MOUNTED_ON_NT4 const_cpu_to_le16(0x0008)
VOLUME_UPGRADE_ON_MOUNT
=
const_cpu_to_le16
(
0x0004
),
#define VOLUME_DELETE_USN_UNDERWAY const_cpu_to_le16(0x0010)
VOLUME_MOUNTED_ON_NT4
=
const_cpu_to_le16
(
0x0008
),
#define VOLUME_REPAIR_OBJECT_ID const_cpu_to_le16(0x0020)
#define VOLUME_MODIFIED_BY_CHKDSK const_cpu_to_le16(0x8000)
VOLUME_DELETE_USN_UNDERWAY
=
const_cpu_to_le16
(
0x0010
),
#define VOLUME_FLAGS_MASK const_cpu_to_le16(0x803f)
VOLUME_REPAIR_OBJECT_ID
=
const_cpu_to_le16
(
0x0020
),
VOLUME_MODIFIED_BY_CHKDSK
=
const_cpu_to_le16
(
0x8000
),
/* To make our life easier when checking if we must mount read-only. */
VOLUME_FLAGS_MASK
=
const_cpu_to_le16
(
0x803f
),
#define VOLUME_MUST_MOUNT_RO_MASK const_cpu_to_le16(0x8037)
/* To make our life easier when checking if we must mount read-only. */
VOLUME_MUST_MOUNT_RO_MASK
=
const_cpu_to_le16
(
0x8037
),
}
__attribute__
((
__packed__
));
typedef
le16
VOLUME_FLAGS
;
typedef
le16
VOLUME_FLAGS
;
...
@@ -1823,24 +1857,27 @@ typedef struct {
...
@@ -1823,24 +1857,27 @@ typedef struct {
/*
/*
* Index header flags (8-bit).
* Index header flags (8-bit).
*
* When index header is in an index root attribute:
*/
#define SMALL_INDEX 0
/* The index is small enough to fit inside the index root
attribute and there is no index allocation attribute
present. */
#define LARGE_INDEX 1
/* The index is too large to fit in the index root
attribute and/or an index allocation attribute is
present. */
/*
* When index header is in an index block, i.e. is part of index allocation
* attribute:
*/
*/
#define LEAF_NODE 0
/* This is a leaf node, i.e. there are no more nodes
enum
{
branching off it. */
/*
#define INDEX_NODE 1
/* This node indexes other nodes, i.e. it is not a leaf
* When index header is in an index root attribute:
node. */
*/
#define NODE_MASK 1
/* Mask for accessing the *_NODE bits. */
SMALL_INDEX
=
0
,
/* The index is small enough to fit inside the index
root attribute and there is no index allocation
attribute present. */
LARGE_INDEX
=
1
,
/* The index is too large to fit in the index root
attribute and/or an index allocation attribute is
present. */
/*
* When index header is in an index block, i.e. is part of index
* allocation attribute:
*/
LEAF_NODE
=
0
,
/* This is a leaf node, i.e. there are no more nodes
branching off it. */
INDEX_NODE
=
1
,
/* This node indexes other nodes, i.e. it is not a leaf
node. */
NODE_MASK
=
1
,
/* Mask for accessing the *_NODE bits. */
}
__attribute__
((
__packed__
));
typedef
u8
INDEX_HEADER_FLAGS
;
typedef
u8
INDEX_HEADER_FLAGS
;
...
@@ -1971,23 +2008,28 @@ typedef struct {
...
@@ -1971,23 +2008,28 @@ typedef struct {
*
*
* The user quota flags. Names explain meaning.
* The user quota flags. Names explain meaning.
*/
*/
#define QUOTA_FLAG_DEFAULT_LIMITS const_cpu_to_le32(0x00000001)
enum
{
#define QUOTA_FLAG_LIMIT_REACHED const_cpu_to_le32(0x00000002)
QUOTA_FLAG_DEFAULT_LIMITS
=
const_cpu_to_le32
(
0x00000001
),
#define QUOTA_FLAG_ID_DELETED const_cpu_to_le32(0x00000004)
QUOTA_FLAG_LIMIT_REACHED
=
const_cpu_to_le32
(
0x00000002
),
QUOTA_FLAG_ID_DELETED
=
const_cpu_to_le32
(
0x00000004
),
#define QUOTA_FLAG_USER_MASK const_cpu_to_le32(0x00000007)
QUOTA_FLAG_USER_MASK
=
const_cpu_to_le32
(
0x00000007
),
/*
Bit mask for
user quota flags. */
/*
This is a bit mask for the
user quota flags. */
/* These flags are only present in the quota defaults index entry, i.e. in the
/*
entry where owner_id = QUOTA_DEFAULTS_ID. */
* These flags are only present in the quota defaults index entry, i.e.
#define QUOTA_FLAG_TRACKING_ENABLED const_cpu_to_le32(0x00000010)
* in the entry where owner_id = QUOTA_DEFAULTS_ID.
#define QUOTA_FLAG_ENFORCEMENT_ENABLED const_cpu_to_le32(0x00000020)
*/
#define QUOTA_FLAG_TRACKING_REQUESTED const_cpu_to_le32(0x00000040)
QUOTA_FLAG_TRACKING_ENABLED
=
const_cpu_to_le32
(
0x00000010
),
#define QUOTA_FLAG_LOG_THRESHOLD const_cpu_to_le32(0x00000080)
QUOTA_FLAG_ENFORCEMENT_ENABLED
=
const_cpu_to_le32
(
0x00000020
),
#define QUOTA_FLAG_LOG_LIMIT const_cpu_to_le32(0x00000100)
QUOTA_FLAG_TRACKING_REQUESTED
=
const_cpu_to_le32
(
0x00000040
),
#define QUOTA_FLAG_OUT_OF_DATE const_cpu_to_le32(0x00000200)
QUOTA_FLAG_LOG_THRESHOLD
=
const_cpu_to_le32
(
0x00000080
),
#define QUOTA_FLAG_CORRUPT const_cpu_to_le32(0x00000400)
#define QUOTA_FLAG_PENDING_DELETES const_cpu_to_le32(0x00000800)
QUOTA_FLAG_LOG_LIMIT
=
const_cpu_to_le32
(
0x00000100
),
QUOTA_FLAG_OUT_OF_DATE
=
const_cpu_to_le32
(
0x00000200
),
QUOTA_FLAG_CORRUPT
=
const_cpu_to_le32
(
0x00000400
),
QUOTA_FLAG_PENDING_DELETES
=
const_cpu_to_le32
(
0x00000800
),
};
typedef
le32
QUOTA_FLAGS
;
typedef
le32
QUOTA_FLAGS
;
...
@@ -2029,9 +2071,11 @@ typedef struct {
...
@@ -2029,9 +2071,11 @@ typedef struct {
/*
/*
* Predefined owner_id values (32-bit).
* Predefined owner_id values (32-bit).
*/
*/
#define QUOTA_INVALID_ID const_cpu_to_le32(0x00000000)
enum
{
#define QUOTA_DEFAULTS_ID const_cpu_to_le32(0x00000001)
QUOTA_INVALID_ID
=
const_cpu_to_le32
(
0x00000000
),
#define QUOTA_FIRST_USER_ID const_cpu_to_le32(0x00000100)
QUOTA_DEFAULTS_ID
=
const_cpu_to_le32
(
0x00000001
),
QUOTA_FIRST_USER_ID
=
const_cpu_to_le32
(
0x00000100
),
};
/*
/*
* Current constants for quota control entries.
* Current constants for quota control entries.
...
@@ -2044,12 +2088,17 @@ typedef enum {
...
@@ -2044,12 +2088,17 @@ typedef enum {
/*
/*
* Index entry flags (16-bit).
* Index entry flags (16-bit).
*/
*/
#define INDEX_ENTRY_NODE const_cpu_to_le16(1)
/* This entry contains a
enum
{
INDEX_ENTRY_NODE
=
const_cpu_to_le16
(
1
),
/* This entry contains a
sub-node, i.e. a reference to an index block in form of
sub-node, i.e. a reference to an index block in form of
a virtual cluster number (see below). */
a virtual cluster number (see below). */
#define INDEX_ENTRY_END const_cpu_to_le16(2)
/* This signifies the last entry
INDEX_ENTRY_END
=
const_cpu_to_le16
(
2
),
/* This signifies the last
in an index block. The index entry does not represent
entry in an index block. The index entry does not
a file but it can point to a sub-node. */
represent a file but it can point to a sub-node. */
INDEX_ENTRY_SPACE_FILLER
=
const_cpu_to_le16
(
0xffff
),
/* gcc: Force
enum bit width to 16-bit. */
}
__attribute__
((
__packed__
));
typedef
le16
INDEX_ENTRY_FLAGS
;
typedef
le16
INDEX_ENTRY_FLAGS
;
...
@@ -2184,26 +2233,28 @@ typedef struct {
...
@@ -2184,26 +2233,28 @@ typedef struct {
*
*
* These are the predefined reparse point tags:
* These are the predefined reparse point tags:
*/
*/
#define IO_REPARSE_TAG_IS_ALIAS const_cpu_to_le32(0x20000000)
enum
{
#define IO_REPARSE_TAG_IS_HIGH_LATENCY const_cpu_to_le32(0x40000000)
IO_REPARSE_TAG_IS_ALIAS
=
const_cpu_to_le32
(
0x20000000
),
#define IO_REPARSE_TAG_IS_MICROSOFT const_cpu_to_le32(0x80000000)
IO_REPARSE_TAG_IS_HIGH_LATENCY
=
const_cpu_to_le32
(
0x40000000
),
IO_REPARSE_TAG_IS_MICROSOFT
=
const_cpu_to_le32
(
0x80000000
),
#define IO_REPARSE_TAG_RESERVED_ZERO const_cpu_to_le32(0x00000000)
IO_REPARSE_TAG_RESERVED_ZERO
=
const_cpu_to_le32
(
0x00000000
),
#define IO_REPARSE_TAG_RESERVED_ONE const_cpu_to_le32(0x00000001)
IO_REPARSE_TAG_RESERVED_ONE
=
const_cpu_to_le32
(
0x00000001
),
#define IO_REPARSE_TAG_RESERVED_RANGE const_cpu_to_le32(0x00000001)
IO_REPARSE_TAG_RESERVED_RANGE
=
const_cpu_to_le32
(
0x00000001
),
#define IO_REPARSE_TAG_NSS const_cpu_to_le32(0x68000005)
IO_REPARSE_TAG_NSS
=
const_cpu_to_le32
(
0x68000005
),
#define IO_REPARSE_TAG_NSS_RECOVER const_cpu_to_le32(0x68000006)
IO_REPARSE_TAG_NSS_RECOVER
=
const_cpu_to_le32
(
0x68000006
),
#define IO_REPARSE_TAG_SIS const_cpu_to_le32(0x68000007)
IO_REPARSE_TAG_SIS
=
const_cpu_to_le32
(
0x68000007
),
#define IO_REPARSE_TAG_DFS const_cpu_to_le32(0x68000008)
IO_REPARSE_TAG_DFS
=
const_cpu_to_le32
(
0x68000008
),
#define IO_REPARSE_TAG_MOUNT_POINT const_cpu_to_le32(0x88000003)
IO_REPARSE_TAG_MOUNT_POINT
=
const_cpu_to_le32
(
0x88000003
),
#define IO_REPARSE_TAG_HSM const_cpu_to_le32(0xa8000004)
IO_REPARSE_TAG_HSM
=
const_cpu_to_le32
(
0xa8000004
),
#define IO_REPARSE_TAG_SYMBOLIC_LINK const_cpu_to_le32(0xe8000000)
IO_REPARSE_TAG_SYMBOLIC_LINK
=
const_cpu_to_le32
(
0xe8000000
),
#define IO_REPARSE_TAG_VALID_VALUES const_cpu_to_le32(0xe000ffff)
IO_REPARSE_TAG_VALID_VALUES
=
const_cpu_to_le32
(
0xe000ffff
),
};
/*
/*
* Attribute: Reparse point (0xc0).
* Attribute: Reparse point (0xc0).
...
@@ -2237,7 +2288,9 @@ typedef struct {
...
@@ -2237,7 +2288,9 @@ typedef struct {
/*
/*
* Extended attribute flags (8-bit).
* Extended attribute flags (8-bit).
*/
*/
#define NEED_EA 0x80
enum
{
NEED_EA
=
0x80
}
__attribute__
((
__packed__
));
typedef
u8
EA_FLAGS
;
typedef
u8
EA_FLAGS
;
...
...
fs/ntfs/logfile.h
View file @
ee05a6ce
...
@@ -111,7 +111,10 @@ typedef struct {
...
@@ -111,7 +111,10 @@ typedef struct {
* These are the so far known RESTART_AREA_* flags (16-bit) which contain
* These are the so far known RESTART_AREA_* flags (16-bit) which contain
* information about the log file in which they are present.
* information about the log file in which they are present.
*/
*/
#define RESTART_VOLUME_IS_CLEAN const_cpu_to_le16(0x0002)
enum
{
RESTART_VOLUME_IS_CLEAN
=
const_cpu_to_le16
(
0x0002
),
RESTART_SPACE_FILLER
=
0xffff
,
/* gcc: Force enum bit width to 16. */
}
__attribute__
((
__packed__
));
typedef
le16
RESTART_AREA_FLAGS
;
typedef
le16
RESTART_AREA_FLAGS
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment