diff options
-rw-r--r-- | src/satmkboot.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/satmkboot.c b/src/satmkboot.c index 6abae51..a3e4d7e 100644 --- a/src/satmkboot.c +++ b/src/satmkboot.c @@ -26,17 +26,16 @@ static struct systemid sysid = { static char ipbuf[0x7200]; static char *ipfile, *outfile; -static char *serialize_region_code(char *out, const struct symbolname *region) +static void serialize_region_code(char *out, const struct symbolname *region) { size_t namelen = strlen(region->name); char *tmp = out; char *end = out+32; - memcpy(tmp, "\xa0\x0e\x00\x09For ", 8); tmp += 8; - memcpy(tmp, region->name, namelen); tmp += namelen; + memcpy(tmp, "\xa0\x0e\x00\x09" "For ", 8); tmp += 8; + memcpy(tmp, region->name, namelen); tmp += namelen; *tmp++ = '.'; memset(tmp, ' ', end - tmp); - return end; } #define WRITE(f,p,s) fwrite(p,s,1,f) @@ -307,7 +306,11 @@ int main(int argc, char **argv) for (int i = 0; i < 10 && sysid.regions[i] != ' '; i++) { const struct symbolname *region = find_symbol(regiondefs, sysid.regions[i]); - if (region) ipout = serialize_region_code(ipout, region); + if (region) { + serialize_region_code(ipout, region); + ipout += 32; + sysid.bootsize += 32; + } } ipsize = ipfile |