Changeset 13741


Ignore:
Timestamp:
01/26/10 06:35:52 (3 years ago)
Author:
BrainSlayer
Message:

i hope this was the last one

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/rc/mtd.c

    r13738 r13741  
    179179        unsigned short flags; 
    180180        unsigned char res3[10]; 
    181 } ; 
     181} __attribute__((packed)); 
    182182 
    183183struct etrx_header { 
    184184        struct code_header code; 
    185185        struct trx_header trx; 
    186 }; 
     186} __attribute__((packed)); 
    187187 
    188188#define SQUASHFS_MAGIC                  0x74717368 
     
    234234         */ 
    235235#ifdef HAVE_WRT160NL 
     236        fprintf(stderr,"size of ETRX header = %d\n",sizeof(struct etrx_header)); 
    236237        if ((fp = fopen(path, "r"))) 
    237238                count = safe_fread(&etrx, 1, sizeof(struct etrx_header), fp); 
     
    455456                 * Check CRC before writing if possible  
    456457                 */ 
    457                 if (count == trx.len) { 
     458                #ifdef HAVE_WRT160NL 
     459                if (count == trx.len + sizeof(struct code_header)) { 
     460                #else 
     461                if (count == trx.len) {          
     462                #endif 
    458463                        if (crc != trx.crc32) { 
    459464                                fprintf(stderr, "%s: Bad CRC\n", path); 
Note: See TracChangeset for help on using the changeset viewer.