diff options
author | behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> | 2008-05-08 23:21:47 +0000 |
---|---|---|
committer | behlendo <behlendo@7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c> | 2008-05-08 23:21:47 +0000 |
commit | 04a479f7066ccdaa23a6546955303b172f4a6909 (patch) | |
tree | 8230de457cc86d88d25620c6433795178f1313a1 /modules/spl/spl-generic.c | |
parent | d4c540de38a669851ccfde7a2d094621757c5995 (diff) |
Add an almost feature complete implemenation of kstat. I chose
not to support a few flags (we assert if they are used), and I
did not add the libkstat interface and instead exported everything
to proc for easy access.
git-svn-id: https://outreach.scidac.gov/svn/spl/trunk@103 7e1ea52c-4ff2-0310-8f11-9dd32ca42a1c
Diffstat (limited to 'modules/spl/spl-generic.c')
-rw-r--r-- | modules/spl/spl-generic.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/modules/spl/spl-generic.c b/modules/spl/spl-generic.c index 99497dd51..0ca0061ab 100644 --- a/modules/spl/spl-generic.c +++ b/modules/spl/spl-generic.c @@ -5,6 +5,7 @@ #include <sys/mutex.h> #include <sys/debug.h> #include <sys/proc.h> +#include <sys/kstat.h> #include <linux/kmod.h> #include "config.h" @@ -109,11 +110,16 @@ static int __init spl_init(void) if ((rc = proc_init())) GOTO(out4, rc); + if ((rc = kstat_init())) + GOTO(out5, rc); + if ((rc = set_hostid())) - GOTO(out5, rc = -EADDRNOTAVAIL); + GOTO(out6, rc = -EADDRNOTAVAIL); printk("SPL: Loaded Solaris Porting Layer v%s\n", VERSION); RETURN(rc); +out6: + kstat_fini(); out5: proc_fini(); out4: @@ -135,6 +141,7 @@ static void spl_fini(void) ENTRY; printk("SPL: Unloaded Solaris Porting Layer v%s\n", VERSION); + kstat_fini(); proc_fini(); vn_fini(); kmem_fini(); |