aboutsummaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2021-06-28 07:46:32 +0100
committerRon Yorston <rmy@pobox.com>2021-06-28 07:46:32 +0100
commite1ad66c0b8fd58a7158d40771175a7dab224202d (patch)
tree959d687eee9637151ad5798322586174de331141 /miscutils
parent0fdf99bee07b6c38795eb5415b5e337ab82cfba8 (diff)
parent5dbbd0a6f52befe6bc57baf97d39168e595197f1 (diff)
downloadbusybox-w32-e1ad66c0b8fd58a7158d40771175a7dab224202d.tar.gz
busybox-w32-e1ad66c0b8fd58a7158d40771175a7dab224202d.tar.bz2
busybox-w32-e1ad66c0b8fd58a7158d40771175a7dab224202d.zip
Merge branch 'busybox' into merge
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/ascii.c51
-rw-r--r--miscutils/bc.c75
-rw-r--r--miscutils/chat.c2
-rw-r--r--miscutils/flashcp.c4
-rw-r--r--miscutils/i2c_tools.c2
-rw-r--r--miscutils/man.c2
-rw-r--r--miscutils/microcom.c14
-rw-r--r--miscutils/mt.c2
-rw-r--r--miscutils/strings.c4
-rw-r--r--miscutils/ts.c5
-rw-r--r--miscutils/ubi_tools.c2
11 files changed, 115 insertions, 48 deletions
diff --git a/miscutils/ascii.c b/miscutils/ascii.c
new file mode 100644
index 000000000..98c11fa51
--- /dev/null
+++ b/miscutils/ascii.c
@@ -0,0 +1,51 @@
1/* vi: set sw=4 ts=4: */
2/*
3 * Copyright (C) 2021 Denys Vlasenko <vda.linux@googlemail.com>
4 *
5 * Licensed under GPLv2, see file LICENSE in this source tree.
6 */
7//config:config ASCII
8//config: bool "ascii"
9//config: default y
10//config: help
11//config: Print ascii table.
12//config:
13
14//applet:IF_ASCII(APPLET(ascii, BB_DIR_USR_BIN, BB_SUID_DROP))
15
16//kbuild:lib-$(CONFIG_ASCII) += ascii.o
17
18//usage:#define ascii_trivial_usage NOUSAGE_STR
19//usage:#define ascii_full_usage ""
20
21#include "libbb.h"
22
23int ascii_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
24int ascii_main(int argc UNUSED_PARAM, char **argv UNUSED_PARAM)
25{
26 const char *ctrl =
27 "NUL""SOH""STX""ETX""EOT""ENQ""ACK""BEL"
28 "BS ""HT ""NL ""VT ""FF ""CR ""SO ""SI "
29 "DLE""DC1""DC2""DC3""DC4""NAK""SYN""ETB"
30 "CAN""EM ""SUB""ESC""FS ""GS ""RS ""US "
31 ;
32//TODO: od has a similar table, can we reuse it?
33 char last[2];
34 unsigned i;
35
36 last[1] = '\0';
37 printf("Dec Hex Dec Hex Dec Hex Dec Hex Dec Hex Dec Hex Dec Hex Dec Hex\n");
38 for (i = 0; i < 16; i++) {
39 printf("%3u %02x %.3s%4u %02x %.3s%4u %02x %c%4u %02x %c%4u %02x %c%4u %02x %c%5u %02x %c%5u %02x %s\n",
40 i+0x00, i+0x00, ctrl + i*3,
41 i+0x10, i+0x10, ctrl + i*3 + 16*3,
42 i+0x20, i+0x20, i+0x20,
43 i+0x30, i+0x30, i+0x30,
44 i+0x40, i+0x40, i+0x40,
45 i+0x50, i+0x50, i+0x50,
46 i+0x60, i+0x60, i+0x60,
47 i+0x70, i+0x70, (i+0x70 == 0x7f ? "DEL" : (last[0] = i+0x70, last))
48 );
49 }
50 return EXIT_SUCCESS;
51}
diff --git a/miscutils/bc.c b/miscutils/bc.c
index d74ab1da2..f931be5cc 100644
--- a/miscutils/bc.c
+++ b/miscutils/bc.c
@@ -5,7 +5,7 @@
5 * Original code copyright (c) 2018 Gavin D. Howard and contributors. 5 * Original code copyright (c) 2018 Gavin D. Howard and contributors.
6 */ 6 */
7//TODO: 7//TODO:
8// maybe implement a^b for non-integer b? 8// maybe implement a^b for non-integer b? (see zbc_num_p())
9 9
10#define DEBUG_LEXER 0 10#define DEBUG_LEXER 0
11#define DEBUG_COMPILE 0 11#define DEBUG_COMPILE 0
@@ -108,7 +108,7 @@
108 108
109//See www.gnu.org/software/bc/manual/bc.html 109//See www.gnu.org/software/bc/manual/bc.html
110//usage:#define bc_trivial_usage 110//usage:#define bc_trivial_usage
111//usage: "[-sqlw] [FILE...]" 111//usage: "[-sqlw] [FILE]..."
112//usage: 112//usage:
113//usage:#define bc_full_usage "\n" 113//usage:#define bc_full_usage "\n"
114//usage: "\nArbitrary precision calculator" 114//usage: "\nArbitrary precision calculator"
@@ -1386,6 +1386,12 @@ static void bc_num_copy(BcNum *d, BcNum *s)
1386 } 1386 }
1387} 1387}
1388 1388
1389static void bc_num_init_and_copy(BcNum *d, BcNum *s)
1390{
1391 bc_num_init(d, s->len);
1392 bc_num_copy(d, s);
1393}
1394
1389static BC_STATUS zbc_num_ulong_abs(BcNum *n, unsigned long *result_p) 1395static BC_STATUS zbc_num_ulong_abs(BcNum *n, unsigned long *result_p)
1390{ 1396{
1391 size_t i; 1397 size_t i;
@@ -1985,11 +1991,8 @@ static FAST_FUNC BC_STATUS zbc_num_m(BcNum *a, BcNum *b, BcNum *restrict c, size
1985 scale = BC_MIN(a->rdx + b->rdx, scale); 1991 scale = BC_MIN(a->rdx + b->rdx, scale);
1986 maxrdx = BC_MAX(maxrdx, scale); 1992 maxrdx = BC_MAX(maxrdx, scale);
1987 1993
1988 bc_num_init(&cpa, a->len); 1994 bc_num_init_and_copy(&cpa, a);
1989 bc_num_init(&cpb, b->len); 1995 bc_num_init_and_copy(&cpb, b);
1990
1991 bc_num_copy(&cpa, a);
1992 bc_num_copy(&cpb, b);
1993 cpa.neg = cpb.neg = false; 1996 cpa.neg = cpb.neg = false;
1994 1997
1995 s = zbc_num_shift(&cpa, maxrdx); 1998 s = zbc_num_shift(&cpa, maxrdx);
@@ -2152,6 +2155,7 @@ static FAST_FUNC BC_STATUS zbc_num_p(BcNum *a, BcNum *b, BcNum *restrict c, size
2152 BcNum copy; 2155 BcNum copy;
2153 unsigned long pow; 2156 unsigned long pow;
2154 size_t i, powrdx, resrdx; 2157 size_t i, powrdx, resrdx;
2158 size_t a_rdx;
2155 bool neg; 2159 bool neg;
2156 2160
2157 // GNU bc does not allow 2^2.0 - we do 2161 // GNU bc does not allow 2^2.0 - we do
@@ -2159,6 +2163,9 @@ static FAST_FUNC BC_STATUS zbc_num_p(BcNum *a, BcNum *b, BcNum *restrict c, size
2159 if (b->num[i] != 0) 2163 if (b->num[i] != 0)
2160 RETURN_STATUS(bc_error("not an integer")); 2164 RETURN_STATUS(bc_error("not an integer"));
2161 2165
2166// a^b for non-integer b (for a>0) can be implemented as exp(ln(a)*b).
2167// Possibly better precision would be given by a^int(b) * exp(ln(a)*frac(b)).
2168
2162 if (b->len == 0) { 2169 if (b->len == 0) {
2163 bc_num_one(c); 2170 bc_num_one(c);
2164 RETURN_STATUS(BC_STATUS_SUCCESS); 2171 RETURN_STATUS(BC_STATUS_SUCCESS);
@@ -2180,18 +2187,31 @@ static FAST_FUNC BC_STATUS zbc_num_p(BcNum *a, BcNum *b, BcNum *restrict c, size
2180 if (s) RETURN_STATUS(s); 2187 if (s) RETURN_STATUS(s);
2181 // b is not used beyond this point 2188 // b is not used beyond this point
2182 2189
2183 bc_num_init(&copy, a->len); 2190 bc_num_init_and_copy(&copy, a);
2184 bc_num_copy(&copy, a); 2191 a_rdx = a->rdx; // pull it into a CPU register (hopefully)
2192 // a is not used beyond this point
2185 2193
2186 if (!neg) { 2194 if (!neg) {
2187 if (a->rdx > scale) 2195 unsigned long new_scale;
2188 scale = a->rdx; 2196 if (a_rdx > scale)
2189 if (a->rdx * pow < scale) 2197 scale = a_rdx;
2190 scale = a->rdx * pow; 2198 new_scale = a_rdx * pow;
2191 } 2199 // Don't fall for multiplication overflow. Example:
2192 2200 // 0.01^2147483648 a_rdx:2 pow:0x80000000, 32bit mul is 0.
2193 2201//not that it matters with current algorithm, it would OOM on such large powers,
2194 for (powrdx = a->rdx; !(pow & 1); pow >>= 1) { 2202//but it can be improved to detect zero results etc. Example: with scale=0,
2203//result of 0.01^N for any N>1 is 0: 0.01^2 = 0.0001 ~= 0.00 (trunc to scale)
2204//then this would matter:
2205 // if a_rdx != 0 and new_scale < pow, we had overflow,
2206 // correct "new_scale" value is larger than ULONG_MAX,
2207 // thus larger than any possible current value of "scale",
2208 // thus "scale = new_scale" should not be done:
2209 if (a_rdx == 0 || new_scale >= pow)
2210 if (new_scale < scale)
2211 scale = new_scale;
2212 }
2213
2214 for (powrdx = a_rdx; !(pow & 1); pow >>= 1) {
2195 powrdx <<= 1; 2215 powrdx <<= 1;
2196 s = zbc_num_mul(&copy, &copy, &copy, powrdx); 2216 s = zbc_num_mul(&copy, &copy, &copy, powrdx);
2197 if (s) goto err; 2217 if (s) goto err;
@@ -2493,8 +2513,7 @@ static void bc_array_copy(BcVec *d, const BcVec *s)
2493 dnum = (void*)d->v; 2513 dnum = (void*)d->v;
2494 snum = (void*)s->v; 2514 snum = (void*)s->v;
2495 for (i = 0; i < s->len; i++, dnum++, snum++) { 2515 for (i = 0; i < s->len; i++, dnum++, snum++) {
2496 bc_num_init(dnum, snum->len); 2516 bc_num_init_and_copy(dnum, snum);
2497 bc_num_copy(dnum, snum);
2498 } 2517 }
2499} 2518}
2500 2519
@@ -2508,8 +2527,7 @@ static void dc_result_copy(BcResult *d, BcResult *src)
2508 case XC_RESULT_IBASE: 2527 case XC_RESULT_IBASE:
2509 case XC_RESULT_SCALE: 2528 case XC_RESULT_SCALE:
2510 case XC_RESULT_OBASE: 2529 case XC_RESULT_OBASE:
2511 bc_num_init(&d->d.n, src->d.n.len); 2530 bc_num_init_and_copy(&d->d.n, &src->d.n);
2512 bc_num_copy(&d->d.n, &src->d.n);
2513 break; 2531 break;
2514 case XC_RESULT_VAR: 2532 case XC_RESULT_VAR:
2515 case XC_RESULT_ARRAY: 2533 case XC_RESULT_ARRAY:
@@ -5611,11 +5629,10 @@ static BC_STATUS zxc_num_printNum(BcNum *n, unsigned base_t, size_t width, BcNum
5611 } 5629 }
5612 5630
5613 bc_vec_init(&stack, sizeof(long), NULL); 5631 bc_vec_init(&stack, sizeof(long), NULL);
5614 bc_num_init(&intp, n->len); 5632 bc_num_init_and_copy(&intp, n);
5615 bc_num_init(&fracp, n->rdx); 5633 bc_num_init(&fracp, n->rdx);
5616 bc_num_init(&digit, width); 5634 bc_num_init(&digit, width);
5617 bc_num_init(&frac_len, BC_NUM_INT(n)); 5635 bc_num_init(&frac_len, BC_NUM_INT(n));
5618 bc_num_copy(&intp, n);
5619 bc_num_one(&frac_len); 5636 bc_num_one(&frac_len);
5620 base.cap = ARRAY_SIZE(base_digs); 5637 base.cap = ARRAY_SIZE(base_digs);
5621 base.num = base_digs; 5638 base.num = base_digs;
@@ -5784,8 +5801,7 @@ static BC_STATUS zxc_program_negate(void)
5784 s = zxc_program_prep(&ptr, &num); 5801 s = zxc_program_prep(&ptr, &num);
5785 if (s) RETURN_STATUS(s); 5802 if (s) RETURN_STATUS(s);
5786 5803
5787 bc_num_init(&res.d.n, num->len); 5804 bc_num_init_and_copy(&res.d.n, num);
5788 bc_num_copy(&res.d.n, num);
5789 if (res.d.n.len) res.d.n.neg = !res.d.n.neg; 5805 if (res.d.n.len) res.d.n.neg = !res.d.n.neg;
5790 5806
5791 xc_program_retire(&res, XC_RESULT_TEMP); 5807 xc_program_retire(&res, XC_RESULT_TEMP);
@@ -6024,8 +6040,7 @@ static BC_STATUS zxc_program_assign(char inst)
6024 s = BC_STATUS_SUCCESS; 6040 s = BC_STATUS_SUCCESS;
6025 } 6041 }
6026 6042
6027 bc_num_init(&res.d.n, l->len); 6043 bc_num_init_and_copy(&res.d.n, l);
6028 bc_num_copy(&res.d.n, l);
6029 xc_program_binOpRetire(&res); 6044 xc_program_binOpRetire(&res);
6030 6045
6031 RETURN_STATUS(s); 6046 RETURN_STATUS(s);
@@ -6122,8 +6137,7 @@ static BC_STATUS zbc_program_incdec(char inst)
6122 6137
6123 if (inst == BC_INST_INC_POST || inst == BC_INST_DEC_POST) { 6138 if (inst == BC_INST_INC_POST || inst == BC_INST_DEC_POST) {
6124 copy.t = XC_RESULT_TEMP; 6139 copy.t = XC_RESULT_TEMP;
6125 bc_num_init(&copy.d.n, num->len); 6140 bc_num_init_and_copy(&copy.d.n, num);
6126 bc_num_copy(&copy.d.n, num);
6127 } 6141 }
6128 6142
6129 res.t = BC_RESULT_ONE; 6143 res.t = BC_RESULT_ONE;
@@ -6225,8 +6239,7 @@ static BC_STATUS zbc_program_return(char inst)
6225 6239
6226 s = zxc_program_num(operand, &num); 6240 s = zxc_program_num(operand, &num);
6227 if (s) RETURN_STATUS(s); 6241 if (s) RETURN_STATUS(s);
6228 bc_num_init(&res.d.n, num->len); 6242 bc_num_init_and_copy(&res.d.n, num);
6229 bc_num_copy(&res.d.n, num);
6230 bc_vec_pop(&G.prog.results); 6243 bc_vec_pop(&G.prog.results);
6231 } else { 6244 } else {
6232 if (f->voidfunc) 6245 if (f->voidfunc)
diff --git a/miscutils/chat.c b/miscutils/chat.c
index 86a114df6..f9e12a4ac 100644
--- a/miscutils/chat.c
+++ b/miscutils/chat.c
@@ -79,7 +79,7 @@
79//kbuild:lib-$(CONFIG_CHAT) += chat.o 79//kbuild:lib-$(CONFIG_CHAT) += chat.o
80 80
81//usage:#define chat_trivial_usage 81//usage:#define chat_trivial_usage
82//usage: "EXPECT [SEND [EXPECT [SEND...]]]" 82//usage: "EXPECT [SEND [EXPECT [SEND]]...]"
83//usage:#define chat_full_usage "\n\n" 83//usage:#define chat_full_usage "\n\n"
84//usage: "Useful for interacting with a modem connected to stdin/stdout.\n" 84//usage: "Useful for interacting with a modem connected to stdin/stdout.\n"
85//usage: "A script consists of \"expect-send\" argument pairs.\n" 85//usage: "A script consists of \"expect-send\" argument pairs.\n"
diff --git a/miscutils/flashcp.c b/miscutils/flashcp.c
index 1ca9d158d..93c80cc6c 100644
--- a/miscutils/flashcp.c
+++ b/miscutils/flashcp.c
@@ -19,9 +19,9 @@
19//kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o 19//kbuild:lib-$(CONFIG_FLASHCP) += flashcp.o
20 20
21//usage:#define flashcp_trivial_usage 21//usage:#define flashcp_trivial_usage
22//usage: "-v FILE MTD_DEVICE" 22//usage: "[-v] FILE MTD_DEVICE"
23//usage:#define flashcp_full_usage "\n\n" 23//usage:#define flashcp_full_usage "\n\n"
24//usage: "Copy an image to MTD device\n" 24//usage: "Copy FILE to MTD device\n"
25//usage: "\n -v Verbose" 25//usage: "\n -v Verbose"
26 26
27#include "libbb.h" 27#include "libbb.h"
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c
index 48135921d..b25d49792 100644
--- a/miscutils/i2c_tools.c
+++ b/miscutils/i2c_tools.c
@@ -1394,7 +1394,7 @@ static void check_i2c_func(int fd)
1394} 1394}
1395 1395
1396//usage:#define i2ctransfer_trivial_usage 1396//usage:#define i2ctransfer_trivial_usage
1397//usage: "[-fay] I2CBUS {rLENGTH[@ADDR] | wLENGTH[@ADDR] DATA...}..." 1397//usage: "[-fay] I2CBUS { rLENGTH[@ADDR] | wLENGTH[@ADDR] DATA...}..."
1398//usage:#define i2ctransfer_full_usage "\n\n" 1398//usage:#define i2ctransfer_full_usage "\n\n"
1399//usage: "Read/write I2C data in one transfer" 1399//usage: "Read/write I2C data in one transfer"
1400//usage: "\n" 1400//usage: "\n"
diff --git a/miscutils/man.c b/miscutils/man.c
index 052b50054..be3b2a000 100644
--- a/miscutils/man.c
+++ b/miscutils/man.c
@@ -350,7 +350,7 @@ int man_main(int argc UNUSED_PARAM, char **argv)
350 350
351 /* is 1st ARG a SECTION? */ 351 /* is 1st ARG a SECTION? */
352 sec_list = conf_sec_list; 352 sec_list = conf_sec_list;
353 if (is_section_name(conf_sec_list, *argv)) { 353 if (is_section_name(conf_sec_list, *argv) && argv[1]) {
354 /* yes */ 354 /* yes */
355 sec_list = *argv++; 355 sec_list = *argv++;
356 } 356 }
diff --git a/miscutils/microcom.c b/miscutils/microcom.c
index 399d4cf7f..97b46342f 100644
--- a/miscutils/microcom.c
+++ b/miscutils/microcom.c
@@ -18,14 +18,14 @@
18//kbuild:lib-$(CONFIG_MICROCOM) += microcom.o 18//kbuild:lib-$(CONFIG_MICROCOM) += microcom.o
19 19
20//usage:#define microcom_trivial_usage 20//usage:#define microcom_trivial_usage
21//usage: "[-d DELAY] [-t TIMEOUT] [-s SPEED] [-X] TTY" 21//usage: "[-d DELAY_MS] [-t TIMEOUT_MS ] [-s SPEED] [-X] TTY"
22//usage:#define microcom_full_usage "\n\n" 22//usage:#define microcom_full_usage "\n\n"
23//usage: "Copy bytes for stdin to TTY and from TTY to stdout\n" 23//usage: "Copy bytes from stdin to TTY and from TTY to stdout\n"
24//usage: "\n -d Wait up to DELAY ms for TTY output before sending every" 24//usage: "\n -d DELAY Wait up to DELAY ms for TTY output before sending"
25//usage: "\n next byte to it" 25//usage: "\n every next byte to it"
26//usage: "\n -t Exit if both stdin and TTY are silent for TIMEOUT ms" 26//usage: "\n -t TIMEOUT Exit if both stdin and TTY are silent for TIMEOUT ms"
27//usage: "\n -s Set serial line to SPEED" 27//usage: "\n -s SPEED Set serial line to SPEED"
28//usage: "\n -X Disable special meaning of NUL and Ctrl-X from stdin" 28//usage: "\n -X Disable special meaning of NUL and Ctrl-X from stdin"
29 29
30#include "libbb.h" 30#include "libbb.h"
31#include "common_bufsiz.h" 31#include "common_bufsiz.h"
diff --git a/miscutils/mt.c b/miscutils/mt.c
index 1a4214664..52d5476a1 100644
--- a/miscutils/mt.c
+++ b/miscutils/mt.c
@@ -19,7 +19,7 @@
19//usage:#define mt_full_usage "\n\n" 19//usage:#define mt_full_usage "\n\n"
20//usage: "Control magnetic tape drive operation\n" 20//usage: "Control magnetic tape drive operation\n"
21//usage: "\n" 21//usage: "\n"
22//usage: "Available Opcodes:\n" 22//usage: "Opcodes:\n"
23//usage: "\n" 23//usage: "\n"
24//usage: "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n" 24//usage: "bsf bsfm bsr bss datacompression drvbuffer eof eom erase\n"
25//usage: "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n" 25//usage: "fsf fsfm fsr fss load lock mkpart nop offline ras1 ras2\n"
diff --git a/miscutils/strings.c b/miscutils/strings.c
index e4a68227e..b01884968 100644
--- a/miscutils/strings.c
+++ b/miscutils/strings.c
@@ -18,7 +18,7 @@
18//kbuild:lib-$(CONFIG_STRINGS) += strings.o 18//kbuild:lib-$(CONFIG_STRINGS) += strings.o
19 19
20//usage:#define strings_trivial_usage 20//usage:#define strings_trivial_usage
21//usage: "[-fo] [-t o/d/x] [-n LEN] [FILE]..." 21//usage: "[-fo] [-t o|d|x] [-n LEN] [FILE]..."
22//usage:#define strings_full_usage "\n\n" 22//usage:#define strings_full_usage "\n\n"
23//usage: "Display printable strings in a binary file\n" 23//usage: "Display printable strings in a binary file\n"
24//We usually don't bother user with "nop" options. They work, but are not shown: 24//We usually don't bother user with "nop" options. They work, but are not shown:
@@ -26,7 +26,7 @@
26//unimplemented alternative is -d: Only strings from initialized, loaded data sections 26//unimplemented alternative is -d: Only strings from initialized, loaded data sections
27//usage: "\n -f Precede strings with filenames" 27//usage: "\n -f Precede strings with filenames"
28//usage: "\n -o Precede strings with octal offsets" 28//usage: "\n -o Precede strings with octal offsets"
29//usage: "\n -t o/d/x Precede strings with offsets in base 8/10/16" 29//usage: "\n -t o|d|x Precede strings with offsets in base 8/10/16"
30//usage: "\n -n LEN At least LEN characters form a string (default 4)" 30//usage: "\n -n LEN At least LEN characters form a string (default 4)"
31 31
32#include "libbb.h" 32#include "libbb.h"
diff --git a/miscutils/ts.c b/miscutils/ts.c
index 3eecb7464..af6677fc7 100644
--- a/miscutils/ts.c
+++ b/miscutils/ts.c
@@ -13,7 +13,10 @@
13 13
14//usage:#define ts_trivial_usage 14//usage:#define ts_trivial_usage
15//usage: "[-is] [STRFTIME]" 15//usage: "[-is] [STRFTIME]"
16//usage:#define ts_full_usage "" 16//usage:#define ts_full_usage "\n\n"
17//usage: "Pipe stdin to stdout, add timestamp to each line\n"
18//usage: "\n -s Time since start"
19//usage: "\n -i Time since previous line"
17 20
18#include "libbb.h" 21#include "libbb.h"
19#include "common_bufsiz.h" 22#include "common_bufsiz.h"
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c
index 69ead7a13..6d49f61d9 100644
--- a/miscutils/ubi_tools.c
+++ b/miscutils/ubi_tools.c
@@ -251,7 +251,7 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv)
251 } else 251 } else
252 252
253//usage:#define ubirmvol_trivial_usage 253//usage:#define ubirmvol_trivial_usage
254//usage: "-n VOLID / -N VOLNAME UBI_DEVICE" 254//usage: "-n VOLID | -N VOLNAME UBI_DEVICE"
255//usage:#define ubirmvol_full_usage "\n\n" 255//usage:#define ubirmvol_full_usage "\n\n"
256//usage: "Remove UBI volume\n" 256//usage: "Remove UBI volume\n"
257//usage: "\n -n VOLID Volume ID" 257//usage: "\n -n VOLID Volume ID"