lkml.org 
[lkml]   [2002]   [Jan]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] 2.5.2-pre6: fs fixes dev_t -> kdev_t
Hello all,
I've attached some changes for kdev_t .
Regards,
Frank
--- fs/affs/super.c.old Tue Jan 1 18:16:36 2002
+++ fs/affs/super.c Tue Jan 1 20:48:34 2002
@@ -262,7 +262,7 @@
* blocks, we will have to change it.
*/

- blocks = blk_size[MAJOR(dev)] ? blk_size[MAJOR(dev)][MINOR(dev)] : 0;
+ blocks = blk_size[major(dev)] ? blk_size[major(dev)][minor(dev)] : 0;
if (!blocks) {
printk(KERN_ERR "AFFS: Could not determine device size\n");
goto out_error;--- fs/coda/inode.c.old Tue Jan 1 18:16:37 2002
+++ fs/coda/inode.c Tue Jan 1 21:33:39 2002
@@ -70,7 +70,7 @@
inode = file->f_dentry->d_inode;

if(!inode || !S_ISCHR(inode->i_mode) ||
- MAJOR(inode->i_rdev) != CODA_PSDEV_MAJOR) {
+ major(inode->i_rdev) != CODA_PSDEV_MAJOR) {
if(file)
fput(file);

@@ -78,7 +78,7 @@
return -1;
}

- idx = MINOR(inode->i_rdev);
+ idx = minor(inode->i_rdev);
fput(file);

if(idx < 0 || idx >= MAX_CODADEVS) {--- psdev.c Tue Jan 1 18:16:37 2002
+++ psdev.c.new Tue Jan 1 21:35:02 2002
@@ -293,7 +293,7 @@
int idx;

lock_kernel();
- idx = MINOR(inode->i_rdev);
+ idx = minor(inode->i_rdev);
if(idx >= MAX_CODADEVS) {
unlock_kernel();
return -ENODEV;--- fs/cramfs/inode.c.old Tue Jan 1 18:16:37 2002
+++ fs/cramfs/inode.c Tue Jan 1 21:03:54 2002
@@ -140,8 +140,8 @@
}

devsize = ~0UL;
- major = MAJOR(sb->s_dev);
- minor = MINOR(sb->s_dev);
+ major = major(sb->s_dev);
+ minor = minor(sb->s_dev);

if (blk_size[major])
devsize = blk_size[major][minor] >> 2;--- fs/intermezzo/psdev.c.old Tue Jan 1 18:16:39 2002
+++ fs/intermezzo/psdev.c Tue Jan 1 21:12:56 2002
@@ -78,12 +78,12 @@
{
int minor;

- if ( MAJOR(file->f_dentry->d_inode->i_rdev) != PRESTO_PSDEV_MAJOR ) {
+ if ( major(file->f_dentry->d_inode->i_rdev) != PRESTO_PSDEV_MAJOR ) {
EXIT;
return NULL;
}

- minor = MINOR(file->f_dentry->d_inode->i_rdev);
+ minor = minor(file->f_dentry->d_inode->i_rdev);
if ( minor < 0 || minor >= MAX_PRESTODEV ) {
EXIT;
return NULL;
@@ -290,7 +290,7 @@
}

len = readmount.io_len;
- minor = MINOR(dev);
+ minor = minor(dev);
PRESTO_ALLOC(tmp, char *, len);
if (!tmp) {
EXIT;
@@ -627,7 +627,7 @@
EXIT;
return error;
}
- minor = MINOR(dev);
+ minor = minor(dev);
if (cmd == PRESTO_SETOPT)
error = dosetopt(minor, &kopt);
--- fs/intermezzo/super.c.old Fri Nov 23 03:47:33 2001
+++ fs/intermezzo/super.c Tue Jan 1 21:14:20 2002
@@ -188,19 +188,19 @@
}

devno = dentry->d_inode->i_rdev;
- if ( MAJOR(devno) != PRESTO_PSDEV_MAJOR ) {
+ if ( major(devno) != PRESTO_PSDEV_MAJOR ) {
EXIT;
goto out;
}

- if ( MINOR(devno) >= MAX_PRESTODEV ) {
+ if ( minor(devno) >= MAX_PRESTODEV ) {
EXIT;
goto out;
}

EXIT;
out:
- *minor = MINOR(devno);
+ *minor = minor(devno);
path_release(&nd);
return 0;
}--- fs/intermezzo/vfs.c.old Fri Nov 23 03:47:33 2001
+++ fs/intermezzo/vfs.c Tue Jan 1 21:15:35 2002
@@ -1431,7 +1431,7 @@
error = presto_journal_mknod(&rec, fset, dentry, &tgt_dir_ver,
&new_node_ver,
dentry->d_inode->i_mode,
- MAJOR(dev), MINOR(dev) );
+ major(dev), minor(dev) );

presto_debug_fail_blkdev(fset, PRESTO_OP_MKNOD | 0x20);
if ( presto_do_expect(info, dentry->d_inode) ) --- fs/jffs/jffs_fm.c.old Fri Oct 12 18:38:10 2001
+++ fs/jffs/jffs_fm.c Tue Jan 1 21:05:38 2002
@@ -46,7 +46,7 @@
}
DJM(no_jffs_fmcontrol++);

- mtd = get_mtd_device(NULL, MINOR(dev));
+ mtd = get_mtd_device(NULL, minor(dev));

if (!mtd) {
kfree(fmc);--- fs/partitions/acorn.c.old Fri Dec 21 20:42:32 2001
+++ fs/partitions/acorn.c Tue Jan 1 21:01:21 2002
@@ -28,8 +28,8 @@
extern void xd_set_geometry(kdev_t dev, unsigned char, unsigned char,
unsigned long, unsigned int);

- if (MAJOR(dev) == MFM_ACORN_MAJOR) {
- unsigned long totalblocks = hd->part[MINOR(dev)].nr_sects;
+ if (major(dev) == MFM_ACORN_MAJOR) {
+ unsigned long totalblocks = hd->part[minor(dev)].nr_sects;
xd_set_geometry(dev, secspertrack, heads, totalblocks, 1);
}
#endif
@@ -261,7 +261,7 @@
/*
* Work out start of non-adfs partition.
*/
- nr_sects = hd->part[MINOR(to_kdev_t(bdev->bd_dev))].nr_sects - start_sect;
+ nr_sects = hd->part[minor(to_kdev_t(bdev->bd_dev))].nr_sects - start_sect;

if (start_sect) {
first_sector += start_sect;--- fs/partitions/ibm.c.old Fri Oct 12 18:38:15 2001
+++ fs/partitions/ibm.c Tue Jan 1 21:02:47 2002
@@ -125,7 +125,7 @@
return 0;
if (ioctl_by_bdev(bdev, HDIO_GETGEO, (unsigned long)geo);
return 0;
- blocksize = hardsect_size[MAJOR(dev)][MINOR(dev)];
+ blocksize = hardsect_size[major(dev)][minor(dev)];
if ( blocksize <= 0 ) {
return 0;
}
@@ -159,19 +159,19 @@
printk ("(MDSK)");
} else {
offset = (info->label_block + 1);
- size = hd -> sizes[MINOR(dev)]<<1;
+ size = hd -> sizes[minor(dev)]<<1;
}
- two_partitions( hd, MINOR(dev), blocksize, offset, size);
+ two_partitions( hd, minor(dev), blocksize, offset, size);
break;
case ibm_partition_lnx1:
case ibm_partition_none:
offset = (info->label_block + 1);
- size = hd -> sizes[MINOR(dev)]<<1;
- two_partitions( hd, MINOR(dev), blocksize, offset, size);
+ size = hd -> sizes[minor(dev)]<<1;
+ two_partitions( hd, minor(dev), blocksize, offset, size);
break;
case ibm_partition_vol1:
- size = hd -> sizes[MINOR(dev)]<<1;
- add_gd_partition(hd, MINOR(dev), 0, size);
+ size = hd -> sizes[minor(dev)]<<1;
+ add_gd_partition(hd, minor(dev), 0, size);

/* get block number and read then first format1 label */
blk = cchhb2blk(&vlabel.vtoc, geo) + 1;
@@ -187,7 +187,7 @@
offset + geo->sectors;

counter++;
- add_gd_partition(hd, MINOR(dev) + counter,
+ add_gd_partition(hd, minor(dev) + counter,
offset * blocksize,
psize * blocksize);

@@ -200,8 +200,8 @@
}
break;
default:
- add_gd_partition( hd, MINOR(dev), 0, 0);
- add_gd_partition( hd, MINOR(dev) + 1, 0, 0);
+ add_gd_partition( hd, minor(dev), 0, 0);
+ add_gd_partition( hd, minor(dev) + 1, 0, 0);
}

printk ( "\n" );--- fs/nfsd/nfs3xdr.c.old Fri Oct 12 18:38:12 2001
+++ fs/nfsd/nfs3xdr.c Tue Jan 1 20:53:58 2002
@@ -173,8 +173,8 @@
p = xdr_encode_hyper(p, (u64)(inode->i_size +511)& ~511);
else
p = xdr_encode_hyper(p, ((u64)inode->i_blocks) << 9);
- *p++ = htonl((u32) MAJOR(inode->i_rdev));
- *p++ = htonl((u32) MINOR(inode->i_rdev));
+ *p++ = htonl((u32) major(inode->i_rdev));
+ *p++ = htonl((u32) minor(inode->i_rdev));
p = xdr_encode_hyper(p, (u64) inode->i_dev);
p = xdr_encode_hyper(p, (u64) inode->i_ino);
p = encode_time3(p, inode->i_atime);
@@ -203,8 +203,8 @@
p = xdr_encode_hyper(p, (u64) fhp->fh_post_size);
}
p = xdr_encode_hyper(p, ((u64)fhp->fh_post_blocks) << 9);
- *p++ = htonl((u32) MAJOR(fhp->fh_post_rdev));
- *p++ = htonl((u32) MINOR(fhp->fh_post_rdev));
+ *p++ = htonl((u32) major(fhp->fh_post_rdev));
+ *p++ = htonl((u32) minor(fhp->fh_post_rdev));
p = xdr_encode_hyper(p, (u64) inode->i_dev);
p = xdr_encode_hyper(p, (u64) inode->i_ino);
p = encode_time3(p, fhp->fh_post_atime);
\
 
 \ /
  Last update: 2005-03-22 13:15    [W:0.062 / U:2.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site