mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-09 08:11:56 +02:00
add -f option to make adding files to the trx command line explicit (otherwise not usable on mac os x)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@4870 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
6e30a22b87
commit
6f8e2d0571
@ -45,8 +45,8 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
#include <machine/endian.h>
|
#include <machine/endian.h>
|
||||||
#include <machine/byte_order.h>
|
#include <machine/byte_order.h>
|
||||||
#define __BYTE_ORDER BYTE_ORDER
|
#define __BYTE_ORDER BYTE_ORDER
|
||||||
#define __BIG_ENDIAN BIG_ENDIAN
|
#define __BIG_ENDIAN BIG_ENDIAN
|
||||||
#define bswap_16(x) NXSwapShort(x)
|
#define bswap_16(x) NXSwapShort(x)
|
||||||
@ -89,7 +89,7 @@ void usage(void) __attribute__ (( __noreturn__ ));
|
|||||||
|
|
||||||
void usage(void)
|
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);
|
exit(EXIT_FAILURE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -122,8 +122,9 @@ int main(int argc, char **argv)
|
|||||||
in = NULL;
|
in = NULL;
|
||||||
i = 0;
|
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) {
|
switch (c) {
|
||||||
|
case 'f':
|
||||||
case 1:
|
case 1:
|
||||||
p->offsets[i++] = STORE32_LE(cur_len);
|
p->offsets[i++] = STORE32_LE(cur_len);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user