mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-10-01 03:08:04 +03:00
Version 1.08 with public source code release.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#define LOG_MODULE "patch-hook-mon"
|
||||
|
||||
#include "capnhook/hooklib/filehook-mon.h"
|
||||
#include "capnhook/hooklib/fileopen-mon.h"
|
||||
#include "capnhook/hooklib/fshook-mon.h"
|
||||
#include "capnhook/hooklib/iohook-mon.h"
|
||||
#include "capnhook/hooklib/usbhook-mon.h"
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
void patch_hook_mon_init(bool monitor_io, bool monitor_file, bool monitor_fs, bool monitor_usb, bool monitor_open)
|
||||
{
|
||||
if (monitor_open) {
|
||||
cnh_iohook_push_handler(cnh_fileopen_mon_iohook);
|
||||
cnh_filehook_push_handler(cnh_fileopen_mon_filehook);
|
||||
cnh_fshook_push_handler(cnh_fileopen_mon_fshook);
|
||||
}
|
||||
|
||||
if (monitor_io) {
|
||||
cnh_iohook_push_handler(cnh_iohook_mon);
|
||||
}
|
||||
|
||||
if (monitor_file) {
|
||||
cnh_filehook_push_handler(cnh_filehook_mon);
|
||||
}
|
||||
|
||||
if (monitor_fs) {
|
||||
cnh_fshook_push_handler(cnh_fshook_mon);
|
||||
}
|
||||
|
||||
if (monitor_usb) {
|
||||
cnh_usbhook_push_handler(cnh_usbhook_mon);
|
||||
}
|
||||
|
||||
log_info("Initialized");
|
||||
}
|
||||
Reference in New Issue
Block a user