1 Aug 2010 21:44
[PATCH][QEMU] Load "bootsplash.jpg" if present
Kevin O'Connor <kevin <at> koconnor.net>
2010-08-01 19:44:07 GMT
2010-08-01 19:44:07 GMT
Load the "bootsplash.jpg" file into fw_cfg if it is found in the roms
directory.
--- a/hw/fw_cfg.c
+++ b/hw/fw_cfg.c
<at> <at> -304,8 +304,12 <at> <at> int fw_cfg_add_file(FWCfgState *s, const char *dir, const char
*filename,
basename = filename;
}
- snprintf(s->files->f[index].name, sizeof(s->files->f[index].name),
- "%s/%s", dir, basename);
+ if (dir && dir[0])
+ snprintf(s->files->f[index].name, sizeof(s->files->f[index].name),
+ "%s/%s", dir, basename);
+ else
+ strncpy(s->files->f[index].name, basename,
+ sizeof(s->files->f[index].name));
for (i = 0; i < index; i++) {
if (strcmp(s->files->f[index].name, s->files->f[i].name) == 0) {
FW_CFG_DPRINTF("%s: skip duplicate: %s\n", __FUNCTION__,
diff --git a/hw/pc.c b/hw/pc.c
index 58dea57..6893799 100644
--- a/hw/pc.c
+++ b/hw/pc.c
<at> <at> -54,6 +54,7 <at> <at>
#endif
#define BIOS_FILENAME "bios.bin"
+#define BOOTSPLASH_FILENAME "bootsplash.jpg"
(Continue reading)
RSS Feed