> > > --- check.c~ Thu Oct 11 18:25:10 2001
> > > +++ check.c Fri Dec 14 11:02:19 2001
> > > @@ -338,7 +338,8 @@
> > > if (!unregister)
> > > devfs_register_disc (dev, minor);
> > > for (part = 1; part < dev->max_p; part++) {
> > > - if ( unregister || (dev->part[part + minor].nr_sects < 1) ) {
> > > + if ( unregister || (dev->part[minor].nr_sects < 1) ||
> > > + (dev->part[part + minor].nr_sects < 1) ) {
> > > devfs_unregister (dev->part[part + minor].de);
> > > dev->part[part + minor].de = NULL;
> > > continue;
> > > @@ -383,6 +384,8 @@
> > >
> > > dev->part[first_minor].nr_sects = size;
> > > /* No such device or no minors to use for partitions */
> > > + if ( !size && dev->flags && (dev->flags[drive] &
GENHD_FL_REMOVABLE) )
> > > + devfs_register_partitions (dev, first_minor, 0);
> > > if (!size || minors == 1)
> > > return;
> >
> > Sorry, this code never gets called... grok_partitions doesn't call
> > check_partition when "size" is zero, and check_partition is the only
> > function that calls devfs_register_partitions, which is where this
> > change was made. Want to make another attempt? :-)
>
> ?!?!?!? My patch has two hunks. One which modifies
> devfs_register_partitions(), and another which modifies
> grok_partitions() to call devfs_register_partitions() when size==0 for
> removable media devices. This should work.
>
> Did you actually try this?
>
> Regards,
>
> Richard....
> Permanent: rgooch@xxxxxxxxxxxxx
> Current: rgooch@xxxxxxxxxxxxxxx
>
>
Sorry for the delay in responding, but the good news is that this patch does
cause things to work as expected. The partition entries appear and disappear
as they should.
Richard, I assume you'll incorporate this into your next devfs patch
release? I've already sent Marcelo the small patch for ide-probe.c, he's
queued it for 2.4.18-pre1.
Paul, I know you've been on the sidelines lurking here... once these changes
are in, all that will be left <G> is the changes to ide-floppy, which are
fairly large (diff size-wise), but not too difficult to understand. Can you
accept a single diff with all the changes I've made, or do you need them
broken apart? The changes include:
- cosmetic fix to keep ide-floppy from printk'ing its version string more
than once
- implemented media change detection
- changed many functions to not allocate idefloppy_pc_t on the stack (it's
much too large), but instead to kmalloc/kfree it
|