2 * ntfstypes.h - This file defines four things:
3 * - Generic platform independent fixed-size types (e.g. ntfs_u32).
4 * - Specific fixed-size types (e.g. ntfs_offset_t).
5 * - Macros that read and write those types from and to byte arrays.
6 * - Types derived from OS specific ones.
8 * Copyright (C) 1996, 1998, 1999 Martin von Löwis
9 * Copyright (C) 2001 Anton Altaparmakov (AIA)
12 #include "ntfsendian.h"
13 #include <asm/types.h>
16 #ifndef NTFS_INTEGRAL_TYPES
17 #define NTFS_INTEGRAL_TYPES
28 /* Unicode character type */
31 typedef u16 ntfs_wchar_t;
36 typedef s64 ntfs_offset_t;
41 typedef u64 ntfs_time64_t;
44 * This is really signed long long. So we support only volumes up to 2Tb. This
45 * is ok as Win2k also only uses 32-bits to store clusters.
46 * Whatever you do keep this a SIGNED value or a lot of NTFS users with
47 * corrupted filesystems will lynch you! It causes massive fs corruption when
48 * unsigned due to the nature of many checks relying on being performed on
49 * signed quantities. (AIA)
51 #ifndef NTFS_CLUSTER_T
52 #define NTFS_CLUSTER_T
53 typedef s32 ntfs_cluster_t;
56 /* Architecture independent macros. */
58 /* PUTU32 would not clear all bytes. */
59 #define NTFS_PUTINUM(p,i) NTFS_PUTU64(p, i->i_number); \
60 NTFS_PUTU16(((char*)p) + 6, i->sequence_number)
62 /* System dependent types. */
63 #include <asm/posix_types.h>
66 typedef __kernel_mode_t ntmode_t;
70 typedef uid_t ntfs_uid_t;
74 typedef gid_t ntfs_gid_t;
78 typedef __kernel_size_t ntfs_size_t;
82 typedef __kernel_time_t ntfs_time_t;