tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: sys/dev/isa/fd.c FDUNIT/FDTYPE



> } The topic is how to add 8th type and currently fd.c uses hardcoded '8'.
> 
>      Actually, the topic is asking what the purpose of FDUNIT and
> FDTYPE is.  That question has been answered.

The original question is:

http://mail-index.NetBSD.org/tech-kern/2011/05/03/msg010454.html
>> sys/dev/isa/fd.c defines FDUNIT and FDTYPE as DIV/MOD 8.
>> etc/MAKEDEV uses makedisk_p16 for fd*.
>> 
>> Who's right?
>> As I'm just adding a ninth (ten-sector) fd_type, I prefer the 16 version.

I said changing DEV/MOD number in fd.c required all users to update
existing fd device nodes under /dev.
(note i386 uses makedisk_p16high that handles OLDMAXPARTITIONS)

> } If we can simply change it to 16, why did we introduce complicated
> } __HAVE_OLD_DISKLABEL for harddisks?
> 
>      Again, disklabels have nothing to do with floppies, or conversely,
> the letter part of the "floppy unit" has nothing to do with partitions.

FDUNIT and FDTYPE are calculated from device minor using the
hardcoded DEV/MOD number, as MI DISKUNIT and DISKPART for harddrives.
__HAVE_OLD_DISKLABEL was introduced to add magics in MD DISKUINT()
and DISKPART() macro to avoid renumbering existing old device minors
on MAXPARTITION bump.
Current MI MAKEDEV.tmpl treats floppy device minors as harddrives.

If someone[TM] will maintain MAKEDEV scripts and
write doc/UPDATING properly, no problem for me.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index