Brian Behlendorf 51a727e90f Set cwd to '/' for the process executing insmod.
Ricardo has pointed out that under Solaris the cwd is set to '/'
during module load, while under Linux it is set to the callers cwd.
To handle this cleanly I've reworked the module *_init()/_exit()
macros so they call a *_setup()/_cleanup() function when any SPL
dependent module is loaded or unloaded.  This gives us a chance to
perform any needed modification of the process, in this case changing
the cwd.  It also handily provides a way to avoid creating wrapper
init()/exit() functions because the Solaris and Linux prototypes
differ slightly.  All dependent modules should now call the spl
helper macros spl_module_{init,exit}() instead of the native linux
versions.

Unfortunately, it appears that under Linux there has been no consistent
API in the kernel to set the cwd in a module.  Because of this I have
had to add more autoconf magic than I'd like.  However, what I have
done is correct and has been tested on RHEL5, SLES11, FC11, and CHAOS
kernels.

In addition, I have change the rootdir type from a 'void *' to the
correct 'vnode_t *' type.  And I've set rootdir to a non-NULL value.
2009-10-01 16:06:15 -07:00
..
2009-07-09 15:00:25 -07:00
2008-03-08 00:58:32 +00:00
2009-01-09 14:04:13 -08:00
2008-03-12 23:48:28 +00:00
2009-01-06 09:47:00 -08:00
2009-01-09 16:04:44 -08:00
2008-03-05 00:58:54 +00:00
2009-01-09 16:04:44 -08:00
2008-03-05 00:58:54 +00:00
2009-03-04 10:04:15 -08:00
2009-03-19 21:40:07 -07:00
2008-03-14 00:04:01 +00:00
2008-03-14 00:04:01 +00:00
2009-01-09 09:47:27 -08:00
2008-03-14 00:04:01 +00:00
2008-03-15 00:05:38 +00:00
2009-01-09 09:47:27 -08:00
2008-03-14 00:04:01 +00:00
2009-02-19 11:26:17 -08:00
2009-02-17 16:30:58 -08:00
2009-01-09 14:04:13 -08:00
2008-03-13 20:41:29 +00:00
2008-03-15 00:05:38 +00:00
2008-03-13 20:41:29 +00:00
2008-03-12 23:48:28 +00:00
2009-02-19 11:26:17 -08:00
2008-12-23 13:32:07 -08:00
2008-12-23 13:18:39 -08:00
2008-12-23 15:40:20 -08:00
2008-12-23 13:32:07 -08:00
2008-03-14 00:04:01 +00:00
2008-03-08 00:18:21 +00:00
2008-03-14 00:04:01 +00:00
2008-03-12 23:48:28 +00:00