patch-2.4.4 linux/fs/ntfs/macros.h
Next file: linux/fs/ntfs/ntfsendian.h
Previous file: linux/fs/ntfs/inode.h
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Wed Apr 18 11:49:13 2001
- Orig file:
v2.4.3/linux/fs/ntfs/macros.h
- Orig date:
Sat Jan 2 10:24:46 1999
diff -u --recursive --new-file v2.4.3/linux/fs/ntfs/macros.h linux/fs/ntfs/macros.h
@@ -1,5 +1,4 @@
-/*
- * macros.h
+/* macros.h
*
* Copyright (C) 1995 Martin von Löwis
* Copyright (C) 1996 Régis Duchesne
@@ -7,23 +6,10 @@
#define NTFS_FD(vol) ((vol)->u.fd)
-/* Linux */
-#ifdef NTFS_IN_LINUX_KERNEL
#define NTFS_SB(vol) ((struct super_block*)(vol)->sb)
#define NTFS_SB2VOL(sb) (&(sb)->u.ntfs_sb)
#define NTFS_INO2VOL(ino) (&((ino)->i_sb->u.ntfs_sb))
#define NTFS_LINO2NINO(ino) (&((ino)->u.ntfs_i))
-#else
-#define NTFS_SB(vol) ((struct super_block*)(vol)->u.sb)
-#define NTFS_SB2VOL(sb) ((ntfs_volume*)(sb)->u.generic_sbp)
-#define NTFS_INO2VOL(ino) ((ntfs_volume*)((ino)->i_sb->u.generic_sbp))
-#define NTFS_LINO2NINO(ino) ((ntfs_inode*)((ino)->u.generic_ip))
-#endif
-
-/* BSD */
-#define NTFS_MNT(vol) ((struct mount*)(vol)->u.sb)
-#define NTFS_MNT2VOL(sb) ((ntfs_volume*)(sb)->mnt_data)
-#define NTFS_V2INO(ino) ((ntfs_inode*)((ino)->v_data))
/* Classical min and max macros still missing in standard headers... */
#ifndef min
@@ -31,9 +17,9 @@
#define max(a,b) ((a) >= (b) ? (a) : (b))
#endif
-#define IS_MAGIC(a,b) (*(int*)(a)==*(int*)(b))
+#define IS_MAGIC(a,b) (*(int*)(a) == *(int*)(b))
#define IS_MFT_RECORD(a) IS_MAGIC((a),"FILE")
-#define IS_NTFS_VOLUME(a) IS_MAGIC((a)+3,"NTFS")
+#define IS_NTFS_VOLUME(a) IS_MAGIC((a) + 3,"NTFS")
#define IS_INDEX_RECORD(a) IS_MAGIC((a),"INDX")
/* 'NTFS' in little endian */
@@ -46,8 +32,3 @@
#define NTFS_AFLAG_COMPRESSED 0x800
#define NTFS_AFLAG_DIR 0x10000000
-/*
- * Local variables:
- * c-file-style: "linux"
- * End:
- */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)