Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/modules/USBFix/USBFix.c

Source at commit 549 created 13 years 6 months ago.
By meklort, Modules bugfix. USB module is compiled now. Added a few changes to the gui module.
1/*
2 * Copyright (c) 2009 Evan Lojewski. All rights reserved.
3 *
4 */
5
6#include "libsaio.h"
7#include "modules.h"
8#include "pci.h"
9
10int usb_loop();
11void notify_usb_dev(pci_dt_t *pci_dev);
12
13void USBFix_pci_hook(pci_dt_t* current, void* arg2, void* arg3, void* arg4)
14{
15if(current->class_id != PCI_CLASS_SERIAL_USB) return;
16
17notify_usb_dev(current);
18}
19
20void USBFix_start_hook(void* arg1, void* arg2, void* arg3, void* arg4)
21{
22usb_loop();
23}
24
25
26void USBFix_start()
27{
28//printf("Hooking 'ExecKernel'\n");
29register_hook_callback("PCIDevice", &USBFix_pci_hook);
30register_hook_callback("Kernel Start", &USBFix_start_hook);
31
32}
33
34

Archive Download this file

Revision: 549