VirtualBox

source: vbox/trunk/src/VBox/Main/src-client/VBoxDriversRegister.cpp@ 35676

Last change on this file since 35676 was 35676, checked in by vboxsync, 14 years ago

Main, VMM: PCI passthrough work

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.3 KB
Line 
1/** @file
2 *
3 * Main driver registration.
4 */
5
6/*
7 * Copyright (C) 2006-2007 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/*******************************************************************************
20* Header Files *
21*******************************************************************************/
22#include "MouseImpl.h"
23#include "KeyboardImpl.h"
24#include "DisplayImpl.h"
25#include "VMMDev.h"
26#include "AudioSnifferInterface.h"
27#include "ConsoleImpl.h"
28#include "PciRawDevImpl.h"
29
30#include "Logging.h"
31
32#include <VBox/vmm/pdmdrv.h>
33#include <VBox/version.h>
34
35/**
36 * Register the main drivers.
37 *
38 * @returns VBox status code.
39 * @param pCallbacks Pointer to the callback table.
40 * @param u32Version VBox version number.
41 */
42extern "C" DECLEXPORT(int) VBoxDriversRegister(PCPDMDRVREGCB pCallbacks, uint32_t u32Version)
43{
44 LogFlow(("VBoxDriversRegister: u32Version=%#x\n", u32Version));
45 AssertReleaseMsg(u32Version == VBOX_VERSION, ("u32Version=%#x VBOX_VERSION=%#x\n", u32Version, VBOX_VERSION));
46
47 int rc = pCallbacks->pfnRegister(pCallbacks, &Mouse::DrvReg);
48 if (RT_FAILURE(rc))
49 return rc;
50
51 rc = pCallbacks->pfnRegister(pCallbacks, &Keyboard::DrvReg);
52 if (RT_FAILURE(rc))
53 return rc;
54
55 rc = pCallbacks->pfnRegister(pCallbacks, &Display::DrvReg);
56 if (RT_FAILURE(rc))
57 return rc;
58
59 rc = pCallbacks->pfnRegister(pCallbacks, &VMMDev::DrvReg);
60 if (RT_FAILURE(rc))
61 return rc;
62
63 rc = pCallbacks->pfnRegister(pCallbacks, &AudioSniffer::DrvReg);
64 if (RT_FAILURE(rc))
65 return rc;
66
67 rc = pCallbacks->pfnRegister(pCallbacks, &Console::DrvStatusReg);
68 if (RT_FAILURE(rc))
69 return rc;
70
71 rc = pCallbacks->pfnRegister(pCallbacks, &PciRawDev::DrvReg);
72 if (RT_FAILURE(rc))
73 return rc;
74
75 return VINF_SUCCESS;
76}
77/* vi: set tabstop=4 shiftwidth=4 expandtab: */
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