[FixRed] sonybootloader has a glyphcache but no open_pathfmt
rockbox-gerrit-noreply--- via rockbox-cvs <[email protected]> Tue, 9 Jun 2026 02:02:54 -0400
| Newsgroups | gmane.comp.systems.archos.rockbox.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 513365713a01504915a6d20eec08c5039e4c7fd5 Author: William Wilgus <[email protected]> Date: Tue Jun 9 02:01:29 2026 -0400 [FixRed] sonybootloader has a glyphcache but no open_pathfmt Change-Id: Iaf8522d4a72f78da26434b60757fe3421a3622f2 diff --git a/bootloader/common.c b/bootloader/common.c index 07dd8120ed..705441357a 100644 --- a/bootloader/common.c +++ b/bootloader/common.c @@ -165,3 +165,17 @@ int load_raw_firmware(unsigned char* buf, char* firmware, int buffer_size) close(fd); 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 -- rockbox-cvs mailing list [email protected] https://lists.haxx.se/mailman/listinfo/rockbox-cvs