mirror of
https://github.com/fail0verflow/hbc.git
synced 2024-11-25 11:06:56 +01:00
fix format sizes again, sorry
This commit is contained in:
parent
705d3251f4
commit
c76dae814b
@ -530,14 +530,14 @@ void app_entry_init(void) {
|
|||||||
res = LWP_MutexInit (&ta_ae.cmutex, false);
|
res = LWP_MutexInit (&ta_ae.cmutex, false);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating cmutex: %ld\n", res);
|
gprintf ("error creating cmutex: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = LWP_CondInit (&ta_ae.cond);
|
res = LWP_CondInit (&ta_ae.cond);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating cond: %ld\n", res);
|
gprintf ("error creating cond: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -546,7 +546,7 @@ void app_entry_init(void) {
|
|||||||
APPENTRY_THREAD_STACKSIZE, APPENTRY_THREAD_PRIO);
|
APPENTRY_THREAD_STACKSIZE, APPENTRY_THREAD_PRIO);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf("error creating thread: %ld\n", res);
|
gprintf("error creating thread: %d\n", res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ void *blob_alloc(size_t size)
|
|||||||
|
|
||||||
SYS_SetArena2Hi((void*)addr);
|
SYS_SetArena2Hi((void*)addr);
|
||||||
_CPU_ISR_Restore(level);
|
_CPU_ISR_Restore(level);
|
||||||
gprintf("allocated blob size %d at 0x%08lx\n", size, addr);
|
gprintf("allocated blob size %d at 0x%08x\n", size, addr);
|
||||||
return (void*)addr;
|
return (void*)addr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,7 +320,7 @@ font_glyph *font_get_char(font_id id, int codepoint)
|
|||||||
glyph->valid = 1;
|
glyph->valid = 1;
|
||||||
|
|
||||||
//gprintf("FONT: Rendered and cached glyph %d (%s) at pos %d size %dx%d\n", codepoint, utf8(codepoint), glyph-font->glyphs, cw, ch);
|
//gprintf("FONT: Rendered and cached glyph %d (%s) at pos %d size %dx%d\n", codepoint, utf8(codepoint), glyph-font->glyphs, cw, ch);
|
||||||
//gprintf("Free MEM1: %ld MEM2: %ld\n", SYS_GetArena1Size(), SYS_GetArena2Size());
|
//gprintf("Free MEM1: %d MEM2: %d\n", SYS_GetArena1Size(), SYS_GetArena2Size());
|
||||||
return glyph;
|
return glyph;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,7 +332,7 @@ void font_kern(font_id id, int left, int right, FT_Pos *dx, FT_Pos *dy)
|
|||||||
}
|
}
|
||||||
if (FT_Get_Kerning(fonts[id]->face, left, right, FT_KERNING_UNFITTED, &delta))
|
if (FT_Get_Kerning(fonts[id]->face, left, right, FT_KERNING_UNFITTED, &delta))
|
||||||
return;
|
return;
|
||||||
//gprintf("Kern font %d for glyphs %d,%d is %ld,%ld\n", id, left, right, delta.x, delta.y);
|
//gprintf("Kern font %d for glyphs %d,%d is %d,%d\n", id, left, right, delta.x, delta.y);
|
||||||
*dx += delta.x;
|
*dx += delta.x;
|
||||||
*dy += delta.y;
|
*dy += delta.y;
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ static void * http_func (void *arg) {
|
|||||||
r += sprintf (r, "Host: %s\r\n", ta->host);
|
r += sprintf (r, "Host: %s\r\n", ta->host);
|
||||||
r += sprintf (r, "Cache-Control: no-cache\r\n");
|
r += sprintf (r, "Cache-Control: no-cache\r\n");
|
||||||
r += sprintf (r, "User-Agent: TheHomebrewChannel/%s Wii/%08lx"
|
r += sprintf (r, "User-Agent: TheHomebrewChannel/%s Wii/%08lx"
|
||||||
" (%lu; %u; %s-%s)\r\n", CHANNEL_VERSION_STR,
|
" (%u; %u; %s-%s)\r\n", CHANNEL_VERSION_STR,
|
||||||
ng_id, ms_id, ta->sysmenu_version, ta->region,
|
ng_id, ms_id, ta->sysmenu_version, ta->region,
|
||||||
ta->area);
|
ta->area);
|
||||||
|
|
||||||
@ -177,8 +177,8 @@ static void * http_func (void *arg) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
sscanf (line, "HTTP/1.%*u %lu", &ta->http_status);
|
sscanf (line, "HTTP/1.%*u %u", &ta->http_status);
|
||||||
sscanf (line, "Content-Length: %lu", &ta->content_length);
|
sscanf (line, "Content-Length: %u", &ta->content_length);
|
||||||
|
|
||||||
free (line);
|
free (line);
|
||||||
|
|
||||||
@ -335,21 +335,21 @@ void http_init (void) {
|
|||||||
res = LWP_MutexInit (&ta_http.mutex, false);
|
res = LWP_MutexInit (&ta_http.mutex, false);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating mutex: %ld\n", res);
|
gprintf ("error creating mutex: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = LWP_MutexInit (&ta_http.cmutex, false);
|
res = LWP_MutexInit (&ta_http.cmutex, false);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating cmutex: %ld\n", res);
|
gprintf ("error creating cmutex: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = LWP_CondInit (&ta_http.cond);
|
res = LWP_CondInit (&ta_http.cond);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating cond: %ld\n", res);
|
gprintf ("error creating cond: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -360,7 +360,7 @@ void http_init (void) {
|
|||||||
gprintf("created http thread\n");
|
gprintf("created http thread\n");
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating thread: %ld\n", res);
|
gprintf ("error creating thread: %d\n", res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,12 +49,12 @@ void i18n_set_mo(const void *mo_file) {
|
|||||||
mo.hash_size = SWAB32(mo.hash_size);
|
mo.hash_size = SWAB32(mo.hash_size);
|
||||||
mo.hashes = (void*)SWAB32((u32)mo.magic);
|
mo.hashes = (void*)SWAB32((u32)mo.magic);
|
||||||
} else if(mo.magic != MAGIC) {
|
} else if(mo.magic != MAGIC) {
|
||||||
gprintf("i18n: bad mo file magic 0x%08lx\n",mo.magic);
|
gprintf("i18n: bad mo file magic 0x%08x\n",mo.magic);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(mo.revision != 0)
|
if(mo.revision != 0)
|
||||||
gprintf("i18n: bad mo file revision 0x%08lx\n",mo.revision);
|
gprintf("i18n: bad mo file revision 0x%08x\n",mo.revision);
|
||||||
|
|
||||||
mo_data = (char*)mo_file;
|
mo_data = (char*)mo_file;
|
||||||
mo.source = (struct mo_entry*)(mo_data + (u32)mo.source);
|
mo.source = (struct mo_entry*)(mo_data + (u32)mo.source);
|
||||||
|
@ -18,10 +18,10 @@ s32 isfs_get(const char *path, u8 **buf, u32 expected, u32 maxsize, bool use_blo
|
|||||||
s32 fd;
|
s32 fd;
|
||||||
u8 *__buf;
|
u8 *__buf;
|
||||||
|
|
||||||
gprintf("reading %s (expecting %lu bytes)\n", path, expected);
|
gprintf("reading %s (expecting %u bytes)\n", path, expected);
|
||||||
ret = ISFS_Open(path, ISFS_OPEN_READ);
|
ret = ISFS_Open(path, ISFS_OPEN_READ);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_Open failed (%ld)\n", ret);
|
gprintf("ISFS_Open failed (%d)\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ s32 isfs_get(const char *path, u8 **buf, u32 expected, u32 maxsize, bool use_blo
|
|||||||
|
|
||||||
ret = ISFS_GetFileStats(fd, &__st);
|
ret = ISFS_GetFileStats(fd, &__st);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_GetFileStats failed (%ld)\n", ret);
|
gprintf("ISFS_GetFileStats failed (%d)\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
DCInvalidateRange(&__st, sizeof(__st));
|
DCInvalidateRange(&__st, sizeof(__st));
|
||||||
@ -37,7 +37,7 @@ s32 isfs_get(const char *path, u8 **buf, u32 expected, u32 maxsize, bool use_blo
|
|||||||
if ((__st.file_length == 0) ||
|
if ((__st.file_length == 0) ||
|
||||||
(maxsize && (__st.file_length > maxsize)) ||
|
(maxsize && (__st.file_length > maxsize)) ||
|
||||||
(expected && (__st.file_length != expected))) {
|
(expected && (__st.file_length != expected))) {
|
||||||
gprintf("invalid size: %lu\n", __st.file_length);
|
gprintf("invalid size: %u\n", __st.file_length);
|
||||||
ISFS_Close(fd);
|
ISFS_Close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@ -50,10 +50,10 @@ s32 isfs_get(const char *path, u8 **buf, u32 expected, u32 maxsize, bool use_blo
|
|||||||
__buf = pmemalign(32, ROUNDUP32B(__st.file_length + 1));
|
__buf = pmemalign(32, ROUNDUP32B(__st.file_length + 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf("reading %lu bytes\n", __st.file_length);
|
gprintf("reading %u bytes\n", __st.file_length);
|
||||||
ret = ISFS_Read(fd, __buf, __st.file_length);
|
ret = ISFS_Read(fd, __buf, __st.file_length);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_Read failed (%ld)\n", ret);
|
gprintf("ISFS_Read failed (%d)\n", ret);
|
||||||
free(__buf);
|
free(__buf);
|
||||||
ISFS_Close(fd);
|
ISFS_Close(fd);
|
||||||
return ret;
|
return ret;
|
||||||
@ -62,7 +62,7 @@ s32 isfs_get(const char *path, u8 **buf, u32 expected, u32 maxsize, bool use_blo
|
|||||||
__buf[__st.file_length] = 0;
|
__buf[__st.file_length] = 0;
|
||||||
|
|
||||||
if (ret != __st.file_length) {
|
if (ret != __st.file_length) {
|
||||||
gprintf("ISFS_Read short read (%ld)\n", ret);
|
gprintf("ISFS_Read short read (%d)\n", ret);
|
||||||
free(__buf);
|
free(__buf);
|
||||||
ISFS_Close(fd);
|
ISFS_Close(fd);
|
||||||
return -1;
|
return -1;
|
||||||
@ -70,7 +70,7 @@ s32 isfs_get(const char *path, u8 **buf, u32 expected, u32 maxsize, bool use_blo
|
|||||||
|
|
||||||
ret = ISFS_Close(fd);
|
ret = ISFS_Close(fd);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_Close failed (%ld)\n", ret);
|
gprintf("ISFS_Close failed (%d)\n", ret);
|
||||||
free(__buf);
|
free(__buf);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -84,16 +84,16 @@ s32 isfs_put(const char *path, const void *buf, u32 len) {
|
|||||||
|
|
||||||
ISFS_Delete(path);
|
ISFS_Delete(path);
|
||||||
|
|
||||||
gprintf("writing %s (%lu bytes)\n", path, len);
|
gprintf("writing %s (%u bytes)\n", path, len);
|
||||||
ret = ISFS_CreateFile(path, 0, 3, 3, 0);
|
ret = ISFS_CreateFile(path, 0, 3, 3, 0);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_CreateFile failed (%ld)\n", ret);
|
gprintf("ISFS_CreateFile failed (%d)\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = ISFS_Open(path, 3);
|
ret = ISFS_Open(path, 3);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_Open failed (%ld)\n", ret);
|
gprintf("ISFS_Open failed (%d)\n", ret);
|
||||||
ISFS_Delete(path);
|
ISFS_Delete(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
@ -104,14 +104,14 @@ s32 isfs_put(const char *path, const void *buf, u32 len) {
|
|||||||
|
|
||||||
ret = ISFS_Write(fd, buf, len);
|
ret = ISFS_Write(fd, buf, len);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_Write failed (%ld)\n", ret);
|
gprintf("ISFS_Write failed (%d)\n", ret);
|
||||||
ISFS_Close(fd);
|
ISFS_Close(fd);
|
||||||
ISFS_Delete(path);
|
ISFS_Delete(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ret != len) {
|
if (ret != len) {
|
||||||
gprintf("ISFS_Write short write (%ld)\n", ret);
|
gprintf("ISFS_Write short write (%d)\n", ret);
|
||||||
ISFS_Close(fd);
|
ISFS_Close(fd);
|
||||||
ISFS_Delete(path);
|
ISFS_Delete(path);
|
||||||
return -1;
|
return -1;
|
||||||
@ -119,7 +119,7 @@ s32 isfs_put(const char *path, const void *buf, u32 len) {
|
|||||||
|
|
||||||
ret = ISFS_Close(fd);
|
ret = ISFS_Close(fd);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ISFS_Close failed (%ld)\n", ret);
|
gprintf("ISFS_Close failed (%d)\n", ret);
|
||||||
ISFS_Delete(path);
|
ISFS_Delete(path);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -211,7 +211,7 @@ static void * ld_tcp_func (void *arg) {
|
|||||||
res = net_init_async(NULL, NULL);
|
res = net_init_async(NULL, NULL);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf("net_init_async failed: %ld\n", res);
|
gprintf("net_init_async failed: %d\n", res);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ static void * ld_tcp_func (void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((res == -EAGAIN) || (res == -ETIMEDOUT)) {
|
if ((res == -EAGAIN) || (res == -ETIMEDOUT)) {
|
||||||
gprintf ("net_init failed: %ld, trying again...\n", res);
|
gprintf ("net_init failed: %d, trying again...\n", res);
|
||||||
retries--;
|
retries--;
|
||||||
usleep(50 * 1000);
|
usleep(50 * 1000);
|
||||||
continue;
|
continue;
|
||||||
@ -238,12 +238,12 @@ static void * ld_tcp_func (void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("net_init failed: %ld\n", res);
|
gprintf ("net_init failed: %d\n", res);
|
||||||
ta->state = LDTCPS_UNINITIALIZED;
|
ta->state = LDTCPS_UNINITIALIZED;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf ("net_init success: %ld\n", res);
|
gprintf ("net_init success: %d\n", res);
|
||||||
|
|
||||||
mask = net_gethostip () & 0xffff0000;
|
mask = net_gethostip () & 0xffff0000;
|
||||||
|
|
||||||
@ -296,7 +296,7 @@ static void * ld_tcp_func (void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ((sa.sin_addr.s_addr & 0xffff0000) != mask) {
|
if ((sa.sin_addr.s_addr & 0xffff0000) != mask) {
|
||||||
gprintf ("non local ip (%lx)\n", sa.sin_addr.s_addr);
|
gprintf ("non local ip (%x)\n", sa.sin_addr.s_addr);
|
||||||
net_close (sn);
|
net_close (sn);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -333,12 +333,12 @@ static void * ld_tcp_func (void *arg) {
|
|||||||
gprintf ("net_shutdown\n");
|
gprintf ("net_shutdown\n");
|
||||||
res = net_shutdown (s, 2);
|
res = net_shutdown (s, 2);
|
||||||
if (res)
|
if (res)
|
||||||
gprintf ("net_shutdown failed: %ld\n", res);
|
gprintf ("net_shutdown failed: %d\n", res);
|
||||||
|
|
||||||
gprintf ("net_close\n");
|
gprintf ("net_close\n");
|
||||||
res = net_close (s);
|
res = net_close (s);
|
||||||
if (res)
|
if (res)
|
||||||
gprintf ("net_close failed: %ld\n", res);
|
gprintf ("net_close failed: %d\n", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf ("tcp thread deiniting\n");
|
gprintf ("tcp thread deiniting\n");
|
||||||
@ -588,7 +588,7 @@ static void * ld_load_func (void *arg) {
|
|||||||
block = read (ta->fd, d, block);
|
block = read (ta->fd, d, block);
|
||||||
|
|
||||||
if (block < 0) {
|
if (block < 0) {
|
||||||
gprintf ("read failed: %ld\n", block);
|
gprintf ("read failed: %d\n", block);
|
||||||
close (ta->fd);
|
close (ta->fd);
|
||||||
|
|
||||||
LWP_MutexLock (ta->mutex);
|
LWP_MutexLock (ta->mutex);
|
||||||
@ -683,7 +683,7 @@ static void * ld_load_func (void *arg) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (len != ta->data_len_un) {
|
if (len != ta->data_len_un) {
|
||||||
gprintf("short uncompress: %lu\n", (u32) len);
|
gprintf("short uncompress: %u\n", (u32) len);
|
||||||
|
|
||||||
LWP_MutexLock (ta->mutex);
|
LWP_MutexLock (ta->mutex);
|
||||||
ta->state = LDS_ERR_UNCOMPRESS;
|
ta->state = LDS_ERR_UNCOMPRESS;
|
||||||
@ -812,7 +812,7 @@ void loader_load(loader_result *result, view *sub_view, app_entry *entry) {
|
|||||||
res = LWP_MutexInit (&ta.mutex, false);
|
res = LWP_MutexInit (&ta.mutex, false);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating mutex: %ld\n", res);
|
gprintf ("error creating mutex: %d\n", res);
|
||||||
blob_free (ta.data);
|
blob_free (ta.data);
|
||||||
blob_free (ta.data_un);
|
blob_free (ta.data_un);
|
||||||
if (ta.cmd == LDC_TCP)
|
if (ta.cmd == LDC_TCP)
|
||||||
@ -826,7 +826,7 @@ void loader_load(loader_result *result, view *sub_view, app_entry *entry) {
|
|||||||
LD_THREAD_STACKSIZE, LD_THREAD_PRIO);
|
LD_THREAD_STACKSIZE, LD_THREAD_PRIO);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating thread: %ld\n", res);
|
gprintf ("error creating thread: %d\n", res);
|
||||||
blob_free (ta.data);
|
blob_free (ta.data);
|
||||||
blob_free (ta.data_un);
|
blob_free (ta.data_un);
|
||||||
if (ta.cmd == LDC_TCP)
|
if (ta.cmd == LDC_TCP)
|
||||||
@ -973,7 +973,7 @@ bool loader_handle_zip_app(loader_result *result, view *sub_view) {
|
|||||||
sprintf(buf2, "%.02f MB",
|
sprintf(buf2, "%.02f MB",
|
||||||
(float)(result->bytes) / (float)(1024 * 1024));
|
(float)(result->bytes) / (float)(1024 * 1024));
|
||||||
else
|
else
|
||||||
sprintf(buf2, "%lu KB", result->bytes / 1024u);
|
sprintf(buf2, "%u KB", result->bytes / 1024u);
|
||||||
sprintf(buf, text_extract_zip, buf2);
|
sprintf(buf, text_extract_zip, buf2);
|
||||||
|
|
||||||
if (!app_entry_get_path(buf2)) {
|
if (!app_entry_get_path(buf2)) {
|
||||||
|
@ -82,7 +82,7 @@ static bool reloc_dol (entry_point *ep, const u8 *addr, u32 size,
|
|||||||
if (!dolfile->text_size[i])
|
if (!dolfile->text_size[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
gprintf ("loading text section %lu @ 0x%08lx (0x%08lx bytes)\n", i,
|
gprintf ("loading text section %u @ 0x%08x (0x%08x bytes)\n", i,
|
||||||
dolfile->text_start[i], dolfile->text_size[i]);
|
dolfile->text_start[i], dolfile->text_size[i]);
|
||||||
|
|
||||||
if (dolfile->text_pos[i] + dolfile->text_size[i] > size)
|
if (dolfile->text_pos[i] + dolfile->text_size[i] > size)
|
||||||
@ -106,7 +106,7 @@ static bool reloc_dol (entry_point *ep, const u8 *addr, u32 size,
|
|||||||
if (!dolfile->data_size[i])
|
if (!dolfile->data_size[i])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
gprintf ("loading data section %lu @ 0x%08lx (0x%08lx bytes)\n", i,
|
gprintf ("loading data section %u @ 0x%08x (0x%08x bytes)\n", i,
|
||||||
dolfile->data_start[i], dolfile->data_size[i]);
|
dolfile->data_start[i], dolfile->data_size[i]);
|
||||||
|
|
||||||
if (dolfile->data_pos[i] + dolfile->data_size[i] > size)
|
if (dolfile->data_pos[i] + dolfile->data_size[i] > size)
|
||||||
@ -176,12 +176,12 @@ static bool reloc_elf (entry_point *ep, const u8 *addr, u32 size,
|
|||||||
for(i=0;i<ehdr->e_phnum;i++) {
|
for(i=0;i<ehdr->e_phnum;i++) {
|
||||||
|
|
||||||
if(phdrs[i].p_type != PT_LOAD) {
|
if(phdrs[i].p_type != PT_LOAD) {
|
||||||
gprintf("skip PHDR %d of type %ld\n", i, phdrs[i].p_type);
|
gprintf("skip PHDR %d of type %d\n", i, phdrs[i].p_type);
|
||||||
} else {
|
} else {
|
||||||
phdrs[i].p_paddr &= 0x3FFFFFFF;
|
phdrs[i].p_paddr &= 0x3FFFFFFF;
|
||||||
phdrs[i].p_paddr |= 0x80000000;
|
phdrs[i].p_paddr |= 0x80000000;
|
||||||
|
|
||||||
gprintf ("PHDR %d 0x%08lx [0x%lx] -> 0x%08lx [0x%lx] <", i,
|
gprintf ("PHDR %d 0x%08x [0x%x] -> 0x%08x [0x%x] <", i,
|
||||||
phdrs[i].p_offset, phdrs[i].p_filesz,
|
phdrs[i].p_offset, phdrs[i].p_filesz,
|
||||||
phdrs[i].p_paddr, phdrs[i].p_memsz);
|
phdrs[i].p_paddr, phdrs[i].p_memsz);
|
||||||
|
|
||||||
@ -204,7 +204,7 @@ static bool reloc_elf (entry_point *ep, const u8 *addr, u32 size,
|
|||||||
gprintf ("-> failed overlap check\n");
|
gprintf ("-> failed overlap check\n");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
gprintf ("-> load 0x%lx\n", phdrs[i].p_filesz);
|
gprintf ("-> load 0x%x\n", phdrs[i].p_filesz);
|
||||||
image = (u8 *) (addr + phdrs[i].p_offset);
|
image = (u8 *) (addr + phdrs[i].p_offset);
|
||||||
memmove ((void *) phdrs[i].p_paddr, (const void *) image,
|
memmove ((void *) phdrs[i].p_paddr, (const void *) image,
|
||||||
phdrs[i].p_filesz);
|
phdrs[i].p_filesz);
|
||||||
|
@ -112,7 +112,7 @@ void m_main_theme_reinit(void) {
|
|||||||
CHANNEL_VERSION_STR, view_width / 3 - 32, FA_RIGHT,
|
CHANNEL_VERSION_STR, view_width / 3 - 32, FA_RIGHT,
|
||||||
FA_ASCENDER, FONT_LABEL);
|
FA_ASCENDER, FONT_LABEL);
|
||||||
|
|
||||||
sprintf(buffer, "IOS%ld v%ld.%ld", IOS_GetVersion(), IOS_GetRevisionMajor(),
|
sprintf(buffer, "IOS%d v%d.%d", IOS_GetVersion(), IOS_GetRevisionMajor(),
|
||||||
IOS_GetRevisionMinor());
|
IOS_GetRevisionMinor());
|
||||||
|
|
||||||
widget_label (&v_m_main->widgets[6], view_width / 3 * 2 - 16,
|
widget_label (&v_m_main->widgets[6], view_width / 3 * 2 - 16,
|
||||||
|
@ -178,12 +178,12 @@ void config_language(void) {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
gprintf("unsupported language %ld, defaulting to English\n",
|
gprintf("unsupported language %d, defaulting to English\n",
|
||||||
language);
|
language);
|
||||||
language = CONF_LANG_ENGLISH;
|
language = CONF_LANG_ENGLISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf("configuring language: %ld with mo file at %p\n", language, mo);
|
gprintf("configuring language: %d with mo file at %p\n", language, mo);
|
||||||
i18n_set_mo(mo);
|
i18n_set_mo(mo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -210,7 +210,7 @@ static void main_pre(void) {
|
|||||||
title_init();
|
title_init();
|
||||||
SYS_SetPowerCallback(power_cb);
|
SYS_SetPowerCallback(power_cb);
|
||||||
|
|
||||||
gprintf("installing stub (%lu)\n", stub_bin_size);
|
gprintf("installing stub (%u)\n", stub_bin_size);
|
||||||
|
|
||||||
#ifdef DEBUG_APP
|
#ifdef DEBUG_APP
|
||||||
if (stub_bin_size > 0x1800)
|
if (stub_bin_size > 0x1800)
|
||||||
@ -223,7 +223,7 @@ static void main_pre(void) {
|
|||||||
*conf_magic = 0;
|
*conf_magic = 0;
|
||||||
|
|
||||||
gprintf ("startup\n");
|
gprintf ("startup\n");
|
||||||
gprintf("IOS Version: IOS%ld %ld.%ld\n",
|
gprintf("IOS Version: IOS%d %d.%d\n",
|
||||||
IOS_GetVersion(), IOS_GetRevisionMajor(), IOS_GetRevisionMinor());
|
IOS_GetVersion(), IOS_GetRevisionMajor(), IOS_GetRevisionMinor());
|
||||||
|
|
||||||
ISFS_Initialize();
|
ISFS_Initialize();
|
||||||
@ -795,7 +795,7 @@ void main_real(void) {
|
|||||||
gprintf ("patch failed (%d)\n", res);
|
gprintf ("patch failed (%d)\n", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf ("reloading to IOS%ld...\n", APPS_IOS_VERSION);
|
gprintf ("reloading to IOS%d...\n", APPS_IOS_VERSION);
|
||||||
__IOS_LaunchNewIOS(APPS_IOS_VERSION);
|
__IOS_LaunchNewIOS(APPS_IOS_VERSION);
|
||||||
|
|
||||||
if (ahb_access) {
|
if (ahb_access) {
|
||||||
|
@ -247,7 +247,7 @@ bool manage_check_zip_theme(u8 *data, u32 data_len) {
|
|||||||
unz_global_info gi;
|
unz_global_info gi;
|
||||||
|
|
||||||
if (data_len > MAX_THEME_ZIP_SIZE) {
|
if (data_len > MAX_THEME_ZIP_SIZE) {
|
||||||
gprintf("theme size too big: %lu\n", data_len);
|
gprintf("theme size too big: %u\n", data_len);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -489,7 +489,7 @@ bool manage_run(view *sub_view, const char *dirname,
|
|||||||
|
|
||||||
res = LWP_MutexInit(&ta.mutex, false);
|
res = LWP_MutexInit(&ta.mutex, false);
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating mutex: %ld\n", res);
|
gprintf ("error creating mutex: %d\n", res);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,7 +507,7 @@ bool manage_run(view *sub_view, const char *dirname,
|
|||||||
MANAGE_THREAD_STACKSIZE, MANAGE_THREAD_PRIO);
|
MANAGE_THREAD_STACKSIZE, MANAGE_THREAD_PRIO);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf ("error creating thread: %ld\n", res);
|
gprintf ("error creating thread: %d\n", res);
|
||||||
LWP_CloseQueue(manage_queue);
|
LWP_CloseQueue(manage_queue);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ void playtime_destroy(void) {
|
|||||||
|
|
||||||
pt_fd = IOS_Open(_playtime_path, IPC_OPEN_RW);
|
pt_fd = IOS_Open(_playtime_path, IPC_OPEN_RW);
|
||||||
if(pt_fd < 0) {
|
if(pt_fd < 0) {
|
||||||
gprintf("playtime open failed: %ld\n", pt_fd);
|
gprintf("playtime open failed: %d\n", pt_fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -30,7 +30,7 @@ void playtime_destroy(void) {
|
|||||||
res = IOS_Write(pt_fd, &pt_buf, sizeof(pt_buf));
|
res = IOS_Write(pt_fd, &pt_buf, sizeof(pt_buf));
|
||||||
if (res != sizeof(pt_buf)) {
|
if (res != sizeof(pt_buf)) {
|
||||||
IOS_Close(pt_fd);
|
IOS_Close(pt_fd);
|
||||||
gprintf("error destroying playtime (%ld)\n", res);
|
gprintf("error destroying playtime (%d)\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ s32 tcp_socket (void) {
|
|||||||
|
|
||||||
s = net_socket (PF_INET, SOCK_STREAM, 0);
|
s = net_socket (PF_INET, SOCK_STREAM, 0);
|
||||||
if (s < 0) {
|
if (s < 0) {
|
||||||
gprintf ("net_socket failed: %ld\n", s);
|
gprintf ("net_socket failed: %d\n", s);
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,14 +31,14 @@ s32 tcp_socket (void) {
|
|||||||
|
|
||||||
res = net_fcntl (s, F_GETFL, 0);
|
res = net_fcntl (s, F_GETFL, 0);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("F_GETFL failed: %ld\n", res);
|
gprintf ("F_GETFL failed: %d\n", res);
|
||||||
net_close (s);
|
net_close (s);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = net_fcntl (s, F_SETFL, res | 4);
|
res = net_fcntl (s, F_SETFL, res | 4);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("F_SETFL failed: %ld\n", res);
|
gprintf ("F_SETFL failed: %d\n", res);
|
||||||
net_close (s);
|
net_close (s);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ s32 tcp_connect (char *host, u16 port) {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintf ("net_connect failed: %ld\n", res);
|
gprintf ("net_connect failed: %d\n", res);
|
||||||
net_close (s);
|
net_close (s);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
@ -119,14 +119,14 @@ s32 tcp_listen (u16 port, s32 backlog) {
|
|||||||
|
|
||||||
res = net_bind (s, (struct sockaddr *) &sa, sizeof (struct sockaddr_in));
|
res = net_bind (s, (struct sockaddr *) &sa, sizeof (struct sockaddr_in));
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("net_bind failed: %ld\n", res);
|
gprintf ("net_bind failed: %d\n", res);
|
||||||
net_close (s);
|
net_close (s);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = net_listen (s, backlog);
|
res = net_listen (s, backlog);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("net_listen failed: %ld\n", res);
|
gprintf ("net_listen failed: %d\n", res);
|
||||||
net_close (s);
|
net_close (s);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
@ -157,7 +157,7 @@ char * tcp_readln (s32 s, u16 max_length, s64 start_time, u16 timeout) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("tcp_readln failed: %ld\n", res);
|
gprintf ("tcp_readln failed: %d\n", res);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ bool tcp_read (s32 s, u8 *buffer, u32 length, const mutex_t *mutex, u32 *progres
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("net_read failed: %ld\n", res);
|
gprintf ("net_read failed: %d\n", res);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -272,7 +272,7 @@ bool tcp_write (s32 s, const u8 *buffer, u32 length, const mutex_t *mutex,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf ("net_write failed: %ld\n", res);
|
gprintf ("net_write failed: %d\n", res);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include "tex.h"
|
#include "tex.h"
|
||||||
#include "panic.h"
|
#include "panic.h"
|
||||||
|
|
||||||
#define SCREENSHOT_FILENAME "/hbc-%03lu.png"
|
#define SCREENSHOT_FILENAME "/hbc-%03u.png"
|
||||||
|
|
||||||
static u32 screenshot_index = 0;
|
static u32 screenshot_index = 0;
|
||||||
|
|
||||||
|
@ -299,7 +299,7 @@ static void theme_load(u8 *data, u32 data_len) {
|
|||||||
} else {
|
} else {
|
||||||
u16 w, h;
|
u16 w, h;
|
||||||
|
|
||||||
gprintf("loading from theme: %s (%lu @%lu)\n", filename,
|
gprintf("loading from theme: %s (%u @%u)\n", filename,
|
||||||
(u32) fi.uncompressed_size, index);
|
(u32) fi.uncompressed_size, index);
|
||||||
|
|
||||||
if (ws) {
|
if (ws) {
|
||||||
@ -374,7 +374,7 @@ void theme_init(u8 *data, u32 data_len) {
|
|||||||
res = isfs_get(fn, &data, 0, MAX_THEME_ZIP_SIZE, true);
|
res = isfs_get(fn, &data, 0, MAX_THEME_ZIP_SIZE, true);
|
||||||
if (res > 0) {
|
if (res > 0) {
|
||||||
data_len = res;
|
data_len = res;
|
||||||
gprintf("theme loaded from nand (%lu bytes)\n", data_len);
|
gprintf("theme loaded from nand (%u bytes)\n", data_len);
|
||||||
theme_load(data, data_len);
|
theme_load(data, data_len);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -387,10 +387,10 @@ void theme_init(u8 *data, u32 data_len) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
gprintf("theme.description=%s\n", theme.description);
|
gprintf("theme.description=%s\n", theme.description);
|
||||||
gprintf("theme.progress ul=0x%08lx\n", theme.progress.ul);
|
gprintf("theme.progress ul=0x%08x\n", theme.progress.ul);
|
||||||
gprintf("theme.progress ur=0x%08lx\n", theme.progress.ur);
|
gprintf("theme.progress ur=0x%08x\n", theme.progress.ur);
|
||||||
gprintf("theme.progress lr=0x%08lx\n", theme.progress.lr);
|
gprintf("theme.progress lr=0x%08x\n", theme.progress.lr);
|
||||||
gprintf("theme.progress ll=0x%08lx\n", theme.progress.ll);
|
gprintf("theme.progress ll=0x%08x\n", theme.progress.ll);
|
||||||
gprintf("theme.langs=0x%x\n", theme.langs);
|
gprintf("theme.langs=0x%x\n", theme.langs);
|
||||||
|
|
||||||
for (i = 0; i < THEME_LAST; ++i) {
|
for (i = 0; i < THEME_LAST; ++i) {
|
||||||
|
@ -19,7 +19,7 @@ static void title_get_ngid(void) {
|
|||||||
|
|
||||||
res = ES_GetDeviceID(&ng_id);
|
res = ES_GetDeviceID(&ng_id);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf("ES_GetDeviceID failed: %ld\n", res);
|
gprintf("ES_GetDeviceID failed: %d\n", res);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,7 +29,7 @@ static void title_get_msid(void) {
|
|||||||
// check for dpki
|
// check for dpki
|
||||||
ret = ES_GetDeviceCert(buf);
|
ret = ES_GetDeviceCert(buf);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
gprintf("ES_GetDeviceCert failed: %ld\n", ret);
|
gprintf("ES_GetDeviceCert failed: %d\n", ret);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,7 +40,7 @@ static void title_get_msid(void) {
|
|||||||
} else if (ms_id == 2) {
|
} else if (ms_id == 2) {
|
||||||
gprintf("We're on retail\n");
|
gprintf("We're on retail\n");
|
||||||
} else {
|
} else {
|
||||||
gprintf("Unknown ms-id %ld?\n", ms_id);
|
gprintf("Unknown ms-id %d?\n", ms_id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -49,13 +49,13 @@ static void title_get_title_path(void) {
|
|||||||
|
|
||||||
res = ES_GetTitleID(&title_id);
|
res = ES_GetTitleID(&title_id);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf("ES_GetTitleID failed: %ld\n", res);
|
gprintf("ES_GetTitleID failed: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
res = ES_GetDataDir(title_id, title_path);
|
res = ES_GetDataDir(title_id, title_path);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf("ES_GetDataDir failed: %ld\n", res);
|
gprintf("ES_GetDataDir failed: %d\n", res);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@ bool update_busy(bool *update_available) {
|
|||||||
UPDATE_THREAD_PRIO);
|
UPDATE_THREAD_PRIO);
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
gprintf("error creating thread: %ld\n", res);
|
gprintf("error creating thread: %d\n", res);
|
||||||
LWP_CloseQueue(update_queue);
|
LWP_CloseQueue(update_queue);
|
||||||
free(update_data);
|
free(update_data);
|
||||||
return false;
|
return false;
|
||||||
|
@ -405,7 +405,7 @@ bool settings_load(void) {
|
|||||||
buf = NULL;
|
buf = NULL;
|
||||||
res = isfs_get(fn, &buf, banner_bin_size, 0, false);
|
res = isfs_get(fn, &buf, banner_bin_size, 0, false);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf("deleting banner: %ld\n", res);
|
gprintf("deleting banner: %d\n", res);
|
||||||
ISFS_Delete(fn);
|
ISFS_Delete(fn);
|
||||||
} else if (memcmp(buf, banner_bin, banner_bin_size)) {
|
} else if (memcmp(buf, banner_bin, banner_bin_size)) {
|
||||||
gprintf("banner.bin mismatch, deleting\n");
|
gprintf("banner.bin mismatch, deleting\n");
|
||||||
@ -422,7 +422,7 @@ bool settings_load(void) {
|
|||||||
sprintf(fn, "%s/" FN_SETTINGS, titlepath);
|
sprintf(fn, "%s/" FN_SETTINGS, titlepath);
|
||||||
res = isfs_get(fn, &buf, 0, MAX_SETTINGS_XML_SIZE, false);
|
res = isfs_get(fn, &buf, 0, MAX_SETTINGS_XML_SIZE, false);
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf("isfs_get failed: %ld\n", res);
|
gprintf("isfs_get failed: %d\n", res);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -513,7 +513,7 @@ bool settings_save(void) {
|
|||||||
sprintf(fn, "%s/" FN_BANNER, titlepath);
|
sprintf(fn, "%s/" FN_BANNER, titlepath);
|
||||||
res = isfs_put(fn, banner_bin, banner_bin_size);
|
res = isfs_put(fn, banner_bin, banner_bin_size);
|
||||||
if ((res < 0) && (res != -105)) {
|
if ((res < 0) && (res != -105)) {
|
||||||
gprintf("isfs_put banner failed: %ld\n", res);
|
gprintf("isfs_put banner failed: %d\n", res);
|
||||||
free(x);
|
free(x);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -523,7 +523,7 @@ bool settings_save(void) {
|
|||||||
|
|
||||||
res = isfs_put(fn, x, strlen(x));
|
res = isfs_put(fn, x, strlen(x));
|
||||||
if (res < 0) {
|
if (res < 0) {
|
||||||
gprintf("isfs_put xml failed: %ld\n", res);
|
gprintf("isfs_put xml failed: %d\n", res);
|
||||||
free(x);
|
free(x);
|
||||||
sprintf(fn, "%s/" FN_BANNER, titlepath);
|
sprintf(fn, "%s/" FN_BANNER, titlepath);
|
||||||
ISFS_Delete(fn);
|
ISFS_Delete(fn);
|
||||||
|
Loading…
Reference in New Issue
Block a user