_UNUSED is a stupid macro and I should just use __attribute__((unused)) directly.
This will never build on anything aside from GCC or clang anyways, since msvc is shit
that targets windows and armcc is proprietary and expensive.
Clean up includes massively; the mess was mainly due to common.h "abstracting" all
the dependencies, allowing me to be lazy and not properly componentize code. Now all
files include solely what they need, which is a step in the right direction of unfucking
all the cross-dependencies.
This would have been much more painful to figure out were it not for include-what-you-use
(https://github.com/include-what-you-use/include-what-you-use) so next time you dig your
grave into source dependency hell using a common header, try that tool.
// Also, this contains quite a few changes from luma's screen.c, which is where it originates from.
-#include <common.h>
-#include <ctr9/io.h>
-#include <ctr9/ctr_screen.h>
-#include <ctr9/ctr_cache.h>
-#include <ctr9/i2c.h>
+#include <string.h>
+#include <stdbool.h> // for false, true
+#include <stdint.h> // for uint32_t, uint8_t
+#include <arm11.h> // for PDC0_FRAMEBUFFER_SETUP_REG, PDC1_FRAMEBU...
+#include <ctr9/ctr_cache.h> // for ctr_cache_clean_and_flush_all
+#include <ctr9/i2c.h> // for i2cWriteRegister, I2C_DEV_MCU
+#include <malloc.h> // for memalign
+#include <option.h> // for get_opt_u32, OPTION_BRIGHTNESS
+#include <std/draw.h> // for framebuffers
struct framebuffers *framebuffers;
#include <corbconf.h>
#if defined(CHAINLOADER) && CHAINLOADER == 1
-#include <common.h>
+#include <stdint.h> // for uint32_t, uint8_t
+#include <stdlib.h> // for NULL
+#include <string.h> // for memcpy, strlen, strncpy
+#include <arm11.h> // for screen_mode
+#include <malloc.h> // for memalign
+#include <menu-backend.h> // for options_s, show_menu, type::option
+#include <std/abort.h> // for panic
+#include <std/draw.h> // for framebuffers, stderr
+#include <std/fs.h> // for crclose, cropen, crread, crsize, recur...
+#include <std/memory.h> // for memfind, strdup_self
+#include <structures.h> // for PATH_BITS, PATH_CHAINS
+#include "ctr9/io/fatfs/ff.h" // for FILINFO, f_stat, ::FR_OK, AM_DIR
uint32_t current_chain_index = 0;
struct options_s *chains = NULL;
-#include <common.h>
-
// This is a do-nothing implementation of the configuration backend.
// It's solely to show what the access API for config should be.
-#include <common.h>
+#include <malloc.h> // for memalign
+#include <stdint.h> // for uint8_t, uint32_t
+#include <string.h> // for memset, strncpy, memcmp, strcpy, NULL
+#include "config.h" // for SYSCONFDIR, BINDIR, LIBDIR, LIBEXECDIR
+#include "ctr9/io/fatfs/ff.h" // for f_mkdir, f_unlink
+#include "ctr9/io/sdmmc/sdmmc.h" // for sdmmc_get_cid
+#include "menu.h" // for add_patch_menu, poweroff, reset_pat...
+#include "option.h" // for config_file, OPTION_ACCENT_COLOR
+#include "std/fs.h" // for cropen, crclose, crwrite, crread
+#include "structures.h" // for PATH_AGB_F, PATH_AUX_PATCHES, PATH_...
FILE *conf_handle;
-
-#include <ctr9/ctr_hid.h>
-#include <ctr9/io.h>
-#include <ctr9/ctr_screen.h>
-#include <ctr9/i2c.h>
-
-#include <common.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <arm11.h> // for screen_mode, RGBA8, installArm11Stub, set_...
+#include <ctr9/ctr_hid.h> // for ctr_hid_get_buttons, CTR_HID_RT
+#include <firm/headers.h> // for prepatch_firm, boot_firm
+#include <firm/firm.h> // for prepatch_firm, boot_firm
+#include <input.h> // for wait
+#include <interrupt.h> // for install_interrupts
+#include <malloc.h> // for mallinfo
+#include <menu.h> // for poweroff
+#include <option.h> // for get_opt_u32, config, config_file, OPTION_S...
+#include <patcher.h> // for generate_patch_cache
+#include <std/draw.h> // for clear_disp, stderr, BOTTOM_SCREEN, TOP_SCREEN
+#include <std/fs.h> // for crmount
+#include <std/types.h> // for CFG_BOOTENV, PDN_MPCORE_CFG
+#include <structures.h> // for PATH_AGB_P, PATH_BOTTOM_BG, PATH_MODULE_AGB
int is_n3ds = 0;
int doing_autoboot = 0;
-#include <common.h>
-#include <ctr9/aes.h>
-#include <ctr9/sha.h>
-
+#include <stdint.h> // for uint8_t, uint32_t
+#include <stddef.h> // for uint8_t, uint32_t
+#include <ctr9/sha.h> // for sha_get, sha_init, sha_update, SHA256_MODE
+#include "firm/headers.h" // for ncch_h, MEDIA_UNITS
+#include "firm/keys.h" // for ncch_h, MEDIA_UNITS
+#include "firm/firm.h" // for ncch_h, MEDIA_UNITS
#define FIRM_INTERNAL_CODE
-#include <firm/internal.h>
+#include <firm/internal.h> // lines 6-6
+#include "firm/decryptor.h" // for ::NCCHTYPE_EXEFS, ::NCCHTYPE_EXHEADER
void
ncch_getctr(const ncch_h *ncch, uint8_t *ctr, uint8_t type)
-#include <stdint.h>
-#include <stddef.h>
-
-#include <ctr9/io.h>
-#include <ctr9/aes.h>
-#include <ctr9/sha.h>
-#include <common.h>
-
+#include <stddef.h> // for NULL, size_t
+#include <stdint.h> // for uint64_t, uint8_t
+#include <stdlib.h> // for free
+#include <string.h> // for memcmp
+#include <malloc.h> // for memalign
+#include "firm/headers.h" // for firm_h, ncch_h
+#include "firm/keys.h" // for firm_h, ncch_h
+#include "firm/firm.h" // for firm_signature, get_firm_info, consoles::...
#define FIRM_INTERNAL_CODE
-#include <firm/internal.h>
+#include <firm/internal.h> // for dec_k9l, extract_firm_from_ncch, firmlaunch
+#include "patcher.h" // for patch_firm_all
+#include "std/fs.h" // for cropen, crclose, crwrite, crread, crsize
+#include "std/memory.h" // for strdupcat
firm_h*
load_firm(const char *path, size_t *size_out)
-#include <common.h>
-#include <ctr9/aes.h>
-#include <ctr9/sha.h>
-
+#include <stdint.h> // for uint32_t, uint8_t
+#include <stdlib.h> // for free
+#include <string.h> // for memmove
+#include <firm/headers.h>
+#include <firm/keys.h>
+#include <firm/firm.h>
#define FIRM_INTERNAL_CODE
-#include <firm/internal.h>
+#include <firm/internal.h> // for void_call
+#include "arm11.h" // for deinitScreens
+#include "firm/headers.h" // for firm_section_h, firm_h
+#include "std/draw.h" // for crflush, stderr
+#include "std/fs.h" // for crumount
static volatile uint32_t *const a11_entry = (volatile uint32_t *)0x1FFFFFF8;
-#include <common.h>
-
-#include <ctr9/aes.h>
-#include <ctr9/sha.h>
-
+#include <stdint.h> // for uint8_t, uint32_t
+#include <ctr9/aes.h> // for use_aeskey, AES_BLOCK_SIZE, setup_aeskey
+#include <firm/headers.h>
+#include <firm/keys.h>
+#include <firm/firm.h>
#define FIRM_INTERNAL_CODE
-#include <firm/internal.h>
+#include <firm/internal.h> // lines 7-7
+#include "std/fs.h" // for crclose, cropen, crread
+#include "structures.h" // for PATH_SLOT0X11KEY95, PATH_SLOT0X11KEY96
int set_N11_K9L(uint32_t index) {
static uint8_t ss_keyn[2][16] = {
-#include <stdint.h>
-#include <stddef.h>
-
-#include <ctr9/io.h>
-#include <ctr9/aes.h>
-#include <ctr9/sha.h>
-#include <common.h>
-
+#include <stddef.h> // for NULL, size_t
+#include <stdint.h> // for uint8_t, uint32_t
+#include <stdlib.h> // for free, atoi
+#include <string.h> // for memcpy, memcmp
+#include <ctr9/aes.h> // for AES_BLOCK_SIZE, use_aeskey, cbc_decrypt
+#include <malloc.h> // for memalign
+#include "firm/headers.h" // for firm_h, firm_section_h, ncch_h, arm9bin_h
+#include "firm/keys.h" // for firm_h, firm_section_h, ncch_h, arm9bin_h
+#include "firm/decryptor.h" // for sha256sum, ncch_getctr, ::NCCHTYPE_EXEFS
+#include "firm/firm.h" // for firm_type::type_native, firm_signature
#define FIRM_INTERNAL_CODE
#include <firm/internal.h>
+#include "std/fs.h" // for crclose, cropen, crread, crsize
+#include "std/memory.h" // for memfind
int decrypt_k9l(arm9bin_h *header, enum firm_type type, uint32_t k9l) {
uint8_t slot = 0x15;
-#include <common.h>
-
+#include <malloc.h> // for memalign
+#include <stddef.h> // for NULL
+#include <stdint.h> // for uint8_t
+#include "firm/headers.h" // for firm_section_h, firm_h, FIRM_TYPE_ARM9
+#include "firm/keys.h" // for firm_section_h, firm_h, FIRM_TYPE_ARM9
+#include "firm/firm.h" // for firm_signature, consoles::console_o3ds
#define FIRM_INTERNAL_CODE
-#include <firm/internal.h>
+#include <firm/internal.h> // lines 4-4
+#include "std/memory.h" // for memfind
struct firm_signature *
get_firm_info(firm_h *firm)
-#include <stdint.h>
-#include <common.h>
+#include <stdint.h> // for uint32_t
+#include <option.h> // for get_opt_u32, OPTION_TRACE
+#include <std/draw.h> // for screenshot, stderr
+#include "ctr9/ctr_hid.h" // for ctr_hid_get_buttons, CTR_HID_A, CTR_HID_B
extern void waitcycles(uint32_t cycles);
#define ARM9_APPROX_DELAY_MAX 134058675 / 95
uint32_t
-wait_key(_UNUSED int sleep)
+wait_key()
{
uint32_t ret = 0, get = 0;
while (ret == 0) {
{
if (get_opt_u32(OPTION_TRACE) && !doing_autoboot) {
fprintf(stderr, "[Waiting...]");
- wait_key(0); // No delay on traces.
+ wait_key(); // No delay on traces.
}
fprintf(stderr, "\r \r");
}
#include <stdint.h>
#include <stddef.h>
-#include "std/unused.h"
#ifndef LOADER
- #include <common.h>
+ #include <stddef.h> // for size_t, NULL
+ #include <stdint.h> // for uint8_t, uint32_t, uint16_t, uint64_t
+ #include <stdlib.h> // for malloc, free
+ #include <string.h> // for strlen, memcmp, memcpy
+ #include <firm/headers.h> // for firm_section_h, firm_h
+ #include <input.h> // for wait
+ #include <malloc.h> // for memalign
+ #include <option.h> // for get_opt_u32, OPTION_OVERLY_VERBOSE
+ #include <std/abort.h> // for panic
+ #include <std/draw.h> // for stderr
+ #include <std/fs.h> // for crclose, cropen, crsize, crread, crwrite
+ #include <std/memory.h> // for memfind
+ #include <structures.h> // for system_patch, PATH_LOADER_CACHE
#else
#ifndef PATH_MAX
#define PATH_MAX 255
-#include <common.h>
-#include <ctr9/ctr_interrupt.h>
-#include <ctr9/ctr_irq.h>
+#include <stdint.h> // for uint32_t
+#include <ctr9/ctr_interrupt.h> // for ctr_interrupt_set, ctr_interrupt_pre...
+#include <ctr9/ctr_irq.h> // for ctr_irq_initialize
+#include <std/abort.h> // for panic
+#include <std/draw.h> // for stderr
void dump_state_printf(uint32_t* regs) {
fprintf(stderr, " cpsr:%x sp:%x pc:%x\n"
(unsigned int)regs[15]);
}
-void reset_INT(_UNUSED uint32_t* regs) {
+void reset_INT(__attribute((unused)) uint32_t* regs) {
fprintf(stderr, "Reset called.\n");
}
panic("Cannot continue. Halting.\n");
}
-void swi_INT(_UNUSED uint32_t* regs) {
+void swi_INT(__attribute__((unused)) uint32_t* regs) {
fprintf(stderr, "SWI called. Returning.\n");
}
panic("Cannot continue. Halting.\n");
}
-void fiq_INT(_UNUSED uint32_t* regs) {
+void fiq_INT(__attribute__((unused)) uint32_t* regs) {
fprintf(stderr, "FIQ called. Returning.\n");
}
-#include <common.h>
+#include <stdint.h> // for uint32_t
+#include <stdlib.h> // for NULL
+#include <input.h> // for wait_key
+#include <menu-backend.h> // for options_s, type::unselectable, type::optio...
+#include <option.h> // for get_opt_u32, OPTION_ACCENT_COLOR
+#include <std/draw.h> // for TOP_SCREEN, clear_disp, set_cursor, stdout
+#include "ctr9/ctr_hid.h" // for CTR_HID_A, CTR_HID_B, CTR_HID_DOWN, CTR_HI...
extern int is_n3ds;
extern unsigned int font_w;
set_cursor(TOP_SCREEN, 0, 0);
header("Any:Back");
fprintf(stdout, "%s", help);
- wait_key(1);
+ wait_key();
}
void accent_color(void* screen, int fg) {
set_cursor(TOP_SCREEN, 0, 0);
header("Any:Back");
fprintf(stdout, "No entries.\n");
- wait_key(1);
+ wait_key();
return 0;
}
fprintf(TOP_SCREEN, "%s\x1b[0m", options[i].name);
}
- uint32_t key = wait_key(1);
+ uint32_t key = wait_key();
switch (key) {
case CTR_HID_UP:
-#include <common.h>
-#include <ctr9/ctr_system.h>
+#include <stdint.h> // for uint32_t, uint8_t
+#include <stdlib.h> // for NULL
+#include <string.h> // for memcmp
+#include <ctr9/ctr_system.h> // for ctr_system_poweroff, ctr_system_reset
+#include <malloc.h> // for memalign
+#include <menu-backend.h> // for type::unselectable, type::option, opti...
+#include <option.h> // for get_opt, toggle_opt, save_config, OPTI...
+#include <firm/headers.h>
+#include <patcher.h> // for generate_patch_cache
+#include <std/draw.h> // for crflush, BOTTOM_SCREEN, stderr
+#include <std/fs.h> // for crumount, read_file, recurse_call
+#include <std/memory.h> // for strdup_self
+#include <structures.h> // for system_patch, PATH_AUX_PATCHES, PATH_L...
+#include "config.h" // for LOCALSTATEDIR
+#include "ctr9/io/fatfs/ff.h" // for FILINFO, f_stat, ::FR_OK, AM_DIR
// FIXME - Remove limit
#define MAX_PATCHES 256
#define lnh(s) { s, "", unselectable, 0, NULL, NULL, 0, 1 }
void config_main_menu();
+void poweroff();
+void reset();
static struct options_s options[] = {
// Patches.
* emunand.c
*/
-#include <ctr9/io.h>
-#include <common.h>
+#include <malloc.h> // for memalign
+#include <stdint.h> // for uint32_t, uint8_t, uint16_t, uintptr_t
+#include <stdlib.h> // for free
+#include "ctr9/io/sdmmc/sdmmc.h" // for sdmmc_sdcard_readsectors, getMMCDevice
+#include "firm/headers.h" // for firm_section_h, firm_h, exefs_file_h
+#include "firm/firm.h" // for find_proc9
+#include "std/abort.h" // for panic
+#include "std/draw.h" // for stderr
+#include "std/fs.h" // for crclose, cropen, crread, crsize
+#include "std/memory.h" // for memfind
+#include "structures.h" // for PATH_EMUNAND_CODE
void
verify_emunand(uint32_t index, uint32_t *off, uint32_t *head)
-#include <common.h>
+#include <stdint.h> // for uint8_t, uint32_t
+#include <stdlib.h> // for free, malloc
+#include <string.h> // for memmove, memcmp, memcpy
+#include "ctr9/io/fatfs/ff.h" // for FILINFO, f_stat, ::FR_OK, AM_DIR
+#include "firm/headers.h" // for ncch_h, firm_section_h, firm_h, NCCH_M...
+#include "std/draw.h" // for stderr
+#include "std/fs.h" // for crclose, cropen, crread, crsize, recur...
/* Not possible to be implemented as bytecode. Hey, can't win em all. */
/* This code was all nicked from Luma (before the GPL headers were corrected by TuxSH)
Someone please remind me to fix this code.*/
-#include <common.h>
-#include <ctr9/io.h>
+#include <stdint.h> // for uint32_t, uint8_t
+#include <stddef.h> // for fprintf, size_t, FILE
+#include <string.h> // for memcpy
+#include "firm/headers.h" // for firm_section_h, firm_h
+#include "input.h" // for wait
+#include "std/abort.h" // for panic
+#include "std/draw.h" // for stderr
+#include "std/fs.h" // for crclose, cropen, crread, crsize
+#include "std/memory.h" // for memfind
+#include "structures.h" // for PATH_AGB_P, PATH_NATIVE_P, PATH_TWL_P, PAT...
uint8_t*
getProcess9(uint8_t *pos, uint32_t size, uint32_t *process9Size, uint32_t *process9MemAddr)
-#include <common.h>
+#include <stdint.h> // for uint32_t, uint8_t
+#include <stddef.h> // for fprintf, NULL, FILE
+#include "firm/headers.h" // for firm_section_h, firm_h
+#include "std/draw.h" // for stderr
+#include "std/fs.h" // for crclose, cropen, crread, crsize
+#include "std/memory.h" // for memfind
+#include "structures.h" // for PATH_BACKDOOR
uint8_t *arm11Section1 = NULL;
uint32_t *svc_tab_open = NULL, *exceptionsPage = NULL, *svcTable = NULL;
-#include <common.h>
-#include <stdint.h>
+#include <stdint.h> // for uint8_t, uint64_t
+#include <string.h> // for memcmp
+#include <firm/headers.h> // for firm_h
+#include <input.h> // for wait
+#include <interp.h> // for cache_patch, execb
+#include <option.h> // for get_opt_u32, OPTION_EMUNAND, OPTION_EM...
+#include <patch/emunand.h> // for patch_emunand
+#include <patcher.h> // for patch_modules, patch_reboot, patch_svc...
+#include <std/abort.h> // for panic
+#include <std/fs.h> // for recurse_call, read_file, rrmdir
+#include <structures.h> // for system_patch, PATH_TEMP, PATH_AUX_PATCHES
+#include "ctr9/io/fatfs/ff.h" // for f_mkdir, FILINFO, f_stat, ::FR_OK, AM_DIR
extern int doing_autoboot;
#ifndef __ABORT_H
#define __ABORT_H
-#include <stdarg.h>
-#include <common.h>
+#include <stdarg.h> // for va_end, va_list, va_start
+#include "input.h" // for wait_key
+#include "menu.h" // for poweroff
+#include "std/draw.h" // for stderr, clear_disp, set_cursor
void panic(char* x, ...) {
va_list ap;
-#include <stdint.h>
-#include <assert.h>
-#include <stdarg.h>
-#include <common.h>
-#include <ctr9/io.h>
+#include <ctype.h> // for ::_ISprint, isprint
+#include <stdarg.h> // for va_arg, va_list, va_end, va_start
+#include <stdint.h> // for uint8_t, uint32_t, int64_t, uint64_t
+#include <stdlib.h> // for malloc
+#include <string.h> // for memset, NULL, size_t, memcpy, strlen
+#include "ctr9/io/fatfs/ff.h" // for f_unlink
+#include "option.h" // for get_opt_u32, OPTION_DIM_MODE, OPTION_S...
+#include "std/abort.h" // for panic
+#include "std/draw.h" // for framebuffers, SCREEN_DEPTH, stderr
+#include "std/fs.h" // for crwrite, crclose, cropen, crread, crseek
+#include "structures.h" // for PATH_TEMP, PATH_BOOTLOG
static unsigned int top_cursor_x = 0, top_cursor_y = 0;
static unsigned int bottom_cursor_x = 0, bottom_cursor_y = 0;
if (!isprint(character))
return; // Don't output non-printables.
- _UNUSED unsigned int width = 0;
+ unsigned int width = 0;
unsigned int height = 0;
uint8_t* buffer_bg;
if (screen == framebuffers->top_left || screen == framebuffers->top_right) {
return;
unsigned int width = 0;
- _UNUSED unsigned int height = 0;
+ unsigned int height = 0;
unsigned int *cursor_x = NULL;
unsigned int *cursor_y = NULL;
uint8_t *screen = NULL;
-#include <stddef.h>
-#include <ctr9/io.h>
-#include <common.h>
+#include <stddef.h> // for size_t, NULL
+#include <stdint.h> // for int64_t, uint32_t
+#include <stdlib.h> // for free, malloc
+#include <string.h> // for memset, strcpy, strnlen, str...
+#include "ctr9/io/ctr_fatfs.h" // for ctr_fatfs_initialize
+#include "ctr9/io/ctr_nand_interface.h" // for ctr_nand_interface
+#include "ctr9/io/ctr_sd_interface.h" // for ctr_sd_interface
+#include "ctr9/io/fatfs/ff.h" // for FILINFO, f_mount, ::FR_OK
+#include "ctr9/io/fatfs/integer.h" // for UINT
+#include "option.h" // for set_opt_u32, OPTION_SAVE_LOGS
+#include "std/fs.h" // for SEEK_CUR, SEEK_END, SEEK_SET
// ctr_nand_crypto_interface ctr_io;
// ctr_nand_crypto_interface twl_io;
-#include <common.h>
-
-#include <stdint.h>
-#include <stddef.h>
+#include <stddef.h> // for size_t, NULL
+#include <stdint.h> // for uint32_t, uint8_t
+#include <stdlib.h> // for malloc
+#include <string.h> // for memcpy, strlen, memcmp
char*
strdup_self(const char* str)
+++ /dev/null
-#ifndef __COMMON_H
-#define __COMMON_H
-
-#include <stdlib.h>
-#include <malloc.h>
-
-#include <corbconf.h>
-
-#include <std/unused.h>
-#include <std/abort.h>
-
-#include <std/types.h>
-
-#include <structures.h>
-
-#include <std/memory.h>
-#include <std/fs.h>
-#include <std/draw.h>
-
-#include <firm/headers.h>
-#include <firm/decryptor.h>
-#include <firm/firm.h>
-#include <firm/keys.h>
-
-#include <menu.h>
-#include <menu-backend.h>
-#include <arm11.h>
-#include <interrupt.h>
-#include <option.h>
-#include <input.h>
-#include <interp.h>
-#include <patcher.h>
-
-#include <patch/patch_file.h>
-#include <patch/emunand.h>
-
-#endif
/* Waits for a single key to be pressed and released, returning the key when done.
*
- * \param sleep Unused. Previously would add some delay to each read for dpads with issues.
* \return The key pressed and released.
*/
-uint32_t wait_key(_UNUSED int sleep);
+uint32_t wait_key();
/* Displays a prompt on the bottom screen if the relevant option is enabled and waits on input
* to continue.
+++ /dev/null
-#ifndef __UNUSED_H
-#define __UNUSED_H
-
-#define _UNUSED __attribute__((unused))
-
-#endif
#include "memory.h"
#include "logger.h"
#include <structures.h>
-#include <std/unused.h>
#include "interp.h"
#ifndef PATH_MAX
}
static void
-adjust_cpu_settings(_UNUSED uint64_t progId, EXHEADER_prog_addrs *shared)
+adjust_cpu_settings(__attribute__((unused)) uint64_t progId, EXHEADER_prog_addrs *shared)
{
uint8_t* code = (uint8_t*)shared->text_addr;
uint32_t size = shared->text_size << 12;
// This is only for the .code segment.
void
-patch_exe(uint64_t progId, uint16_t progver, EXHEADER_prog_addrs* shared, _UNUSED EXHEADER_prog_addrs* original)
+patch_exe(uint64_t progId, uint16_t progver, EXHEADER_prog_addrs* shared, __attribute__((unused)) EXHEADER_prog_addrs* original)
{
if (progId == 0x0004013000008002LL)
adjust_cpu_settings(progId, shared);
// Gets how many bytes .text must be extended by for patches to fit.
uint32_t
-get_text_extend(_UNUSED uint64_t progId, _UNUSED uint16_t progver, _UNUSED uint32_t size_orig)
+get_text_extend(__attribute__((unused)) uint64_t progId, __attribute__((unused)) uint16_t progver, __attribute__((unused)) uint32_t size_orig)
{
return 0; // Stub - nothing needs this yet
}
// Gets how many bytes .ro must be extended.
uint32_t
-get_ro_extend(_UNUSED uint64_t progId, _UNUSED uint16_t progver, _UNUSED uint32_t size_orig)
+get_ro_extend(__attribute__((unused)) uint64_t progId, __attribute__((unused)) uint16_t progver, __attribute__((unused)) uint32_t size_orig)
{
return 0; // Stub - nothing needs this yet
}
// Again, same, but for .data.
uint32_t
-get_data_extend(_UNUSED uint64_t progId, _UNUSED uint16_t progver, _UNUSED uint32_t size_orig)
+get_data_extend(__attribute__((unused)) uint64_t progId, __attribute__((unused)) uint16_t progver, __attribute__((unused)) uint32_t size_orig)
{
return 0; // Stub - nothing needs this yet
}
// Get CPU speed for progId.
uint8_t
-get_cpumode(_UNUSED uint64_t progId)
+get_cpumode(__attribute__((unused)) uint64_t progId)
{
return 0xff; // Skip.
}