summaryrefslogtreecommitdiffstats
path: root/lib/logo/logo.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/logo/logo.c')
-rw-r--r--lib/logo/logo.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/logo/logo.c b/lib/logo/logo.c
index 8349b060ac..200eb992b3 100644
--- a/lib/logo/logo.c
+++ b/lib/logo/logo.c
@@ -32,8 +32,14 @@ static void load_logo(int width, void *start, void *end)
{
char *filename;
size_t size = end - start;
+ char *ext = "";
- filename = basprintf("/logo/barebox-logo-%d.png", width);
+ if (IS_ENABLED(CONFIG_BAREBOX_LOGO_PNG))
+ ext = "png";
+ else if (IS_ENABLED(CONFIG_BAREBOX_LOGO_BMP))
+ ext = "bmp";
+
+ filename = basprintf("/logo/barebox-logo-%d.%s", width, ext);
write_file(filename, start, size);
free(filename);
}