[haiku-development] Re: rescan status in haiku

  • From: "François Revol" <revol@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Wed, 29 Aug 2007 13:51:55 +0200 CEST

> "Jérôme Duval" <korli@xxxxxxxxxxxxxxxx> wrote:
> > 2007/8/27, Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> > > Rescanning the device tree is not yet implemented in Haiku.
> > > Furthermore, I don't think we should copy the somewhat messy BeOS
> > > solution - that's something I wanted to work on after the device
> > > manager is more complete.
> > Does this deserve a ticket  ?  Also unloading a driver is simply
> > not
> > implemented (no real use). A private ioctl call could be a valid
> > option for
> > rescan.

ioctl() to what ?
you can't open devices from the driver you want to rescan because a)
they could be already open or b) they could block or c) they could not
be there because the driver hasn't been scanned yet or d) you don't
even know the devices the driver publishes.
So you're left with either using a known device to tunnel that (/dev/
null ?) or just using that ioctl on /dev/. which is as hackish as
write()ing to it anyway.

>
> Well, it has to be implemented anyway, ticket or not - but feel free
> to
> add one :-)

Besides this hack is used by at least one software I know (OpenSound
media node) to make sure the driver is scanned if it doesn't find stuff
the first time.

François.

Other related posts: