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 | *******************************************************************************/
|
---|
13 | static struct modlmisc g_rtModuleStubMisc =
|
---|
14 | {
|
---|
15 | &mod_miscops, /* extern from kernel */
|
---|
16 | "platform agnostic module"
|
---|
17 | };
|
---|
18 |
|
---|
19 |
|
---|
20 | static 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 |
|
---|
31 | int _init(void);
|
---|
32 | int _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 |
|
---|
43 | int _fini(void);
|
---|
44 | int _fini(void)
|
---|
45 | {
|
---|
46 | return mod_remove(&g_rtModuleStubModLinkage);
|
---|
47 | }
|
---|
48 |
|
---|
49 |
|
---|
50 | int _info(struct modinfo *pModInfo);
|
---|
51 | int _info(struct modinfo *pModInfo)
|
---|
52 | {
|
---|
53 | return mod_info(&g_rtModuleStubModLinkage, pModInfo);
|
---|
54 | }
|
---|
55 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.