Re: MAKEDEV patch

Tommy McCabe
2004-06-03T13:52:53Z

--- Eduardo Pereira Habkost
<ehabkost@conectiva.com.br> wrote:
>
> Hi, Tommy,
>
> On Wed, Jun 02, 2004 at 02:04:38PM -0700, Tommy
> McCabe wrote:
> > Fixes the bugs with MAKEDEV:
> >
> > 1. Leftovers from trying to move the script off
> the
> > ELKS disks to save space (All the $DEVDIRS).
>
> If a change is unnecessary, I suggest you that you
> don't include them on
> your patches, because it will make more difficult to
> check your patches,
> as they are bigger.
>
> BTW, your patch file seems to be broken. Did you
> edited
> it by hand?
>
> $ patch -p2 < /tmp/mkdev.patch
> patching file elkscmd/rootfs_template/dev/MAKEDEV
> patch: **** malformed patch at line 23: @@ -28,80
> +30,80 @@
>

I don't know why that happened; I didn't touch that.

> >
> > 2. ln and mknod are used instead of /bin/ln and
> > /bin/mknod, in case someone doesn't have them in
> /bin.
>
> Good.
>
> >
> > 3. Proper location is given for MAKESET: in the
> same
> > directory as MAKEDEV, not in the /dev directory on
> the
> > hard drive.
>
> Good.
>
> >
> > 4. Changes /bin/test to test, in case it's not in
> > /bin.
>
> Good.
>
> >
> > 5. Reduces the number of partition devices used
> per
> > hard drive from 64 to 8.
>
> Could you explain why? You also changed the meaning
> of the minor numbers. hdb4 was (5,68) and now is
> (5,12).

The minor whosawhatsists? Anyway, it's because having
64 partitions wastes a lot of inodes, especially on
8086s with 10-20MB drives. Debian only has 20. Can
ELKS even access logical partitions?

> >
> > 6. Changes "d" devices to block (or "b") devices,
> > their proper name.
>
> Good.
>
> >
> > 7. Removes the partitions on CD-ROM drives
> > (unimplemented, of course, but who has partitions
> on a
> > CD?).
>
> They are not partitions, they are multiple CD-ROM
> drives. You can have
> many CD-ROM drives, right?

Sure. My mistake. But even so, who has 16 CD-ROM
drives, or even 4?

> >
> > And although I didn't remove this, who really owns
> a
> > Conrad Electronic Parallel Port Radio Clock? Even
> > Debian doesn't have that.
>
> IMO we can drop this one. Linux has it on
> devices.txt, but I haven't
> seen a driver for it.
>
> I redid your patch without the unnecessary changes,
> below, and a change
> was missing:
>
> > --- Mkdev.old 2004-06-03 08:36:04.866192040 -0300
> > +++ MAKEDEV 2004-06-03 08:56:03.164023080 -0300
> > @@ -12,14 +12,14 @@
> > #
>
> (Skipping changes for 2, 3, 4 and 5).
>
> >
> >
>
##############################################################################
> > # Joysticks. These are not yet supported.
> >
> > -# $MKSET 0 15 $MKDEV js c 15
> > -# $MKSET 128 15 $MKDEV djs c 15
> > +# $MKDEV js c 15
> > +# $MKDEV djs c 15
>
> If joysticks are supported, I guess that we can
> support multiple
> joysticks.

Again, sure. But why do we need js and djs? And how
come it's 0 - 15 - 128 - 15, instead of 0 - 15 - 16 -
15? Who has 128 joysticks, or even 16, or even 4?

