X-Git-Url: http://git.ozo.com/?a=blobdiff_plain;f=target%2Futils%2Fsrc%2Ftrx.c;h=787ffa894626ea2cac72c2261a8bda0ae9791a0e;hb=3e3c12b84be7e7a75c08c5e436f9065e71cdff16;hp=6f9fa4168752e9d60e8c730b93996b9a9d125709;hpb=512075ca1c13fecfba95b96500f0dcd8af222533;p=openwrt-10.03%2F.git diff --git a/target/utils/src/trx.c b/target/utils/src/trx.c index 6f9fa4168..787ffa894 100644 --- a/target/utils/src/trx.c +++ b/target/utils/src/trx.c @@ -44,8 +44,6 @@ #include #include #include -#include -#include #if __BYTE_ORDER == __BIG_ENDIAN #define STORE32_LE(X) bswap_32(X) @@ -79,7 +77,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); } @@ -112,8 +110,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);