some cleanups

This commit is contained in:
Olaf Rempel 2007-05-01 20:43:03 +02:00
parent b8f40b506f
commit d1b125cc2c
3 changed files with 8 additions and 5 deletions

View File

@ -7,7 +7,7 @@
#include "filedata.h" #include "filedata.h"
/* /*
* $ cfgpatch <config-in> <config-out> * $ cfgpatch <config-in>
*/ */
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {

View File

@ -8,7 +8,7 @@
#include "romfile.h" #include "romfile.h"
/* /*
* $ compress <rom-0-base> <plain-config> <rom-0-outfile> * $ compress <rom-0-base> <plain-config>
*/ */
int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
@ -17,7 +17,10 @@ int main(int argc, char *argv[])
struct filedata *config = get_filedata(argv[2]); struct filedata *config = get_filedata(argv[2]);
rom->size = lzs_pack(config->data, config->size, rom->data + 0xC, 0x1000); rom->size = lzs_pack(config->data, config->size, rom->data + 0xC, 0x1000);
put_romfile(argv[3], rom); char outname[64];
strncpy(outname, argv[2], sizeof(outname));
strcat(outname, ".comp");
put_romfile(outname, rom);
free(config); free(config);
free(rom); free(rom);

View File

@ -92,7 +92,7 @@ static struct cfg_patch patcharr[] = {{
.code = CFG_NETMASK, .code = CFG_NETMASK,
.patch = patch_8bit, .patch = patch_8bit,
.offset = 0x2dfe, .offset = 0x2dfe,
.min = 0x00, .max = 0x20, .min = 0, .max = 32,
}, { }, {
.code = CFG_NAMESERVER, .code = CFG_NAMESERVER,
.patch = patch_ip, .patch = patch_ip,
@ -101,7 +101,7 @@ static struct cfg_patch patcharr[] = {{
.code = CFG_MACAGEING, .code = CFG_MACAGEING,
.patch = patch_16bit, .patch = patch_16bit,
.offset = 0x53e8, .offset = 0x53e8,
.min = 0, .max = 0xFFFF, .min = 0, .max = 65536,
}, { }, {
.code = CFG_PORTNAME_MASK, .code = CFG_PORTNAME_MASK,
.mask = 0xFFFFFFE0, .mask = 0xFFFFFFE0,