From b69be10d9825a49c86b411e0baefa0061bf118ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Stenberg?= Date: Sun, 23 Nov 2008 22:07:48 +0000 Subject: Use BOOTDIR and BOOTFILE defines instead of hardcoded path and file. FS#9559 git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19190 a1c6a512-1295-4272-9138-f99709370657 --- bootloader/main-pp.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'bootloader/main-pp.c') diff --git a/bootloader/main-pp.c b/bootloader/main-pp.c index 692a7bdfb4..f227e0f4f3 100644 --- a/bootloader/main-pp.c +++ b/bootloader/main-pp.c @@ -23,6 +23,8 @@ ****************************************************************************/ #include #include + +#include "config.h" #include "common.h" #include "cpu.h" #include "file.h" @@ -292,7 +294,7 @@ int load_mi4(unsigned char* buf, char* firmware, unsigned int buffer_size) unsigned long sum; char filename[MAX_PATH]; - snprintf(filename,sizeof(filename),"/.rockbox/%s",firmware); + snprintf(filename,sizeof(filename), BOOTDIR "/%s",firmware); fd = open(filename, O_RDONLY); if(fd < 0) { @@ -610,14 +612,14 @@ void* main(void) printf("Loading Rockbox..."); rc=load_mi4(loadbuffer, BOOTFILE, MAX_LOADSIZE); if (rc < EOK) { - printf("Can't load %s:", BOOTFILE); + printf("Can't load " BOOTFILE ": "); printf(strerror(rc)); #ifdef OLD_BOOTFILE /* Try loading rockbox from old rockbox.e200/rockbox.h10 format */ rc=load_firmware(loadbuffer, OLD_BOOTFILE, MAX_LOADSIZE); if (rc < EOK) { - printf("Can't load %s:", OLD_BOOTFILE); + printf("Can't load " OLD_BOOTFILE" : "); error(EBOOTFILE, rc); } #endif -- cgit v1.2.3