mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
[FixRed] sonybootloader has a glyphcache but no open_pathfmt
Change-Id: Iaf8522d4a72f78da26434b60757fe3421a3622f2
This commit is contained in:
parent
a81d3fa10e
commit
513365713a
1 changed files with 14 additions and 0 deletions
|
|
@ -165,3 +165,17 @@ int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size)
|
||||||
close(fd);
|
close(fd);
|
||||||
return len;
|
return len;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if (!defined(MISC_H) && CONFIG_PLATFORM & PLATFORM_HOSTED)
|
||||||
|
/* open but with a builtin printf for assembling the path */
|
||||||
|
int open_pathfmt(char *buf, size_t size, int oflag, const char *pathfmt, ...)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
va_start(ap, pathfmt);
|
||||||
|
vsnprintf(buf, size, pathfmt, ap);
|
||||||
|
va_end(ap);
|
||||||
|
if ((oflag & O_PATH) == O_PATH)
|
||||||
|
return -1;
|
||||||
|
return open(buf, oflag, 0666);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue