X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Futils%2Fsrc%2Ftrx.c;h=abc9bc93c4111fe06d9edcd8a82d5d6705851c7e;hb=0531c4961b7217ff236c22d29744112d133327f0;hp=a7a2a54540328d2efa64a5ef0ef83fa64c645657;hpb=7515da25de01efebda0b3d3959a90a635559c3ca;p=openwrt-10.03%2F.git diff --git a/target/utils/src/trx.c b/target/utils/src/trx.c index a7a2a5454..abc9bc93c 100644 --- a/target/utils/src/trx.c +++ b/target/utils/src/trx.c @@ -45,8 +45,8 @@ #include #include #if defined(__APPLE__) -#include -#include +#include +#include #define __BYTE_ORDER BYTE_ORDER #define __BIG_ENDIAN BIG_ENDIAN #define bswap_16(x) NXSwapShort(x) @@ -89,7 +89,7 @@ void usage(void) __attribute__ (( __noreturn__ )); void usage(void) { - fprintf(stderr, "Usage: trx [-o outfile] [-m maxlen] [-a align] [-b offset] file [file [file]]\n"); + fprintf(stderr, "Usage: trx [-o outfile] [-m maxlen] [-a align] [-b offset] [-f file] [-f file [-f file]]\n"); exit(EXIT_FAILURE); } @@ -122,8 +122,9 @@ int main(int argc, char **argv) in = NULL; i = 0; - while ((c = getopt(argc, argv, "-:o:m:a:b:")) != -1) { + while ((c = getopt(argc, argv, "-:o:m:a:b:f:")) != -1) { switch (c) { + case 'f': case 1: p->offsets[i++] = STORE32_LE(cur_len);