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:
icex2
2021-03-19 15:52:34 +01:00
parent b493b4983a
commit eafb2909d1
322 changed files with 30291 additions and 25084 deletions
+14 -12
View File
@@ -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);
}