vfs: check userland buffers before reading them.
[haiku.git] / src / add-ons / kernel / bus_managers / pci / arch / x86 / pci_arch_module.cpp
blobb0f89523715ea82018286d3a539a8b2ae0956a45
1 /*
2 * Copyright 2010, Michael Lotz, mmlr@mlotz.ch. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
6 #include <PCI.h>
7 #include <PCI_x86.h>
8 #include "pci_msi.h"
11 static int32
12 pci_arch_module_std_ops(int32 op, ...)
14 switch (op) {
15 case B_MODULE_INIT:
17 module_info *dummy;
18 status_t result = get_module(B_PCI_MODULE_NAME, &dummy);
19 if (result != B_OK)
20 return result;
22 return B_OK;
25 case B_MODULE_UNINIT:
26 put_module(B_PCI_MODULE_NAME);
27 return B_OK;
30 return B_BAD_VALUE;
34 pci_x86_module_info gPCIArchModule = {
36 B_PCI_X86_MODULE_NAME,
38 pci_arch_module_std_ops
41 &pci_get_msi_count,
42 &pci_configure_msi,
43 &pci_unconfigure_msi,
44 &pci_enable_msi,
45 &pci_disable_msi,
46 &pci_get_msix_count,
47 &pci_configure_msix,
48 &pci_enable_msix