3 # Patch managed by http://www.holgerschurig.de/patcher.html
6 --- slugtool-1.0-r0/slugtool.c~redboot_typo.patch
7 +++ slugtool-1.0-r0/slugtool.c
10 #define NULLFILE ((FILE *)NULL)
12 -#define REDBOOK_START 0
13 -#define REDBOOK_LENGTH 0x40000
14 +#define REDBOOT_START 0
15 +#define REDBOOT_LENGTH 0x40000
17 #define CONF_SECTION_LENGTH 0x20000
18 -#define CONF_HEADER (REDBOOK_START + REDBOOK_LENGTH)
19 +#define CONF_HEADER (REDBOOT_START + REDBOOT_LENGTH)
20 #define CONF_HEADER_LENGTH 0x10
21 #define CONF_START (CONF_HEADER + CONF_HEADER_LENGTH)
22 #define CONF_LENGTH (CONF_SECTION_LENGTH - CONF_HEADER_LENGTH)
24 printf ("Unpacking '%s'....\n", filename);
25 fpin = fopen (filename, "r");
27 - fseek (fpin, REDBOOK_START, SEEK_SET);
28 - printf ("\tRedbook....\n");
29 - fpout = fopen ("Redbook", "w");
30 - writefile (REDBOOK_LENGTH, fpin, fpout);
31 + fseek (fpin, REDBOOT_START, SEEK_SET);
32 + printf ("\tRedboot....\n");
33 + fpout = fopen ("Redboot", "w");
34 + writefile (REDBOOT_LENGTH, fpin, fpout);
37 printf ("\tReading SysConf Header....\n");
40 fpout = fopen (filename, "r+");
42 - printf ("\tRedbook....\n");
43 - fpin = fopen ("Redbook", "r");
44 + printf ("\tRedboot....\n");
45 + fpin = fopen ("Redboot", "r");
46 if (fpin == NULLFILE) {
47 - printf ("File 'Redbook' not found!\n");
48 + printf ("File 'Redboot' not found!\n");
51 - fseek (fpout, REDBOOK_START, SEEK_SET);
52 - writefile (REDBOOK_LENGTH, fpin, fpout);
53 + fseek (fpout, REDBOOT_START, SEEK_SET);
54 + writefile (REDBOOT_LENGTH, fpin, fpout);
57 printf ("\tSysConf....\n");