From 96a124fdec7bad4e7daa5fd1a5dd8970d7e6a120 Mon Sep 17 00:00:00 2001 From: Christopher Roy Bratusek Date: Sat, 22 Dec 2012 10:23:43 +0100 Subject: [PATCH] runtimeiospatch: respect verbose flag --- libruntimeiospatch/source/runtimeiospatch.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libruntimeiospatch/source/runtimeiospatch.c b/libruntimeiospatch/source/runtimeiospatch.c index a963696..3a4372b 100644 --- a/libruntimeiospatch/source/runtimeiospatch.c +++ b/libruntimeiospatch/source/runtimeiospatch.c @@ -81,8 +81,9 @@ const u8 Kill_AntiSysTitleInstallv2_pt5_old[] = { 0x42, 0x94, 0xD0, 0x03, 0x9C, const u8 Kill_AntiSysTitleInstallv2_pt5_patch[] = { 0x42, 0x94, 0x46, 0xC0, 0x9C, 0x03 }; static u32 apply_patch(char *name, const u8 *old, u32 old_size, const u8 *patch, u32 patch_size, u32 patch_offset, bool verbose) { - u8 *ptr_start = (u8*)*((u32*)0x80003134), *ptr_end = (u8*)0x94000000; - printf(" Patching %-30s", name); + u8 *ptr_start = (u8*)*((u32*)0x80003134), *ptr_end = (u8*)0x94000000; + if(verbose) + printf(" Patching %-30s", name); u32 found = 0; u8 *location = NULL; while (ptr_start < (ptr_end - patch_size)) { @@ -99,10 +100,12 @@ static u32 apply_patch(char *name, const u8 *old, u32 old_size, const u8 *patch, } ptr_start++; } - if (found) - printf(" patched\n"); - else - printf(" not patched\n"); + if(verbose){ + if (found) + printf(" patched\n"); + else + printf(" not patched\n"); + } return found; }