Re: memory waste in fs/devices.c/kdevname()

Albert D. Cahalan (acahalan@cs.uml.edu)
Sat, 19 Dec 1998 13:09:19 -0500 (EST)


Riley Williams writes:

> Hi Alan.
>
>>> Please let's make it output decimal numbers, too, like everything
>>> else that uses device numbers. Too many people have been confused
>>> about this like there is no tomorrow.
>
>> That would be incredibly incredibly mindbogglingly dumb
>
>> We would then have two sets of kernels where an error on 13:00
>> means two totally different devices. Much saner would be to put 0x
>> in front of the output.
>
> Better still, change the formatting such that decimal numbers are
> separated by commas like they are in long directory listings. The
> enclosed patch should help...

This is just not going to work. All you you "more is better!" people
excited about 64-bit dev_t haven't really thought things through.

This is what we have:

brw-rw-r-- 1 root floppy 2, 0 Dec 31 1979 /dev/fd0
brw-rw-r-- 1 root floppy 2, 29 Dec 31 1979 /dev/fd1H1440
crw------- 1 root root 45, 64 Mar 25 1997 /dev/isdnctrl0
crw-rw-r-- 1 root sys 14, 1 Apr 25 1995 /dev/sequencer

This is a 64-bit dev_t:

1234567890, 1234567890

This is a new directory listing:

brw-rw-r-- 1 root floppy 1234567890, 1234567890 Dec 31 1979 /dev/fd0
brw-rw-r-- 1 root floppy 1234567890, 1234567890 Dec 31 1979 /dev/fd1H1440
crw------- 1 root root 1234567890, 1234567890 Mar 25 1997 /dev/isdnctrl0
crw-rw-r-- 1 root sys 1234567890, 1234567890 Apr 25 1995 /dev/sequencer

If it looks OK to you, you don't have a standard terminal. Standard
terminals are 80x24. As shipped, an xterm comes up as 80x24. The Linux
console is 80x25. Normal laptop computer screens don't allow much more.

We could do what HP-UX did for part of the problem. Show hex in /bin/ls
so that it matches the kernel. Convert devices.txt to hex. Problem fixed.

We don't really need larger device numbers anyway. They would break
old apps, unlike the devfs solution.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/