VirtualBox

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

最後變更 在這個檔案從52822是 37423,由 vboxsync 提交於 14 年 前

Ran the source code massager (scm).

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Author Date Id Revision
檔案大小: 1.3 KB
 
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
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

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