> #define DRV_NAME "ub"
> #define DEVFS_NAME DRV_NAME
> #define UB_MAJOR 125    /* Stolen from Experimental
> range for a week - XXX */
>
> Since /dev/uba does not even exist yet on my system,
> I had to create the device, using mknod (is there
> any other command?)
>
> cd /dev
> mknod uba  b  125  0
> mknod uba1 b  125  1
> mknod uba2 b  125  2
> etc.
>
> My question really is: I think that I used the correct
> major device number of 125, since that is what the
> file
> ub.c indicates. But is my usage of the minor device
> numbers 0, 1, 2, etc., correct?  These minor device
> assignments seem to work for me, since when I give
> the command,
>
> mount -t vfat /dev/uba1 /media/usbthumbdrive,

The probe function of device driver assigns the minor number. Since you 
have only 1 ub, it will use minor numbers 0 to 7. Possibly registering up 
to 8 partitions:

        disk->first_minor = sc->id * UB_MINORS_PER_MAJOR;

by calling add_disk().

On the other side, device nodes creation could have been done
automatically through devfs.

rowel

--
Philippine Linux Users' Group (PLUG) Mailing List
[EMAIL PROTECTED] (#PLUG @ irc.free.net.ph)
Official Website: http://plug.linux.org.ph
Searchable Archives: http://marc.free.net.ph
.
To leave, go to http://lists.q-linux.com/mailman/listinfo/plug
.
Are you a Linux newbie? To join the newbie list, go to
http://lists.q-linux.com/mailman/listinfo/ph-linux-newbie

Reply via email to