From 66af857a9984e04f5f7f16a44eb83cb5b29a6e00 Mon Sep 17 00:00:00 2001 From: Youness Alaoui Date: Sun, 28 Nov 2010 00:11:59 -0500 Subject: [PATCH] Add proper ifndef/define/endif to all .h.S files --- dev_syscalls.h.S | 3 +++ hvsc_handler.h.S | 6 ++++++ map_open_path.h.S | 7 ++++++- memory_patching.h.S | 7 ++++++- memory_patching_res.h.S | 5 +++++ open_hook.h.S | 6 ++++-- pl3_memset.h.S | 2 -- syscall36.h.S | 3 +++ syscall_handler.h.S | 5 +++++ trace_helpers.h.S | 7 ++++++- vuart_tracer.h.S | 5 +++++ 11 files changed, 49 insertions(+), 7 deletions(-) diff --git a/dev_syscalls.h.S b/dev_syscalls.h.S index 650dc35..7171438 100644 --- a/dev_syscalls.h.S +++ b/dev_syscalls.h.S @@ -9,6 +9,8 @@ * License ("GPL") version 3, as published by the Free Software Foundation. */ +#ifndef __DEV_SYSCALLS_H_S__ +#define __DEV_SYSCALLS_H_S__ syscall_peek_desc: QUAD_MEM2(syscall_peek) @@ -24,3 +26,4 @@ syscall_poke: std %r4, 0x00(%r3) blr +#endif /* __DEV_SYSCALLS_H_S__ */ diff --git a/hvsc_handler.h.S b/hvsc_handler.h.S index b6ec7ab..fe0c12b 100644 --- a/hvsc_handler.h.S +++ b/hvsc_handler.h.S @@ -8,6 +8,10 @@ * */ +#ifndef __HVSC_HANDLER_H_S__ +#define __HVSC_HANDLER_H_S__ + + hvsc_hook: mflr %r0 stdu %r1, -0x100(%r1) @@ -58,3 +62,5 @@ l_hvsc_return: addi %r1, %r1, 0x100 mtlr %r0 blr + +#endif /* __HVSC_HANDLER_H_S__ */ diff --git a/map_open_path.h.S b/map_open_path.h.S index 6c5b861..f083ddf 100644 --- a/map_open_path.h.S +++ b/map_open_path.h.S @@ -8,6 +8,9 @@ * */ +#ifndef __MAP_OPEN_PATH_H_S__ +#define __MAP_OPEN_PATH_H_S__ + /** * map_open_path: * @old_path: The path to map @@ -229,4 +232,6 @@ l_map_open_return: addi %r1, %r1, 0xc0 mtlr %r0 blr -map_open_path_end: \ No newline at end of file +map_open_path_end: + +#endif /* __MAP_OPEN_PATH_H_S__ */ diff --git a/memory_patching.h.S b/memory_patching.h.S index e66a0c6..c41d7cd 100644 --- a/memory_patching.h.S +++ b/memory_patching.h.S @@ -13,6 +13,9 @@ * of the code they wrote. */ +#ifndef __MEMORY_PATCHING_H_S__ +#define __MEMORY_PATCHING_H_S__ + /** * memory_patching: * @arg1: @@ -160,4 +163,6 @@ loc_594: addi %r1, %r1, 0x1a0 mtlr %r0 blr -memory_patching_end: \ No newline at end of file +memory_patching_end: + +#endif /* __MEMORY_PATCHING_H_S__ */ diff --git a/memory_patching_res.h.S b/memory_patching_res.h.S index 6ca54c4..ab18caf 100644 --- a/memory_patching_res.h.S +++ b/memory_patching_res.h.S @@ -13,6 +13,9 @@ * of the code they wrote. */ +#ifndef __MEMORY_PATCHING_RES_H_S__ +#define __MEMORY_PATCHING_RES_H_S__ + DEFINE_FUNC_PTR(memory_patching) counter: @@ -48,3 +51,5 @@ memory_patch_table_4: PATCH_DATA(elf4_data + 8, 0x6d6c2372) PATCH_DATA(elf4_data + 12, 0x6f6f7400) .long 0 + +#endif /* __MEMORY_PATCHING_RES_H_S__ */ diff --git a/open_hook.h.S b/open_hook.h.S index 3386bde..7741280 100644 --- a/open_hook.h.S +++ b/open_hook.h.S @@ -8,8 +8,9 @@ * */ -.align 4 - +#ifndef __OPEN_HOOK_H_S__ +#define __OPEN_HOOK_H_S__ + /* Pointer to : * struct { * struct path old @@ -156,3 +157,4 @@ l_hook_open_proceed: mr %r3, %r29 b ABSOLUTE_MEM2(patch_func3 + patch_func3_offset + 4) +#endif /* __OPEN_HOOK_H_S__ */ diff --git a/pl3_memset.h.S b/pl3_memset.h.S index 2639dcd..489a0e0 100644 --- a/pl3_memset.h.S +++ b/pl3_memset.h.S @@ -12,8 +12,6 @@ #ifndef __PL3_MEMSET_H_S__ #define __PL3_MEMSET_H_S__ - -.align 4 /** * pl3_memset(void *ptr, uint_8 value, size_t size) */ diff --git a/syscall36.h.S b/syscall36.h.S index a5a8fd6..5695bc9 100644 --- a/syscall36.h.S +++ b/syscall36.h.S @@ -11,6 +11,8 @@ */ +#ifndef __SYSCALL36_H_S__ +#define __SYSCALL36_H_S__ syscall_36_map_bdvd_desc: QUAD_MEM2 (syscall_36_map_bdvd) @@ -72,3 +74,4 @@ l_game_path_null: addi %r1, %r1, 0xd0 mtlr %r0 blr +#endif /* __SYSCALL36_H_S__ */ diff --git a/syscall_handler.h.S b/syscall_handler.h.S index 0f51b30..61a6864 100644 --- a/syscall_handler.h.S +++ b/syscall_handler.h.S @@ -8,6 +8,9 @@ * */ +#ifndef __SYSCALL_HANDLER_H_S__ +#define __SYSCALL_HANDLER_H_S__ + syscall_handler: mflr %r0 stdu %r1, -0x100(%r1) @@ -54,3 +57,5 @@ l_syscall_handler_return: addi %r1, %r1, 0x100 mtlr %r0 blr + +#endif /* __SYSCALL_HANDLER_H_S__ */ diff --git a/trace_helpers.h.S b/trace_helpers.h.S index 7f92f46..70e0d15 100644 --- a/trace_helpers.h.S +++ b/trace_helpers.h.S @@ -7,7 +7,10 @@ * License ("GPL") version 3, as published by the Free Software Foundation. * */ - + +#ifndef __TRACE_HELPERS_H_S__ +#define __TRACE_HELPERS_H_S__ + store_regs: std %r3, 0x70(%r1) std %r4, 0x78(%r1) @@ -70,3 +73,5 @@ send_trace: blr buf: .space 0x50 + +#endif /* __TRACE_HELPERS_H_S__ */ diff --git a/vuart_tracer.h.S b/vuart_tracer.h.S index 1972303..fa1dc75 100644 --- a/vuart_tracer.h.S +++ b/vuart_tracer.h.S @@ -8,6 +8,9 @@ * */ +#ifndef __VUART_TRACER_H_S__ +#define __VUART_TRACER_H_S__ + hvsc_hook: mflr %r0 stdu %r1, -0x100(%r1) @@ -148,3 +151,5 @@ l_send_buffer_next: addi %r1, %r1, 0xA0 mtlr %r0 blr + +#endif /* __VUART_TRACER_H_S__ */