xref: /openbmc/linux/fs/ntfs/types.h (revision b8265621)
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3  * types.h - Defines for NTFS Linux kernel driver specific types.
4  *	     Part of the Linux-NTFS project.
5  *
6  * Copyright (c) 2001-2005 Anton Altaparmakov
7  */
8 
9 #ifndef _LINUX_NTFS_TYPES_H
10 #define _LINUX_NTFS_TYPES_H
11 
12 #include <linux/types.h>
13 
14 typedef __le16 le16;
15 typedef __le32 le32;
16 typedef __le64 le64;
17 typedef __u16 __bitwise sle16;
18 typedef __u32 __bitwise sle32;
19 typedef __u64 __bitwise sle64;
20 
21 /* 2-byte Unicode character type. */
22 typedef le16 ntfschar;
23 #define UCHAR_T_SIZE_BITS 1
24 
25 /*
26  * Clusters are signed 64-bit values on NTFS volumes. We define two types, LCN
27  * and VCN, to allow for type checking and better code readability.
28  */
29 typedef s64 VCN;
30 typedef sle64 leVCN;
31 typedef s64 LCN;
32 typedef sle64 leLCN;
33 
34 /*
35  * The NTFS journal $LogFile uses log sequence numbers which are signed 64-bit
36  * values.  We define our own type LSN, to allow for type checking and better
37  * code readability.
38  */
39 typedef s64 LSN;
40 typedef sle64 leLSN;
41 
42 /*
43  * The NTFS transaction log $UsnJrnl uses usn which are signed 64-bit values.
44  * We define our own type USN, to allow for type checking and better code
45  * readability.
46  */
47 typedef s64 USN;
48 typedef sle64 leUSN;
49 
50 typedef enum {
51 	CASE_SENSITIVE = 0,
52 	IGNORE_CASE = 1,
53 } IGNORE_CASE_BOOL;
54 
55 #endif /* _LINUX_NTFS_TYPES_H */
56