patch-pre2.0.6 linux/fs/affs/amigaffs.c
Next file: linux/fs/affs/bitmap.c
Previous file: linux/fs/Config.in
Back to the patch index
Back to the overall index
- Lines: 150
- Date:
Sun May 19 15:22:19 1996
- Orig file:
pre2.0.5/linux/fs/affs/amigaffs.c
- Orig date:
Fri May 17 15:32:17 1996
diff -u --recursive --new-file pre2.0.5/linux/fs/affs/amigaffs.c linux/fs/affs/amigaffs.c
@@ -1,7 +1,7 @@
/*
* linux/fs/affs/amigaffs.c
*
- * (c) 1996 Hans-Joachim Widmaier - rewritten
+ * (c) 1996 Hans-Joachim Widmaier - Rewritten
*
* (C) 1993 Ray Burr - Amiga FFS filesystem.
*
@@ -29,10 +29,10 @@
is returned. */
int
-affs_find_next_hash_entry(int hsize, void *dir_data, ULONG *hash_pos)
+affs_find_next_hash_entry(int hsize, void *dir_data, int *hash_pos)
{
struct dir_front *dir_front = dir_data;
- ULONG i;
+ int i;
for (i = *hash_pos; i < hsize; i++)
if (dir_front->hashtable[i] != 0)
@@ -67,11 +67,11 @@
/* Find the predecessor in the hash chain */
int
-affs_fix_hash_pred(struct inode *startino, int startoffset, LONG key, LONG newkey)
+affs_fix_hash_pred(struct inode *startino, int startoffset, int key, int newkey)
{
struct buffer_head *bh = NULL;
- ULONG nextkey;
- LONG ptype, stype;
+ int nextkey;
+ int ptype, stype;
int retval;
nextkey = startino->i_ino;
@@ -92,9 +92,9 @@
affs_brelse(bh);
break;
}
- nextkey = htonl(((ULONG *)bh->b_data)[startoffset]);
+ nextkey = htonl(((__u32 *)bh->b_data)[startoffset]);
if (nextkey == key) {
- ((ULONG *)bh->b_data)[startoffset] = newkey;
+ ((__u32 *)bh->b_data)[startoffset] = newkey;
affs_fix_checksum(AFFS_I2BSIZE(startino),bh->b_data,5);
mark_buffer_dirty(bh,1);
affs_brelse(bh);
@@ -112,13 +112,13 @@
/* Remove inode from link chain */
int
-affs_fix_link_pred(struct inode *startino, LONG key, LONG newkey)
+affs_fix_link_pred(struct inode *startino, int key, int newkey)
{
struct buffer_head *bh = NULL;
- ULONG nextkey;
- ULONG offset;
- LONG etype = 0;
- LONG ptype, stype;
+ int nextkey;
+ int offset;
+ int etype = 0;
+ int ptype, stype;
int retval;
offset = AFFS_I2BSIZE(startino) / 4 - 10;
@@ -150,7 +150,7 @@
retval = -EPERM;
break;
}
- nextkey = htonl(((ULONG *)bh->b_data)[offset]);
+ nextkey = htonl(((__u32 *)bh->b_data)[offset]);
if (nextkey == key) {
FILE_END(bh->b_data,startino)->link_chain = newkey;
affs_fix_checksum(AFFS_I2BSIZE(startino),bh->b_data,5);
@@ -172,17 +172,17 @@
(which lets us calculate the block size).
Returns non-zero if the block is not consistent. */
-ULONG
-affs_checksum_block(int bsize, void *data, LONG *ptype, LONG *stype)
+__u32
+affs_checksum_block(int bsize, void *data, int *ptype, int *stype)
{
- ULONG sum;
- ULONG *p;
+ __u32 sum;
+ __u32 *p;
bsize /= 4;
if (ptype)
- *ptype = htonl(((LONG *)data)[0]);
+ *ptype = htonl(((__s32 *)data)[0]);
if (stype)
- *stype = htonl(((LONG *)data)[bsize - 1]);
+ *stype = htonl(((__s32 *)data)[bsize - 1]);
sum = 0;
p = data;
@@ -194,20 +194,20 @@
void
affs_fix_checksum(int bsize, void *data, int cspos)
{
- ULONG ocs;
- ULONG cs;
+ __u32 ocs;
+ __u32 cs;
cs = affs_checksum_block(bsize,data,NULL,NULL);
- ocs = htonl (((ULONG *)data)[cspos]);
+ ocs = htonl (((__u32 *)data)[cspos]);
ocs -= cs;
- ((ULONG *)data)[cspos] = htonl(ocs);
+ ((__u32 *)data)[cspos] = htonl(ocs);
}
void
secs_to_datestamp(int secs, struct DateStamp *ds)
{
- ULONG days;
- ULONG minute;
+ __u32 days;
+ __u32 minute;
secs -= sys_tz.tz_minuteswest * 60 +((8 * 365 + 2) * 24 * 60 * 60);
if (secs < 0)
@@ -223,7 +223,7 @@
}
int
-prot_to_mode(ULONG prot)
+prot_to_mode(__u32 prot)
{
int mode = 0;
@@ -249,10 +249,10 @@
return mode;
}
-ULONG
+unsigned int
mode_to_prot(int mode)
{
- ULONG prot = 0;
+ unsigned int prot = 0;
if (mode & S_IXUSR)
prot |= FIBF_SCRIPT;
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