patch-pre2.0.5 linux/include/linux/amigaffs.h

Next file: linux/include/linux/baycom.h
Previous file: linux/include/linux/affs_hardblocks.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.4/linux/include/linux/amigaffs.h linux/include/linux/amigaffs.h
@@ -15,6 +15,7 @@
 #define DIR_END(p,i)	GET_END_PTR(struct dir_end,p,AFFS_I2BSIZE(i))
 #define LINK_END(p,i)	GET_END_PTR(struct hlink_end,p,AFFS_I2BSIZE(i))
 #define ROOT_END_S(p,s)	GET_END_PTR(struct root_end,p,(s)->s_blocksize)
+#define DATA_FRONT(bh)	((struct data_front *)(bh)->b_data)
 
 /* Only for easier debugging if need be */
 #define affs_bread	bread
@@ -44,19 +45,11 @@
 #define MUFS_DCOFS	0x6d754604   /* 'muF\4' */
 #define MUFS_DCFFS	0x6d754605   /* 'muF\5' */
 
-typedef __u32	ULONG;
-typedef __u16	UWORD;
-typedef __u8	UBYTE;
-
-typedef __s32	LONG;
-typedef __s16	WORD;
-typedef __s8	BYTE;
-
 struct DateStamp
 {
-  ULONG ds_Days;
-  ULONG ds_Minute;
-  ULONG ds_Tick;
+  __u32 ds_Days;
+  __u32 ds_Minute;
+  __u32 ds_Tick;
 };
 
 #define T_SHORT		2
@@ -72,120 +65,120 @@
 
 struct root_front
 {
-  LONG primary_type;
-  ULONG spare1[2];
-  ULONG hash_size;
-  ULONG spare2;
-  ULONG checksum;
-  ULONG hashtable[0];
+  __s32 primary_type;
+  __u32 spare1[2];
+  __u32 hash_size;
+  __u32 spare2;
+  __u32 checksum;
+  __u32 hashtable[0];
 };
 
 struct root_end
 {
-  LONG bm_flag;
-  ULONG bm_keys[25];
-  ULONG bm_extend;
+  __s32 bm_flag;
+  __u32 bm_keys[25];
+  __u32 bm_extend;
   struct DateStamp dir_altered;
-  UBYTE disk_name[40];
+  __u8 disk_name[40];
   struct DateStamp disk_altered;
   struct DateStamp disk_made;
-  ULONG spare1[3];
-  LONG secondary_type;
+  __u32 spare1[3];
+  __s32 secondary_type;
 };
 
 struct dir_front
 {
-  LONG primary_type;
-  ULONG own_key;
-  ULONG spare1[3];
-  ULONG checksum;
-  ULONG hashtable[0];
+  __s32 primary_type;
+  __u32 own_key;
+  __u32 spare1[3];
+  __u32 checksum;
+  __u32 hashtable[0];
 };
 
 struct dir_end
 {
-  ULONG spare1;
-  UWORD owner_uid;
-  UWORD owner_gid;
-  ULONG protect;
-  ULONG spare2;
-  UBYTE comment[92];
+  __u32 spare1;
+  __u16 owner_uid;
+  __u16 owner_gid;
+  __u32 protect;
+  __u32 spare2;
+  __u8 comment[92];
   struct DateStamp created;
-  UBYTE dir_name[32];
-  ULONG spare3[2];
-  ULONG link_chain;
-  ULONG spare4[5];
-  ULONG hash_chain;
-  ULONG parent;
-  ULONG spare5;
-  LONG secondary_type;
+  __u8 dir_name[32];
+  __u32 spare3[2];
+  __u32 link_chain;
+  __u32 spare4[5];
+  __u32 hash_chain;
+  __u32 parent;
+  __u32 spare5;
+  __s32 secondary_type;
 };
 
 struct file_front
 {
-  LONG primary_type;
-  ULONG own_key;
-  ULONG block_count;
-  ULONG unknown1;
-  ULONG first_data;
-  ULONG checksum;
-  ULONG blocks[0];
+  __s32 primary_type;
+  __u32 own_key;
+  __u32 block_count;
+  __u32 unknown1;
+  __u32 first_data;
+  __u32 checksum;
+  __u32 blocks[0];
 };
 
 struct file_end
 {
-  ULONG spare1;
-  UWORD owner_uid;
-  UWORD owner_gid;
-  ULONG protect;
-  ULONG byte_size;
-  UBYTE comment[92];
+  __u32 spare1;
+  __u16 owner_uid;
+  __u16 owner_gid;
+  __u32 protect;
+  __u32 byte_size;
+  __u8 comment[92];
   struct DateStamp created;
-  UBYTE file_name[32];
-  ULONG spare2;
-  ULONG original;	/* not really in file_end */
-  ULONG link_chain;
-  ULONG spare3[5];
-  ULONG hash_chain;
-  ULONG parent;
-  ULONG extension;
-  LONG secondary_type;
+  __u8 file_name[32];
+  __u32 spare2;
+  __u32 original;	/* not really in file_end */
+  __u32 link_chain;
+  __u32 spare3[5];
+  __u32 hash_chain;
+  __u32 parent;
+  __u32 extension;
+  __s32 secondary_type;
 };
 
 struct hlink_front
 {
-  LONG primary_type;
-  ULONG own_key;
-  ULONG spare1[3];
-  ULONG checksum;
+  __s32 primary_type;
+  __u32 own_key;
+  __u32 spare1[3];
+  __u32 checksum;
 };
 
 struct hlink_end
 {
-  ULONG spare1;
-  UWORD owner_uid;
-  UWORD owner_gid;
-  ULONG protect;
-  UBYTE comment[92];
+  __u32 spare1;
+  __u16 owner_uid;
+  __u16 owner_gid;
+  __u32 protect;
+  __u8 comment[92];
   struct DateStamp created;
-  UBYTE link_name[32];
-  ULONG spare2;
-  ULONG original;
-  ULONG link_chain;
-  ULONG spare3[5];
-  ULONG hash_chain;
-  ULONG parent;
-  ULONG spare4;
-  LONG secondary_type;
+  __u8 link_name[32];
+  __u32 spare2;
+  __u32 original;
+  __u32 link_chain;
+  __u32 spare3[5];
+  __u32 hash_chain;
+  __u32 parent;
+  __u32 spare4;
+  __s32 secondary_type;
 };
 
 struct slink_front
 {
-  LONG primary_type;
-  ULONG own_key;
-  ULONG spare1[3];
-  ULONG checksum;
-  UBYTE	symname[288];	/* depends on block size */
+  __s32 primary_type;
+  __u32 own_key;
+  __u32 spare1[3];
+  __u32 checksum;
+  __u8	symname[288];	/* depends on block size */
 };
 
 /* Permission bits */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this