VirtualBox

source: vbox/trunk/src/VBox/Runtime/r0drv/solaris/modulestub-r0drv-solaris.c@ 43403

Last change on this file since 43403 was 37423, checked in by vboxsync, 13 years ago

Ran the source code massager (scm).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.3 KB
Line 
1
2
3
4/*******************************************************************************
5* Header Files *
6*******************************************************************************/
7#include <sys/modctl.h>
8
9
10/*******************************************************************************
11* Global Variables *
12*******************************************************************************/
13static struct modlmisc g_rtModuleStubMisc =
14{
15 &mod_miscops, /* extern from kernel */
16 "platform agnostic module"
17};
18
19
20static struct modlinkage g_rtModuleStubModLinkage =
21{
22 MODREV_1, /* loadable module system revision */
23 {
24 &g_rtModuleStubMisc,
25 NULL /* terminate array of linkage structures */
26 }
27};
28
29
30
31int _init(void);
32int _init(void)
33{
34 /* Disable auto unloading. */
35 modctl_t *pModCtl = mod_getctl(&g_rtModuleStubModLinkage);
36 if (pModCtl)
37 pModCtl->mod_loadflags |= MOD_NOAUTOUNLOAD;
38
39 return mod_install(&g_rtModuleStubModLinkage);
40}
41
42
43int _fini(void);
44int _fini(void)
45{
46 return mod_remove(&g_rtModuleStubModLinkage);
47}
48
49
50int _info(struct modinfo *pModInfo);
51int _info(struct modinfo *pModInfo)
52{
53 return mod_info(&g_rtModuleStubModLinkage, pModInfo);
54}
55
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette