diff options
| author | Ron Yorston <rmy@pobox.com> | 2015-01-23 09:50:40 +0000 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2015-01-23 09:50:40 +0000 |
| commit | 63dbf1908bc51918d9d963f4d9b7657306b2970d (patch) | |
| tree | 781ebfdcbbb953688e06f3541ce9e0c71f1dadfa /miscutils | |
| parent | 06900749637b925af1ebdf5030ba03a379f4f84f (diff) | |
| parent | 6968e081230fb6434a2a6f0eed39d538ea982f3f (diff) | |
| download | busybox-w32-63dbf1908bc51918d9d963f4d9b7657306b2970d.tar.gz busybox-w32-63dbf1908bc51918d9d963f4d9b7657306b2970d.tar.bz2 busybox-w32-63dbf1908bc51918d9d963f4d9b7657306b2970d.zip | |
Merge commit '1_23_0' into mergeTIG_1_23_0
Conflicts:
libbb/lineedit.c
Diffstat (limited to 'miscutils')
| -rw-r--r-- | miscutils/nandwrite.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index 29ff351a3..247fc72f4 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
| @@ -36,16 +36,18 @@ | |||
| 36 | //usage: "\n -s ADDR Start address" | 36 | //usage: "\n -s ADDR Start address" |
| 37 | 37 | ||
| 38 | //usage:#define nanddump_trivial_usage | 38 | //usage:#define nanddump_trivial_usage |
| 39 | //usage: "[-o] [--bb=padbad|skipbad] [-s ADDR] [-l LEN] [-f FILE] MTD_DEVICE" | 39 | //usage: "[-o]" IF_LONG_OPTS(" [--bb=padbad|skipbad]") " [-s ADDR] [-l LEN] [-f FILE] MTD_DEVICE" |
| 40 | //usage:#define nanddump_full_usage "\n\n" | 40 | //usage:#define nanddump_full_usage "\n\n" |
| 41 | //usage: "Dump MTD_DEVICE\n" | 41 | //usage: "Dump MTD_DEVICE\n" |
| 42 | //usage: "\n -o Dump oob data" | 42 | //usage: "\n -o Dump oob data" |
| 43 | //usage: "\n -s ADDR Start address" | 43 | //usage: "\n -s ADDR Start address" |
| 44 | //usage: "\n -l LEN Length" | 44 | //usage: "\n -l LEN Length" |
| 45 | //usage: "\n -f FILE Dump to file ('-' for stdout)" | 45 | //usage: "\n -f FILE Dump to file ('-' for stdout)" |
| 46 | //usage: IF_LONG_OPTS( | ||
| 46 | //usage: "\n --bb=METHOD:" | 47 | //usage: "\n --bb=METHOD:" |
| 47 | //usage: "\n skipbad: skip bad blocks" | 48 | //usage: "\n skipbad: skip bad blocks" |
| 48 | //usage: "\n padbad: substitute bad blocks by 0xff (default)" | 49 | //usage: "\n padbad: substitute bad blocks by 0xff (default)" |
| 50 | //usage: ) | ||
| 49 | 51 | ||
| 50 | #include "libbb.h" | 52 | #include "libbb.h" |
| 51 | #include <mtd/mtd-user.h> | 53 | #include <mtd/mtd-user.h> |
| @@ -116,12 +118,13 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
| 116 | struct mtd_oob_buf oob; | 118 | struct mtd_oob_buf oob; |
| 117 | unsigned char *filebuf; | 119 | unsigned char *filebuf; |
| 118 | const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb; | 120 | const char *opt_s = "0", *opt_f = "-", *opt_l, *opt_bb; |
| 119 | static const char nanddump_longopts[] ALIGN1 = | ||
| 120 | "bb\0" Required_argument "\xff"; /* no short equivalent */ | ||
| 121 | 121 | ||
| 122 | if (IS_NANDDUMP) { | 122 | if (IS_NANDDUMP) { |
| 123 | opt_complementary = "=1"; | 123 | opt_complementary = "=1"; |
| 124 | applet_long_options = nanddump_longopts; | 124 | #if ENABLE_LONG_OPTS |
| 125 | applet_long_options = | ||
| 126 | "bb\0" Required_argument "\xff"; /* no short equivalent */ | ||
| 127 | #endif | ||
| 125 | opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb); | 128 | opts = getopt32(argv, "os:f:l:", &opt_s, &opt_f, &opt_l, &opt_bb); |
| 126 | } else { /* nandwrite */ | 129 | } else { /* nandwrite */ |
| 127 | opt_complementary = "-1:?2"; | 130 | opt_complementary = "-1:?2"; |
