[haiku-development] Re: Reloading BFS module

Rene Gollent wrote:
> On Mon, May 21, 2012 at 8:27 AM, Andreas Henriksson
> <sausageboy@xxxxxxxxx> wrote:
> > I'm wondering if it's possible to reload the BFS driver code while the
> > system is running? Rebooting can't be the best solution, can it?
> 
> Drivers in Haiku are reference counted, and are consequently
> implicitly unloaded when the last open file handles to their published
> device node(s) are closed. However, in the case of BFS, since that one
> is always in use due to handling the boot volume, that will never
> happen. There currently isn't a way that I know of to reload it on the
> fly otherwise.

There must be a reason for wanting to reload the module. I can think of two: 1. 
The module has been updated -- possibly as part of a system update -- which 
shouldn't happen that often, so a reboot shouldn't be too bothersome. 2. You 
are working on the module (fixing bugs or whatever) and need to frequently 
rebuild and test. In that case I would recommend either using userlandfs or 
renaming your development module (both file name and module name) and just 
unmount(/build)/remount your test partition. Working on Linux with an emulator 
is another option.

CU, Ingo

Other related posts: