kernel: Minor style cleanup to arch_altcodepatch.
No functional change intended.
This commit is contained in:
parent
8a1709b3af
commit
0a347c90d5
@ -35,11 +35,11 @@ arch_altcodepatch_replace(uint16 tag, void* newcodepatch, size_t length)
|
|||||||
|
|
||||||
// we need to write to the text area
|
// we need to write to the text area
|
||||||
struct elf_image_info* info = elf_get_kernel_image();
|
struct elf_image_info* info = elf_get_kernel_image();
|
||||||
uint32 kernelProtection = B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA;
|
const uint32 kernelProtection = B_KERNEL_READ_AREA | B_KERNEL_EXECUTE_AREA;
|
||||||
set_area_protection(info->text_region.id, kernelProtection | B_KERNEL_WRITE_AREA);
|
set_area_protection(info->text_region.id, kernelProtection | B_KERNEL_WRITE_AREA);
|
||||||
|
|
||||||
for (altcodepatch *patch = &altcodepatch_begin; patch < &altcodepatch_end;
|
for (altcodepatch* patch = &altcodepatch_begin; patch < &altcodepatch_end;
|
||||||
patch++) {
|
patch++) {
|
||||||
if (patch->tag != tag)
|
if (patch->tag != tag)
|
||||||
continue;
|
continue;
|
||||||
void* address = (void*)(KERNEL_LOAD_BASE + patch->kernel_offset);
|
void* address = (void*)(KERNEL_LOAD_BASE + patch->kernel_offset);
|
||||||
@ -55,5 +55,3 @@ arch_altcodepatch_replace(uint16 tag, void* newcodepatch, size_t length)
|
|||||||
dprintf("arch_altcodepatch_replace found %d altcodepatches\n", count);
|
dprintf("arch_altcodepatch_replace found %d altcodepatches\n", count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user