[FixRed] sonybootloader has a glyphcache but no open_pathfmt

Change-Id: Iaf8522d4a72f78da26434b60757fe3421a3622f2
This commit is contained in:
William Wilgus 2026-06-09 02:01:29 -04:00
parent a81d3fa10e
commit 513365713a

View file

@ -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