mirror of
https://github.com/pumpitupdev/pumptools.git
synced 2026-10-06 05:37:56 +03:00
Appl new code style on whole code base
Use a similar code style to bemanitools though reduce indentation to 2 spaces. Also some other tweaks to be more similar to google style.
This commit is contained in:
@@ -6,22 +6,24 @@
|
||||
|
||||
#include "util/log.h"
|
||||
|
||||
static enum cnh_result prihook_usb_updates_filehook(struct cnh_filehook_irp *irp)
|
||||
static enum cnh_result
|
||||
prihook_usb_updates_filehook(struct cnh_filehook_irp *irp)
|
||||
{
|
||||
if (irp->op != CNH_FILEHOOK_IRP_OP_OPEN) {
|
||||
return cnh_filehook_invoke_next(irp);
|
||||
}
|
||||
|
||||
if (!strcmp(irp->open_filename, "/mnt/0/prime_") || !strcmp(irp->open_filename, "/mnt/1/prime_")) {
|
||||
log_info("Blocking usb update %s", irp->open_filename);
|
||||
|
||||
return CNH_RESULT_NO_SUCH_FILE_OR_DIR;
|
||||
}
|
||||
|
||||
if (irp->op != CNH_FILEHOOK_IRP_OP_OPEN) {
|
||||
return cnh_filehook_invoke_next(irp);
|
||||
}
|
||||
|
||||
if (!strcmp(irp->open_filename, "/mnt/0/prime_") ||
|
||||
!strcmp(irp->open_filename, "/mnt/1/prime_")) {
|
||||
log_info("Blocking usb update %s", irp->open_filename);
|
||||
|
||||
return CNH_RESULT_NO_SUCH_FILE_OR_DIR;
|
||||
}
|
||||
|
||||
return cnh_filehook_invoke_next(irp);
|
||||
}
|
||||
|
||||
void prihook_usb_updates_init(void)
|
||||
{
|
||||
cnh_filehook_push_handler(prihook_usb_updates_filehook);
|
||||
cnh_filehook_push_handler(prihook_usb_updates_filehook);
|
||||
}
|
||||
Reference in New Issue
Block a user