> >
> (skipping more changes)
> >
>
> I redid your patch including just (2), (3), (4) and
> (6), as those fixes
> can be included. Attached.
>
> --
> Eduardo
> > --- elkscmd/rootfs_template/dev/MAKEDEV 2004-06-03
> 08:36:04.866192040 -0300
> +++ elkscmd/rootfs_template/dev/MAKEDEV 2004-06-03
> 09:08:50.206414912 -0300
> @@ -12,14 +12,14 @@
> #
> # Refer to the MAKESET command, also in this
> directory, for usage details.
>
> -LINK=/bin/ln
> -MKDEV=/bin/mknod
> -MKSET=/dev/MAKESET
> +LINK=ln
> +MKDEV=mknod
> +MKSET=./MAKESET
>
>
>
##############################################################################
> # Ensure required auxilliary script is present.
>
> -if ! /bin/test -f "$MKSET"
> +if ! test -f "$MKSET"
> then
> echo ERROR: \"$MKSET\" script missing, unable
> to continue.
> exit 1
> @@ -97,11 +97,11 @@
>
>
##############################################################################
> # Direct IDE disks, Primary channel.
>
> - $MKSET 0 63 $MKDEV hda d 5 # Currently.
> - $MKSET 64 63 $MKDEV hdb d 5 # Currently.
> + $MKSET 0 63 $MKDEV hda b 5 # Currently.
> + $MKSET 64 63 $MKDEV hdb b 5 # Currently.
>
> -# $MKSET 0 63 $MKDEV hda d 3 # Ought to be.
> -# $MKSET 64 63 $MKDEV hdb d 3 # Ought to be.
> +# $MKSET 0 63 $MKDEV hda b 3 # Ought to be.
> +# $MKSET 64 63 $MKDEV hdb b 3 # Ought to be.
>
>
>
##############################################################################
> # Virtual consoles. Note that tty4 through tty7
> can't be enabled at this
> @@ -136,22 +136,22 @@
>
>
##############################################################################
> # SCSI disks. These are not yet supported.
>
> -# $MKSET 0 15 $MKDEV sda d 8
> -# $MKSET 16 15 $MKDEV sdb d 8
> -# $MKSET 32 15 $MKDEV sdc d 8
> -# $MKSET 48 15 $MKDEV sdd d 8
> -# $MKSET 64 15 $MKDEV sde d 8
> -# $MKSET 80 15 $MKDEV sdf d 8
> -# $MKSET 96 15 $MKDEV sdg d 8
> -# $MKSET 112 15 $MKDEV sdh d 8
> -# $MKSET 128 15 $MKDEV sdi d 8
> -# $MKSET 144 15 $MKDEV sdj d 8
> -# $MKSET 160 15 $MKDEV sdk d 8
> -# $MKSET 176 15 $MKDEV sdl d 8
> -# $MKSET 192 15 $MKDEV sdm d 8
> -# $MKSET 208 15 $MKDEV sdn d 8
> -# $MKSET 224 15 $MKDEV sdo d 8
> -# $MKSET 240 15 $MKDEV sdp d 8
> +# $MKSET 0 15 $MKDEV sda b 8
> +# $MKSET 16 15 $MKDEV sdb b 8
> +# $MKSET 32 15 $MKDEV sdc b 8
> +# $MKSET 48 15 $MKDEV sdd b 8
> +# $MKSET 64 15 $MKDEV sde b 8
> +# $MKSET 80 15 $MKDEV sdf b 8
> +# $MKSET 96 15 $MKDEV sdg b 8
> +# $MKSET 112 15 $MKDEV sdh b 8
> +# $MKSET 128 15 $MKDEV sdi b 8
> +# $MKSET 144 15 $MKDEV sdj b 8
> +# $MKSET 160 15 $MKDEV sdk b 8
> +# $MKSET 176 15 $MKDEV sdl b 8
> +# $MKSET 192 15 $MKDEV sdm b 8
> +# $MKSET 208 15 $MKDEV sdn b 8
> +# $MKSET 224 15 $MKDEV sdo b 8
> +# $MKSET 240 15 $MKDEV sdp b 8
>
>
>
##############################################################################
> # SCSI tapes. These are not yet supported.
> @@ -189,15 +189,15 @@
>
>
##############################################################################
> # BIOS hard disks.
>
> - $MKSET 0 63 $MKDEV bda d 3 # Currently
> - $MKSET 64 63 $MKDEV bdb d 3 # Currently
> - $MKSET 128 63 $MKDEV bdc d 3 # Currently
> - $MKSET 192 63 $MKDEV bdd d 3 # Currently
> -
> -# $MKSET 0 63 $MKDEV bda d 14 # Ought to be
> -# $MKSET 64 63 $MKDEV bdb d 14 # Ought to be
> -# $MKSET 128 63 $MKDEV bdc d 14 # Ought to be
> -# $MKSET 192 63 $MKDEV bdd d 14 # Ought to be
> + $MKSET 0 63 $MKDEV bda b 3 # Currently
> + $MKSET 64 63 $MKDEV bdb b 3 # Currently
> + $MKSET 128 63 $MKDEV bdc b 3 # Currently
> + $MKSET 192 63 $MKDEV bdd b 3 # Currently
> +
> +# $MKSET 0 63 $MKDEV bda b 14 # Ought to be
> +# $MKSET 64 63 $MKDEV bdb b 14 # Ought to be
> +# $MKSET 128 63 $MKDEV bdc b 14 # Ought to be
> +# $MKSET 192 63 $MKDEV bdd b 14 # Ought to be
>
>
>
##############################################################################
> # Joysticks. These are not yet supported.
> @@ -213,14 +213,14 @@
>
>
##############################################################################
> # Direct IDE disks, Secondary channel. These are
> not yet supported.
>
> -# $MKSET 0 63 $MKDEV hdc d 22
> -# $MKSET 64 63 $MKDEV hdd d 22
> +# $MKSET 0 63 $MKDEV hdc b 22
> +# $MKSET 64 63 $MKDEV hdd b 22
>
>
>
##############################################################################
> # Direct IDE disks, Tertiary channel. These are not
> yet supported.
>
> -# $MKSET 0 63 $MKDEV hde d 33
> -# $MKSET 64 63 $MKDEV hdf d 33
> +# $MKSET 0 63 $MKDEV hde b 33
> +# $MKSET 64 63 $MKDEV hdf b 33
>
>
>
##############################################################################
> # Z80-SIO devices. These are not yet supported.
> @@ -230,20 +230,20 @@
>
>
##############################################################################
> # Direct IDE disks, Quaternary channel. These are
> not yet supported.
>
> -# $MKSET 0 63 $MKDEV hde d 34
> -# $MKSET 64 63 $MKDEV hdf d 34
> +# $MKSET 0 63 $MKDEV hde b 34
> +# $MKSET 64 63 $MKDEV hdf b 34
>
>
>
##############################################################################
> # Direct IDE disks, Quinternary channel. These are
> not yet supported.
>
> -# $MKSET 0 63 $MKDEV hdg d 56
> -# $MKSET 64 63 $MKDEV hdh d 56
> +# $MKSET 0 63 $MKDEV hdg b 56
> +# $MKSET 64 63 $MKDEV hdh b 56
>
>
>
##############################################################################
> # Direct IDE disks, Quaternary channel. These are
> not yet supported.
>
> -# $MKSET 0 63 $MKDEV hdi d 57
> -# $MKSET 64 63 $MKDEV hdj d 57
> +# $MKSET 0 63 $MKDEV hdi b 57
> +# $MKSET 64 63 $MKDEV hdj b 57
>
>
>
##############################################################################
> # SCSI Media Changer. These are not yet supported.
>

> ATTACHMENT part 2 application/pgp-signature

__________________________________
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.