Browse Source

some cleanups

master
Olaf Rempel 12 years ago
parent
commit
d1b125cc2c
3 changed files with 8 additions and 5 deletions
  1. +1
    -1
      cfgpatch.c
  2. +5
    -2
      compress.c
  3. +2
    -2
      configdata.c

+ 1
- 1
cfgpatch.c View File

@@ -7,7 +7,7 @@
#include "filedata.h"

/*
* $ cfgpatch <config-in> <config-out>
* $ cfgpatch <config-in>
*/
int main(int argc, char *argv[])
{

+ 5
- 2
compress.c View File

@@ -8,7 +8,7 @@
#include "romfile.h"

/*
* $ compress <rom-0-base> <plain-config> <rom-0-outfile>
* $ compress <rom-0-base> <plain-config>
*/
int main(int argc, char *argv[])
{
@@ -17,7 +17,10 @@ int main(int argc, char *argv[])
struct filedata *config = get_filedata(argv[2]);
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(rom);

+ 2
- 2
configdata.c View File

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

Loading…
Cancel
Save