summaryrefslogtreecommitdiff
path: root/rbutil/mkamsboot/dualboot/bin2c.c
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-02-17 14:37:06 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-02-17 14:37:06 +0000
commit7c8dbf46a81f9cafdbc616389d46b81b4bc3bc1e (patch)
treef41c224f0ba3272af92642a8185232a6bb0b3663 /rbutil/mkamsboot/dualboot/bin2c.c
parent35fa12d85f8552336c76c9ce39afa22b057c4ca5 (diff)
downloadrockbox-7c8dbf46a81f9cafdbc616389d46b81b4bc3bc1e.tar.gz
rockbox-7c8dbf46a81f9cafdbc616389d46b81b4bc3bc1e.zip
mkamsboot: update dualboot.c / dualboot.h in place
This removes the need for copying these files to ../ and removes the risk of only copying one of the files (which led to bricking 2 c200v2 already) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24719 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/mkamsboot/dualboot/bin2c.c')
-rw-r--r--rbutil/mkamsboot/dualboot/bin2c.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/rbutil/mkamsboot/dualboot/bin2c.c b/rbutil/mkamsboot/dualboot/bin2c.c
index 9a8c9c7dfe..830224c35a 100644
--- a/rbutil/mkamsboot/dualboot/bin2c.c
+++ b/rbutil/mkamsboot/dualboot/bin2c.c
@@ -26,6 +26,7 @@
26#include <unistd.h> 26#include <unistd.h>
27#include <fcntl.h> 27#include <fcntl.h>
28#include <stdlib.h> 28#include <stdlib.h>
29#include <libgen.h>
29 30
30#ifndef O_BINARY 31#ifndef O_BINARY
31#define O_BINARY 0 32#define O_BINARY 0
@@ -90,7 +91,7 @@ int main (int argc, char* argv[])
90 } 91 }
91 92
92 fprintf(cfile,"/* Generated by bin2c */\n\n"); 93 fprintf(cfile,"/* Generated by bin2c */\n\n");
93 fprintf(cfile,"#include \"%s\"\n\n", hfilename); 94 fprintf(cfile,"#include \"%s\"\n\n", basename(hfilename));
94 fprintf(hfile,"/* Generated by bin2c */\n\n"); 95 fprintf(hfile,"/* Generated by bin2c */\n\n");
95 96
96 for(i=0; i < argc - 2; i++) { 97 for(i=0; i < argc - 2; i++) {