Re: Why /dev/sdc1 doesn't show up...

Andries Brouwer
2002-11-19T22:26:55Z

On Tue, Nov 19, 2002 at 02:12:54AM -0500, Alexander Viro wrote:

> BTW, remember the flamef^Warguments about turning kdev_t into a pointer
> and thus avoiding digging through piles and piles of cr^Hode? Didn't
> fly for exactly the same reasons - there's no way to do it magically
> for entire kernel without breaking tons of code and/or creating an
> impossible-to-debug mess...

You never convinced me. Maybe we ever meet and can talk..

In the meantime:
Yesterday or so I built versions of 2.5.48 with 32-bit and 64-bit dev_t.

The code is full of conversions dev_t -> int -> dev_t -> int.
Ugly. I gave the mknod method in struct inode_operations type
int (*mknod) (struct inode *,struct dentry *,int,dev_t);
thus avoiding much conversion.
Do you have objections?

Andries

# mount /dev/hde6 /fbsd6 -t ufs -o ufstype=44bsd,ro
# ./ls -l /fbsd6/dev/da2s[34]
brw-r----- 1 root disk 4, 0x040012 Oct 31 21:06 /fbsd6/dev/da2s3
brw-r----- 1 root disk 4, 0x050012 Oct 31 21:06 /fbsd6/dev/da2s4
#