diff options
author | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:42:39 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2019-08-16 09:45:21 +0100 |
commit | 517cf74f6265ec4308b790b637b3f9778cbdc6e0 (patch) | |
tree | be9337069b60ca1bb03565d8575bacfc71181003 /miscutils | |
parent | ae65dc37bcc9b1d9cef0b111131c79dc4ba1bf51 (diff) | |
parent | ac78f2ac96b3efd6551a08e7dc609efa1fb69481 (diff) | |
download | busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.gz busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.tar.bz2 busybox-w32-517cf74f6265ec4308b790b637b3f9778cbdc6e0.zip |
Merge branch 'busybox' into merge
Diffstat (limited to 'miscutils')
-rw-r--r-- | miscutils/bc.c | 16 | ||||
-rw-r--r-- | miscutils/chat.c | 2 | ||||
-rw-r--r-- | miscutils/crond.c | 4 | ||||
-rw-r--r-- | miscutils/crontab.c | 2 | ||||
-rw-r--r-- | miscutils/dc.c | 4 | ||||
-rw-r--r-- | miscutils/devfsd.c | 15 | ||||
-rw-r--r-- | miscutils/devmem.c | 8 | ||||
-rw-r--r-- | miscutils/fbsplash.c | 2 | ||||
-rw-r--r-- | miscutils/flash_eraseall.c | 6 | ||||
-rw-r--r-- | miscutils/hdparm.c | 12 | ||||
-rw-r--r-- | miscutils/hexedit.c | 2 | ||||
-rw-r--r-- | miscutils/i2c_tools.c | 44 | ||||
-rw-r--r-- | miscutils/inotifyd.c | 2 | ||||
-rw-r--r-- | miscutils/nandwrite.c | 10 | ||||
-rw-r--r-- | miscutils/rfkill.c | 2 | ||||
-rw-r--r-- | miscutils/rx.c | 6 | ||||
-rw-r--r-- | miscutils/time.c | 2 | ||||
-rw-r--r-- | miscutils/ubi_tools.c | 10 | ||||
-rw-r--r-- | miscutils/ubirename.c | 2 |
19 files changed, 78 insertions, 73 deletions
diff --git a/miscutils/bc.c b/miscutils/bc.c index 36e978ed8..7ac30dd53 100644 --- a/miscutils/bc.c +++ b/miscutils/bc.c | |||
@@ -893,7 +893,7 @@ static void fflush_and_check(void) | |||
893 | { | 893 | { |
894 | fflush_all(); | 894 | fflush_all(); |
895 | if (ferror(stdout) || ferror(stderr)) | 895 | if (ferror(stdout) || ferror(stderr)) |
896 | bb_perror_msg_and_die("output error"); | 896 | bb_simple_perror_msg_and_die("output error"); |
897 | } | 897 | } |
898 | 898 | ||
899 | #if ENABLE_FEATURE_CLEAN_UP | 899 | #if ENABLE_FEATURE_CLEAN_UP |
@@ -908,7 +908,7 @@ static void quit(void) NORETURN; | |||
908 | static void quit(void) | 908 | static void quit(void) |
909 | { | 909 | { |
910 | if (ferror(stdin)) | 910 | if (ferror(stdin)) |
911 | bb_perror_msg_and_die("input error"); | 911 | bb_simple_perror_msg_and_die("input error"); |
912 | fflush_and_check(); | 912 | fflush_and_check(); |
913 | dbg_exec("quit(): exiting with exitcode SUCCESS"); | 913 | dbg_exec("quit(): exiting with exitcode SUCCESS"); |
914 | exit(0); | 914 | exit(0); |
@@ -997,10 +997,12 @@ static ERRORFUNC int bc_error_bad_character(char c) | |||
997 | IF_ERROR_RETURN_POSSIBLE(return) bc_error("NUL character"); | 997 | IF_ERROR_RETURN_POSSIBLE(return) bc_error("NUL character"); |
998 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_fmt("bad character '%c'", c); | 998 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_fmt("bad character '%c'", c); |
999 | } | 999 | } |
1000 | #if ENABLE_BC | ||
1000 | static ERRORFUNC int bc_error_bad_function_definition(void) | 1001 | static ERRORFUNC int bc_error_bad_function_definition(void) |
1001 | { | 1002 | { |
1002 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad function definition"); | 1003 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad function definition"); |
1003 | } | 1004 | } |
1005 | #endif | ||
1004 | static ERRORFUNC int bc_error_bad_expression(void) | 1006 | static ERRORFUNC int bc_error_bad_expression(void) |
1005 | { | 1007 | { |
1006 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad expression"); | 1008 | IF_ERROR_RETURN_POSSIBLE(return) bc_error_at("bad expression"); |
@@ -1273,14 +1275,12 @@ static int bc_map_insert(BcVec *v, const void *ptr, size_t *i) | |||
1273 | return 1; // "was inserted" | 1275 | return 1; // "was inserted" |
1274 | } | 1276 | } |
1275 | 1277 | ||
1276 | #if ENABLE_BC | ||
1277 | static size_t bc_map_find_exact(const BcVec *v, const void *ptr) | 1278 | static size_t bc_map_find_exact(const BcVec *v, const void *ptr) |
1278 | { | 1279 | { |
1279 | size_t i = bc_map_find_ge(v, ptr); | 1280 | size_t i = bc_map_find_ge(v, ptr); |
1280 | if (i >= v->len) return BC_VEC_INVALID_IDX; | 1281 | if (i >= v->len) return BC_VEC_INVALID_IDX; |
1281 | return bc_id_cmp(ptr, bc_vec_item(v, i)) ? BC_VEC_INVALID_IDX : i; | 1282 | return bc_id_cmp(ptr, bc_vec_item(v, i)) ? BC_VEC_INVALID_IDX : i; |
1282 | } | 1283 | } |
1283 | #endif | ||
1284 | 1284 | ||
1285 | static void bc_num_setToZero(BcNum *n, size_t scale) | 1285 | static void bc_num_setToZero(BcNum *n, size_t scale) |
1286 | { | 1286 | { |
@@ -2576,7 +2576,7 @@ static void xc_read_line(BcVec *vec, FILE *fp) | |||
2576 | goto get_char; | 2576 | goto get_char; |
2577 | if (c == EOF) { | 2577 | if (c == EOF) { |
2578 | if (ferror(fp)) | 2578 | if (ferror(fp)) |
2579 | bb_perror_msg_and_die("input error"); | 2579 | bb_simple_perror_msg_and_die("input error"); |
2580 | // Note: EOF does not append '\n' | 2580 | // Note: EOF does not append '\n' |
2581 | break; | 2581 | break; |
2582 | } | 2582 | } |
@@ -6925,9 +6925,9 @@ static BC_STATUS zxc_vm_process(const char *text) | |||
6925 | ip = (void*)G.prog.exestack.v; | 6925 | ip = (void*)G.prog.exestack.v; |
6926 | #if SANITY_CHECKS | 6926 | #if SANITY_CHECKS |
6927 | if (G.prog.exestack.len != 1) // should have only main's IP | 6927 | if (G.prog.exestack.len != 1) // should have only main's IP |
6928 | bb_error_msg_and_die("BUG:call stack"); | 6928 | bb_simple_error_msg_and_die("BUG:call stack"); |
6929 | if (ip->func != BC_PROG_MAIN) | 6929 | if (ip->func != BC_PROG_MAIN) |
6930 | bb_error_msg_and_die("BUG:not MAIN"); | 6930 | bb_simple_error_msg_and_die("BUG:not MAIN"); |
6931 | #endif | 6931 | #endif |
6932 | f = xc_program_func_BC_PROG_MAIN(); | 6932 | f = xc_program_func_BC_PROG_MAIN(); |
6933 | // bc discards strings, constants and code after each | 6933 | // bc discards strings, constants and code after each |
@@ -6943,7 +6943,7 @@ static BC_STATUS zxc_vm_process(const char *text) | |||
6943 | if (IS_BC) { | 6943 | if (IS_BC) { |
6944 | #if SANITY_CHECKS | 6944 | #if SANITY_CHECKS |
6945 | if (G.prog.results.len != 0) // should be empty | 6945 | if (G.prog.results.len != 0) // should be empty |
6946 | bb_error_msg_and_die("BUG:data stack"); | 6946 | bb_simple_error_msg_and_die("BUG:data stack"); |
6947 | #endif | 6947 | #endif |
6948 | IF_BC(bc_vec_pop_all(&f->strs);) | 6948 | IF_BC(bc_vec_pop_all(&f->strs);) |
6949 | IF_BC(bc_vec_pop_all(&f->consts);) | 6949 | IF_BC(bc_vec_pop_all(&f->consts);) |
diff --git a/miscutils/chat.c b/miscutils/chat.c index 5183d1369..a04565063 100644 --- a/miscutils/chat.c +++ b/miscutils/chat.c | |||
@@ -307,7 +307,7 @@ int chat_main(int argc UNUSED_PARAM, char **argv) | |||
307 | } else if (DIR_SAY == key) { | 307 | } else if (DIR_SAY == key) { |
308 | // just print argument verbatim | 308 | // just print argument verbatim |
309 | // TODO: should we use full_write() to avoid unistd/stdio conflict? | 309 | // TODO: should we use full_write() to avoid unistd/stdio conflict? |
310 | bb_error_msg("%s", arg); | 310 | bb_simple_error_msg(arg); |
311 | } | 311 | } |
312 | // next, please! | 312 | // next, please! |
313 | argv++; | 313 | argv++; |
diff --git a/miscutils/crond.c b/miscutils/crond.c index b533a3991..2e8ca8b68 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -731,7 +731,7 @@ fork_job(const char *user, int mailFd, CronLine *line, bool run_sendmail) | |||
731 | logmode = sv_logmode; | 731 | logmode = sv_logmode; |
732 | 732 | ||
733 | if (pid < 0) { | 733 | if (pid < 0) { |
734 | bb_perror_msg("vfork"); | 734 | bb_simple_perror_msg("vfork"); |
735 | err: | 735 | err: |
736 | pid = 0; | 736 | pid = 0; |
737 | } /* else: PARENT, FORK SUCCESS */ | 737 | } /* else: PARENT, FORK SUCCESS */ |
@@ -861,7 +861,7 @@ static pid_t start_one_job(const char *user, CronLine *line) | |||
861 | bb_error_msg_and_die("can't execute '%s' for user %s", shell, user); | 861 | bb_error_msg_and_die("can't execute '%s' for user %s", shell, user); |
862 | } | 862 | } |
863 | if (pid < 0) { | 863 | if (pid < 0) { |
864 | bb_perror_msg("vfork"); | 864 | bb_simple_perror_msg("vfork"); |
865 | err: | 865 | err: |
866 | pid = 0; | 866 | pid = 0; |
867 | } | 867 | } |
diff --git a/miscutils/crontab.c b/miscutils/crontab.c index 96dc4741a..c71d914fc 100644 --- a/miscutils/crontab.c +++ b/miscutils/crontab.c | |||
@@ -107,7 +107,7 @@ int crontab_main(int argc UNUSED_PARAM, char **argv) | |||
107 | if (sanitize_env_if_suid()) { /* Clears dangerous stuff, sets PATH */ | 107 | if (sanitize_env_if_suid()) { /* Clears dangerous stuff, sets PATH */ |
108 | /* Run by non-root */ | 108 | /* Run by non-root */ |
109 | if (opt_ler & (OPT_u|OPT_c)) | 109 | if (opt_ler & (OPT_u|OPT_c)) |
110 | bb_error_msg_and_die(bb_msg_you_must_be_root); | 110 | bb_simple_error_msg_and_die(bb_msg_you_must_be_root); |
111 | } | 111 | } |
112 | 112 | ||
113 | if (opt_ler & OPT_u) { | 113 | if (opt_ler & OPT_u) { |
diff --git a/miscutils/dc.c b/miscutils/dc.c index c7ce2be0b..b6c6795b6 100644 --- a/miscutils/dc.c +++ b/miscutils/dc.c | |||
@@ -39,14 +39,14 @@ static unsigned check_under(void) | |||
39 | { | 39 | { |
40 | unsigned p = pointer; | 40 | unsigned p = pointer; |
41 | if (p == 0) | 41 | if (p == 0) |
42 | bb_error_msg_and_die("stack underflow"); | 42 | bb_simple_error_msg_and_die("stack underflow"); |
43 | return p - 1; | 43 | return p - 1; |
44 | } | 44 | } |
45 | 45 | ||
46 | static void push(double a) | 46 | static void push(double a) |
47 | { | 47 | { |
48 | if (pointer >= STACK_SIZE) | 48 | if (pointer >= STACK_SIZE) |
49 | bb_error_msg_and_die("stack overflow"); | 49 | bb_simple_error_msg_and_die("stack overflow"); |
50 | stack[pointer++] = a; | 50 | stack[pointer++] = a; |
51 | } | 51 | } |
52 | 52 | ||
diff --git a/miscutils/devfsd.c b/miscutils/devfsd.c index e4d104d0c..f3d935b2e 100644 --- a/miscutils/devfsd.c +++ b/miscutils/devfsd.c | |||
@@ -344,14 +344,19 @@ static const char bb_msg_variable_not_found[] ALIGN1 = "variable: %s not found"; | |||
344 | /* Busybox stuff */ | 344 | /* Busybox stuff */ |
345 | #if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG | 345 | #if ENABLE_DEVFSD_VERBOSE || ENABLE_DEBUG |
346 | #define info_logger(p, fmt, args...) bb_info_msg(fmt, ## args) | 346 | #define info_logger(p, fmt, args...) bb_info_msg(fmt, ## args) |
347 | #define simple_info_logger(p, msg) bb_simple_info_msg(msg) | ||
347 | #define msg_logger(p, fmt, args...) bb_error_msg(fmt, ## args) | 348 | #define msg_logger(p, fmt, args...) bb_error_msg(fmt, ## args) |
349 | #define simple_msg_logger(p, msg) bb_simple_error_msg(msg) | ||
348 | #define msg_logger_and_die(p, fmt, args...) bb_error_msg_and_die(fmt, ## args) | 350 | #define msg_logger_and_die(p, fmt, args...) bb_error_msg_and_die(fmt, ## args) |
351 | #define simple_msg_logger_and_die(p, msg) bb_simple_error_msg_and_die(msg) | ||
349 | #define error_logger(p, fmt, args...) bb_perror_msg(fmt, ## args) | 352 | #define error_logger(p, fmt, args...) bb_perror_msg(fmt, ## args) |
350 | #define error_logger_and_die(p, fmt, args...) bb_perror_msg_and_die(fmt, ## args) | 353 | #define error_logger_and_die(p, fmt, args...) bb_perror_msg_and_die(fmt, ## args) |
351 | #else | 354 | #else |
352 | #define info_logger(p, fmt, args...) | 355 | #define info_logger(p, fmt, args...) |
353 | #define msg_logger(p, fmt, args...) | 356 | #define msg_logger(p, fmt, args...) |
357 | #define simple_msg_logger(p, msg) | ||
354 | #define msg_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) | 358 | #define msg_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) |
359 | #define simple_msg_logger_and_die(p, msg) exit(EXIT_FAILURE) | ||
355 | #define error_logger(p, fmt, args...) | 360 | #define error_logger(p, fmt, args...) |
356 | #define error_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) | 361 | #define error_logger_and_die(p, fmt, args...) exit(EXIT_FAILURE) |
357 | #endif | 362 | #endif |
@@ -727,7 +732,7 @@ static int do_servicing(int fd, unsigned long event_mask) | |||
727 | caught_sighup = FALSE; | 732 | caught_sighup = FALSE; |
728 | return c_sighup; | 733 | return c_sighup; |
729 | } | 734 | } |
730 | msg_logger_and_die(LOG_ERR, "read error on control file"); | 735 | simple_msg_logger_and_die(LOG_ERR, "read error on control file"); |
731 | } /* End Function do_servicing */ | 736 | } /* End Function do_servicing */ |
732 | 737 | ||
733 | static void service_name(const struct devfsd_notify_struct *info) | 738 | static void service_name(const struct devfsd_notify_struct *info) |
@@ -786,7 +791,7 @@ static void service_name(const struct devfsd_notify_struct *info) | |||
786 | action_compat(info, entry->action.what); | 791 | action_compat(info, entry->action.what); |
787 | break; | 792 | break; |
788 | default: | 793 | default: |
789 | msg_logger_and_die(LOG_ERR, "Unknown action"); | 794 | simple_msg_logger_and_die(LOG_ERR, "Unknown action"); |
790 | } | 795 | } |
791 | } | 796 | } |
792 | } /* End Function service_name */ | 797 | } /* End Function service_name */ |
@@ -1691,7 +1696,7 @@ int st_expr_expand(char *output, unsigned int length, const char *input, | |||
1691 | } | 1696 | } |
1692 | return FALSE; | 1697 | return FALSE; |
1693 | st_expr_expand_out: | 1698 | st_expr_expand_out: |
1694 | info_logger(LOG_INFO, bb_msg_small_buffer); | 1699 | simple_info_logger(LOG_INFO, bb_msg_small_buffer); |
1695 | return FALSE; | 1700 | return FALSE; |
1696 | } /* End Function st_expr_expand */ | 1701 | } /* End Function st_expr_expand */ |
1697 | 1702 | ||
@@ -1775,7 +1780,7 @@ static const char *expand_variable(char *buffer, unsigned int length, | |||
1775 | return input + len; | 1780 | return input + len; |
1776 | } | 1781 | } |
1777 | if (ch != ':' || ptr[1] != '-') { | 1782 | if (ch != ':' || ptr[1] != '-') { |
1778 | info_logger(LOG_INFO, "illegal char in var name"); | 1783 | simple_info_logger(LOG_INFO, "illegal char in var name"); |
1779 | return NULL; | 1784 | return NULL; |
1780 | } | 1785 | } |
1781 | /* It's that handy "${var:-word}" expression. Check if var is defined */ | 1786 | /* It's that handy "${var:-word}" expression. Check if var is defined */ |
@@ -1838,7 +1843,7 @@ static const char *expand_variable(char *buffer, unsigned int length, | |||
1838 | *out_pos += len; | 1843 | *out_pos += len; |
1839 | return input; | 1844 | return input; |
1840 | expand_variable_out: | 1845 | expand_variable_out: |
1841 | info_logger(LOG_INFO, bb_msg_small_buffer); | 1846 | simple_info_logger(LOG_INFO, bb_msg_small_buffer); |
1842 | return NULL; | 1847 | return NULL; |
1843 | } /* End Function expand_variable */ | 1848 | } /* End Function expand_variable */ |
1844 | 1849 | ||
diff --git a/miscutils/devmem.c b/miscutils/devmem.c index 51ac3f22f..e8dce5225 100644 --- a/miscutils/devmem.c +++ b/miscutils/devmem.c | |||
@@ -89,7 +89,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) | |||
89 | fd, | 89 | fd, |
90 | target & ~(off_t)(page_size - 1)); | 90 | target & ~(off_t)(page_size - 1)); |
91 | if (map_base == MAP_FAILED) | 91 | if (map_base == MAP_FAILED) |
92 | bb_perror_msg_and_die("mmap"); | 92 | bb_simple_perror_msg_and_die("mmap"); |
93 | 93 | ||
94 | // printf("Memory mapped at address %p.\n", map_base); | 94 | // printf("Memory mapped at address %p.\n", map_base); |
95 | 95 | ||
@@ -110,7 +110,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) | |||
110 | read_result = *(volatile uint64_t*)virt_addr; | 110 | read_result = *(volatile uint64_t*)virt_addr; |
111 | break; | 111 | break; |
112 | default: | 112 | default: |
113 | bb_error_msg_and_die("bad width"); | 113 | bb_simple_error_msg_and_die("bad width"); |
114 | } | 114 | } |
115 | // printf("Value at address 0x%"OFF_FMT"X (%p): 0x%llX\n", | 115 | // printf("Value at address 0x%"OFF_FMT"X (%p): 0x%llX\n", |
116 | // target, virt_addr, | 116 | // target, virt_addr, |
@@ -136,7 +136,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) | |||
136 | // read_result = *(volatile uint64_t*)virt_addr; | 136 | // read_result = *(volatile uint64_t*)virt_addr; |
137 | break; | 137 | break; |
138 | default: | 138 | default: |
139 | bb_error_msg_and_die("bad width"); | 139 | bb_simple_error_msg_and_die("bad width"); |
140 | } | 140 | } |
141 | // printf("Written 0x%llX; readback 0x%llX\n", | 141 | // printf("Written 0x%llX; readback 0x%llX\n", |
142 | // (unsigned long long)writeval, | 142 | // (unsigned long long)writeval, |
@@ -145,7 +145,7 @@ int devmem_main(int argc UNUSED_PARAM, char **argv) | |||
145 | 145 | ||
146 | if (ENABLE_FEATURE_CLEAN_UP) { | 146 | if (ENABLE_FEATURE_CLEAN_UP) { |
147 | if (munmap(map_base, mapped_size) == -1) | 147 | if (munmap(map_base, mapped_size) == -1) |
148 | bb_perror_msg_and_die("munmap"); | 148 | bb_simple_perror_msg_and_die("munmap"); |
149 | close(fd); | 149 | close(fd); |
150 | } | 150 | } |
151 | 151 | ||
diff --git a/miscutils/fbsplash.c b/miscutils/fbsplash.c index bba22d6d1..141957809 100644 --- a/miscutils/fbsplash.c +++ b/miscutils/fbsplash.c | |||
@@ -183,7 +183,7 @@ static void fb_open(const char *strfb_device) | |||
183 | (G.scr_var.yres_virtual ?: G.scr_var.yres) * G.scr_fix.line_length, | 183 | (G.scr_var.yres_virtual ?: G.scr_var.yres) * G.scr_fix.line_length, |
184 | PROT_WRITE, MAP_SHARED, fbfd, 0); | 184 | PROT_WRITE, MAP_SHARED, fbfd, 0); |
185 | if (G.addr == MAP_FAILED) | 185 | if (G.addr == MAP_FAILED) |
186 | bb_perror_msg_and_die("mmap"); | 186 | bb_simple_perror_msg_and_die("mmap"); |
187 | 187 | ||
188 | // point to the start of the visible screen | 188 | // point to the start of the visible screen |
189 | G.addr += G.scr_var.yoffset * G.scr_fix.line_length + G.scr_var.xoffset * G.bytes_per_pixel; | 189 | G.addr += G.scr_var.yoffset * G.scr_fix.line_length + G.scr_var.xoffset * G.bytes_per_pixel; |
diff --git a/miscutils/flash_eraseall.c b/miscutils/flash_eraseall.c index a3dabdadb..c76d9a699 100644 --- a/miscutils/flash_eraseall.c +++ b/miscutils/flash_eraseall.c | |||
@@ -120,7 +120,7 @@ int flash_eraseall_main(int argc UNUSED_PARAM, char **argv) | |||
120 | if (clmlen > 8) | 120 | if (clmlen > 8) |
121 | clmlen = 8; | 121 | clmlen = 8; |
122 | if (clmlen == 0) | 122 | if (clmlen == 0) |
123 | bb_error_msg_and_die("autoplacement selected and no empty space in oob"); | 123 | bb_simple_error_msg_and_die("autoplacement selected and no empty space in oob"); |
124 | } else { | 124 | } else { |
125 | /* Legacy mode */ | 125 | /* Legacy mode */ |
126 | switch (meminfo.oobsize) { | 126 | switch (meminfo.oobsize) { |
@@ -168,9 +168,9 @@ int flash_eraseall_main(int argc UNUSED_PARAM, char **argv) | |||
168 | if (errno == EOPNOTSUPP) { | 168 | if (errno == EOPNOTSUPP) { |
169 | flags |= OPTION_N; | 169 | flags |= OPTION_N; |
170 | if (flags & IS_NAND) | 170 | if (flags & IS_NAND) |
171 | bb_error_msg_and_die("bad block check not available"); | 171 | bb_simple_error_msg_and_die("bad block check not available"); |
172 | } else { | 172 | } else { |
173 | bb_perror_msg_and_die("MEMGETBADBLOCK error"); | 173 | bb_simple_perror_msg_and_die("MEMGETBADBLOCK error"); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | } | 176 | } |
diff --git a/miscutils/hdparm.c b/miscutils/hdparm.c index 342e240fa..b453efba9 100644 --- a/miscutils/hdparm.c +++ b/miscutils/hdparm.c | |||
@@ -810,7 +810,7 @@ static void identify(uint16_t *val) | |||
810 | like_std = 3; | 810 | like_std = 3; |
811 | } else | 811 | } else |
812 | /* "Unknown device type:\n\tbits 15&14 of general configuration word 0 both set to 1.\n" */ | 812 | /* "Unknown device type:\n\tbits 15&14 of general configuration word 0 both set to 1.\n" */ |
813 | bb_error_msg_and_die("unknown device type"); | 813 | bb_simple_error_msg_and_die("unknown device type"); |
814 | 814 | ||
815 | printf("%sremovable media\n", !(val[GEN_CONFIG] & MEDIA_REMOVABLE) ? "non-" : ""); | 815 | printf("%sremovable media\n", !(val[GEN_CONFIG] & MEDIA_REMOVABLE) ? "non-" : ""); |
816 | /* Info from the specific configuration word says whether or not the | 816 | /* Info from the specific configuration word says whether or not the |
@@ -1440,7 +1440,7 @@ static void flush_buffer_cache(/*int fd*/ void) | |||
1440 | sleep(1); | 1440 | sleep(1); |
1441 | if (ioctl(fd, HDIO_DRIVE_CMD, NULL) && errno != EINVAL) { /* await completion */ | 1441 | if (ioctl(fd, HDIO_DRIVE_CMD, NULL) && errno != EINVAL) { /* await completion */ |
1442 | if (ENABLE_IOCTL_HEX2STR_ERROR) /* To be coherent with ioctl_or_warn */ | 1442 | if (ENABLE_IOCTL_HEX2STR_ERROR) /* To be coherent with ioctl_or_warn */ |
1443 | bb_perror_msg("HDIO_DRIVE_CMD"); | 1443 | bb_simple_perror_msg("HDIO_DRIVE_CMD"); |
1444 | else | 1444 | else |
1445 | bb_perror_msg("ioctl %#x failed", HDIO_DRIVE_CMD); | 1445 | bb_perror_msg("ioctl %#x failed", HDIO_DRIVE_CMD); |
1446 | } | 1446 | } |
@@ -1506,7 +1506,7 @@ static void do_time(int cache /*,int fd*/) | |||
1506 | char *buf = xmalloc(TIMING_BUF_BYTES); | 1506 | char *buf = xmalloc(TIMING_BUF_BYTES); |
1507 | 1507 | ||
1508 | if (mlock(buf, TIMING_BUF_BYTES)) | 1508 | if (mlock(buf, TIMING_BUF_BYTES)) |
1509 | bb_perror_msg_and_die("mlock"); | 1509 | bb_simple_perror_msg_and_die("mlock"); |
1510 | 1510 | ||
1511 | /* Clear out the device request queues & give them time to complete. | 1511 | /* Clear out the device request queues & give them time to complete. |
1512 | * NB: *small* delay. User is expected to have a clue and to not run | 1512 | * NB: *small* delay. User is expected to have a clue and to not run |
@@ -1857,7 +1857,7 @@ static void process_dev(char *devname) | |||
1857 | char buf[512]; | 1857 | char buf[512]; |
1858 | flush_buffer_cache(); | 1858 | flush_buffer_cache(); |
1859 | if (-1 == read(fd, buf, sizeof(buf))) | 1859 | if (-1 == read(fd, buf, sizeof(buf))) |
1860 | bb_perror_msg("read of 512 bytes failed"); | 1860 | bb_simple_perror_msg("read of 512 bytes failed"); |
1861 | } | 1861 | } |
1862 | #endif /* HDIO_DRIVE_CMD */ | 1862 | #endif /* HDIO_DRIVE_CMD */ |
1863 | if (getset_mult || get_identity) { | 1863 | if (getset_mult || get_identity) { |
@@ -1865,7 +1865,7 @@ static void process_dev(char *devname) | |||
1865 | if (ioctl(fd, HDIO_GET_MULTCOUNT, &multcount)) { | 1865 | if (ioctl(fd, HDIO_GET_MULTCOUNT, &multcount)) { |
1866 | /* To be coherent with ioctl_or_warn. */ | 1866 | /* To be coherent with ioctl_or_warn. */ |
1867 | if (getset_mult && ENABLE_IOCTL_HEX2STR_ERROR) | 1867 | if (getset_mult && ENABLE_IOCTL_HEX2STR_ERROR) |
1868 | bb_perror_msg("HDIO_GET_MULTCOUNT"); | 1868 | bb_simple_perror_msg("HDIO_GET_MULTCOUNT"); |
1869 | else | 1869 | else |
1870 | bb_perror_msg("ioctl %#x failed", HDIO_GET_MULTCOUNT); | 1870 | bb_perror_msg("ioctl %#x failed", HDIO_GET_MULTCOUNT); |
1871 | } else if (getset_mult) { | 1871 | } else if (getset_mult) { |
@@ -1985,7 +1985,7 @@ static void process_dev(char *devname) | |||
1985 | } else if (errno == -ENOMSG) | 1985 | } else if (errno == -ENOMSG) |
1986 | puts(" no identification info available"); | 1986 | puts(" no identification info available"); |
1987 | else if (ENABLE_IOCTL_HEX2STR_ERROR) /* To be coherent with ioctl_or_warn */ | 1987 | else if (ENABLE_IOCTL_HEX2STR_ERROR) /* To be coherent with ioctl_or_warn */ |
1988 | bb_perror_msg("HDIO_GET_IDENTITY"); | 1988 | bb_simple_perror_msg("HDIO_GET_IDENTITY"); |
1989 | else | 1989 | else |
1990 | bb_perror_msg("ioctl %#x failed", HDIO_GET_IDENTITY); | 1990 | bb_perror_msg("ioctl %#x failed", HDIO_GET_IDENTITY); |
1991 | } | 1991 | } |
diff --git a/miscutils/hexedit.c b/miscutils/hexedit.c index 5c2f4a555..898d77376 100644 --- a/miscutils/hexedit.c +++ b/miscutils/hexedit.c | |||
@@ -193,7 +193,7 @@ static int remap(unsigned cur_pos) | |||
193 | ); | 193 | ); |
194 | if (G.baseaddr == MAP_FAILED) { | 194 | if (G.baseaddr == MAP_FAILED) { |
195 | restore_term(); | 195 | restore_term(); |
196 | bb_perror_msg_and_die("mmap"); | 196 | bb_simple_perror_msg_and_die("mmap"); |
197 | } | 197 | } |
198 | 198 | ||
199 | G.current_byte = G.baseaddr + cur_pos; | 199 | G.current_byte = G.baseaddr + cur_pos; |
diff --git a/miscutils/i2c_tools.c b/miscutils/i2c_tools.c index 7a2e8534a..82a559f74 100644 --- a/miscutils/i2c_tools.c +++ b/miscutils/i2c_tools.c | |||
@@ -344,7 +344,7 @@ static void get_funcs_matrix(int fd, unsigned long *funcs) | |||
344 | static void check_funcs_test_end(int funcs, int pec, const char *err) | 344 | static void check_funcs_test_end(int funcs, int pec, const char *err) |
345 | { | 345 | { |
346 | if (pec && !(funcs & (I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C))) | 346 | if (pec && !(funcs & (I2C_FUNC_SMBUS_PEC | I2C_FUNC_I2C))) |
347 | bb_error_msg("warning: adapter does not support PEC"); | 347 | bb_simple_error_msg("warning: adapter does not support PEC"); |
348 | 348 | ||
349 | if (err) | 349 | if (err) |
350 | bb_error_msg_and_die( | 350 | bb_error_msg_and_die( |
@@ -392,7 +392,7 @@ static void check_read_funcs(int fd, int mode, int data_addr, int pec) | |||
392 | break; | 392 | break; |
393 | #endif /* ENABLE_I2CDUMP */ | 393 | #endif /* ENABLE_I2CDUMP */ |
394 | default: | 394 | default: |
395 | bb_error_msg_and_die("internal error"); | 395 | bb_simple_error_msg_and_die("internal error"); |
396 | } | 396 | } |
397 | check_funcs_test_end(funcs, pec, err); | 397 | check_funcs_test_end(funcs, pec, err); |
398 | } | 398 | } |
@@ -438,7 +438,7 @@ static void confirm_or_abort(void) | |||
438 | { | 438 | { |
439 | fprintf(stderr, "Continue? [y/N] "); | 439 | fprintf(stderr, "Continue? [y/N] "); |
440 | if (!bb_ask_y_confirmation()) | 440 | if (!bb_ask_y_confirmation()) |
441 | bb_error_msg_and_die("aborting"); | 441 | bb_simple_error_msg_and_die("aborting"); |
442 | } | 442 | } |
443 | 443 | ||
444 | /* | 444 | /* |
@@ -449,20 +449,20 @@ static void confirm_or_abort(void) | |||
449 | */ | 449 | */ |
450 | static void confirm_action(int bus_addr, int mode, int data_addr, int pec) | 450 | static void confirm_action(int bus_addr, int mode, int data_addr, int pec) |
451 | { | 451 | { |
452 | bb_error_msg("WARNING! This program can confuse your I2C bus"); | 452 | bb_simple_error_msg("WARNING! This program can confuse your I2C bus"); |
453 | 453 | ||
454 | /* Don't let the user break his/her EEPROMs */ | 454 | /* Don't let the user break his/her EEPROMs */ |
455 | if (bus_addr >= 0x50 && bus_addr <= 0x57 && pec) { | 455 | if (bus_addr >= 0x50 && bus_addr <= 0x57 && pec) { |
456 | bb_error_msg_and_die("this is I2C not smbus - using PEC on I2C " | 456 | bb_simple_error_msg_and_die("this is I2C not smbus - using PEC on I2C " |
457 | "devices may result in data loss, aborting"); | 457 | "devices may result in data loss, aborting"); |
458 | } | 458 | } |
459 | 459 | ||
460 | if (mode == I2C_SMBUS_BYTE && data_addr >= 0 && pec) | 460 | if (mode == I2C_SMBUS_BYTE && data_addr >= 0 && pec) |
461 | bb_error_msg("WARNING! May interpret a write byte command " | 461 | bb_simple_error_msg("WARNING! May interpret a write byte command " |
462 | "with PEC as a write byte data command"); | 462 | "with PEC as a write byte data command"); |
463 | 463 | ||
464 | if (pec) | 464 | if (pec) |
465 | bb_error_msg("PEC checking enabled"); | 465 | bb_simple_error_msg("PEC checking enabled"); |
466 | 466 | ||
467 | confirm_or_abort(); | 467 | confirm_or_abort(); |
468 | } | 468 | } |
@@ -507,7 +507,7 @@ int i2cget_main(int argc UNUSED_PARAM, char **argv) | |||
507 | case 'w': mode = I2C_SMBUS_WORD_DATA; break; | 507 | case 'w': mode = I2C_SMBUS_WORD_DATA; break; |
508 | case 'c': mode = I2C_SMBUS_BYTE; break; | 508 | case 'c': mode = I2C_SMBUS_BYTE; break; |
509 | default: | 509 | default: |
510 | bb_error_msg("invalid mode"); | 510 | bb_simple_error_msg("invalid mode"); |
511 | bb_show_usage(); | 511 | bb_show_usage(); |
512 | } | 512 | } |
513 | pec = argv[3][1] == 'p'; | 513 | pec = argv[3][1] == 'p'; |
@@ -529,7 +529,7 @@ int i2cget_main(int argc UNUSED_PARAM, char **argv) | |||
529 | if (data_addr >= 0) { | 529 | if (data_addr >= 0) { |
530 | status = i2c_smbus_write_byte(fd, data_addr); | 530 | status = i2c_smbus_write_byte(fd, data_addr); |
531 | if (status < 0) | 531 | if (status < 0) |
532 | bb_error_msg("warning - write failed"); | 532 | bb_simple_error_msg("warning - write failed"); |
533 | } | 533 | } |
534 | status = i2c_smbus_read_byte(fd); | 534 | status = i2c_smbus_read_byte(fd); |
535 | break; | 535 | break; |
@@ -542,7 +542,7 @@ int i2cget_main(int argc UNUSED_PARAM, char **argv) | |||
542 | close(fd); | 542 | close(fd); |
543 | 543 | ||
544 | if (status < 0) | 544 | if (status < 0) |
545 | bb_perror_msg_and_die("read failed"); | 545 | bb_simple_perror_msg_and_die("read failed"); |
546 | 546 | ||
547 | printf("0x%0*x\n", mode == I2C_SMBUS_WORD_DATA ? 4 : 2, status); | 547 | printf("0x%0*x\n", mode == I2C_SMBUS_WORD_DATA ? 4 : 2, status); |
548 | 548 | ||
@@ -611,7 +611,7 @@ int i2cset_main(int argc, char **argv) | |||
611 | case 'i': mode = I2C_SMBUS_I2C_BLOCK_DATA; | 611 | case 'i': mode = I2C_SMBUS_I2C_BLOCK_DATA; |
612 | break; | 612 | break; |
613 | default: | 613 | default: |
614 | bb_error_msg("invalid mode"); | 614 | bb_simple_error_msg("invalid mode"); |
615 | bb_show_usage(); | 615 | bb_show_usage(); |
616 | } | 616 | } |
617 | 617 | ||
@@ -620,11 +620,11 @@ int i2cset_main(int argc, char **argv) | |||
620 | || mode == I2C_SMBUS_I2C_BLOCK_DATA | 620 | || mode == I2C_SMBUS_I2C_BLOCK_DATA |
621 | ) { | 621 | ) { |
622 | if (pec && mode == I2C_SMBUS_I2C_BLOCK_DATA) | 622 | if (pec && mode == I2C_SMBUS_I2C_BLOCK_DATA) |
623 | bb_error_msg_and_die( | 623 | bb_simple_error_msg_and_die( |
624 | "PEC not supported for I2C " | 624 | "PEC not supported for I2C " |
625 | "block writes"); | 625 | "block writes"); |
626 | if (opts & opt_m) | 626 | if (opts & opt_m) |
627 | bb_error_msg_and_die( | 627 | bb_simple_error_msg_and_die( |
628 | "mask not supported for block " | 628 | "mask not supported for block " |
629 | "writes"); | 629 | "writes"); |
630 | } | 630 | } |
@@ -685,7 +685,7 @@ int i2cset_main(int argc, char **argv) | |||
685 | } | 685 | } |
686 | 686 | ||
687 | if (tmpval < 0) | 687 | if (tmpval < 0) |
688 | bb_perror_msg_and_die("can't read old value"); | 688 | bb_simple_perror_msg_and_die("can't read old value"); |
689 | 689 | ||
690 | val = (val & mask) | (tmpval & ~mask); | 690 | val = (val & mask) | (tmpval & ~mask); |
691 | 691 | ||
@@ -724,7 +724,7 @@ int i2cset_main(int argc, char **argv) | |||
724 | break; | 724 | break; |
725 | } | 725 | } |
726 | if (status < 0) | 726 | if (status < 0) |
727 | bb_perror_msg_and_die("write failed"); | 727 | bb_simple_perror_msg_and_die("write failed"); |
728 | 728 | ||
729 | if (pec) | 729 | if (pec) |
730 | i2c_set_pec(fd, 0); /* Clear PEC. */ | 730 | i2c_set_pec(fd, 0); /* Clear PEC. */ |
@@ -978,12 +978,12 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
978 | case 's': mode = I2C_SMBUS_BLOCK_DATA; break; | 978 | case 's': mode = I2C_SMBUS_BLOCK_DATA; break; |
979 | case 'i': mode = I2C_SMBUS_I2C_BLOCK_DATA; break; | 979 | case 'i': mode = I2C_SMBUS_I2C_BLOCK_DATA; break; |
980 | default: | 980 | default: |
981 | bb_error_msg_and_die("invalid mode"); | 981 | bb_simple_error_msg_and_die("invalid mode"); |
982 | } | 982 | } |
983 | 983 | ||
984 | if (argv[2][1] == 'p') { | 984 | if (argv[2][1] == 'p') { |
985 | if (argv[2][0] == 'W' || argv[2][0] == 'i') { | 985 | if (argv[2][0] == 'W' || argv[2][0] == 'i') { |
986 | bb_error_msg_and_die( | 986 | bb_simple_error_msg_and_die( |
987 | "pec not supported for -W and -i"); | 987 | "pec not supported for -W and -i"); |
988 | } else { | 988 | } else { |
989 | pec = 1; | 989 | pec = 1; |
@@ -994,7 +994,7 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
994 | if (opts & opt_r) { | 994 | if (opts & opt_r) { |
995 | first = strtol(opt_r_str, &dash, 0); | 995 | first = strtol(opt_r_str, &dash, 0); |
996 | if (dash == opt_r_str || *dash != '-' || first > 0xff) | 996 | if (dash == opt_r_str || *dash != '-' || first > 0xff) |
997 | bb_error_msg_and_die("invalid range"); | 997 | bb_simple_error_msg_and_die("invalid range"); |
998 | last = xstrtou_range(++dash, 0, first, 0xff); | 998 | last = xstrtou_range(++dash, 0, first, 0xff); |
999 | 999 | ||
1000 | /* Range is not available for every mode. */ | 1000 | /* Range is not available for every mode. */ |
@@ -1007,7 +1007,7 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
1007 | break; | 1007 | break; |
1008 | /* Fall through */ | 1008 | /* Fall through */ |
1009 | default: | 1009 | default: |
1010 | bb_error_msg_and_die( | 1010 | bb_simple_error_msg_and_die( |
1011 | "range not compatible with selected mode"); | 1011 | "range not compatible with selected mode"); |
1012 | } | 1012 | } |
1013 | } | 1013 | } |
@@ -1032,7 +1032,7 @@ int i2cdump_main(int argc UNUSED_PARAM, char **argv) | |||
1032 | if (mode == I2C_SMBUS_BYTE) { | 1032 | if (mode == I2C_SMBUS_BYTE) { |
1033 | res = i2c_smbus_write_byte(fd, first); | 1033 | res = i2c_smbus_write_byte(fd, first); |
1034 | if (res < 0) | 1034 | if (res < 0) |
1035 | bb_perror_msg_and_die("write start address"); | 1035 | bb_simple_perror_msg_and_die("write start address"); |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | dump_data(fd, mode, first, last, block, blen); | 1038 | dump_data(fd, mode, first, last, block, blen); |
@@ -1398,7 +1398,7 @@ static void check_i2c_func(int fd) | |||
1398 | get_funcs_matrix(fd, &funcs); | 1398 | get_funcs_matrix(fd, &funcs); |
1399 | 1399 | ||
1400 | if (!(funcs & I2C_FUNC_I2C)) | 1400 | if (!(funcs & I2C_FUNC_I2C)) |
1401 | bb_error_msg_and_die("adapter does not support I2C transfers"); | 1401 | bb_simple_error_msg_and_die("adapter does not support I2C transfers"); |
1402 | } | 1402 | } |
1403 | 1403 | ||
1404 | //usage:#define i2ctransfer_trivial_usage | 1404 | //usage:#define i2ctransfer_trivial_usage |
@@ -1451,7 +1451,7 @@ int i2ctransfer_main(int argc UNUSED_PARAM, char **argv) | |||
1451 | char *end; | 1451 | char *end; |
1452 | 1452 | ||
1453 | if (nmsgs >= I2C_RDWR_IOCTL_MAX_MSGS) | 1453 | if (nmsgs >= I2C_RDWR_IOCTL_MAX_MSGS) |
1454 | bb_error_msg_and_die("too many messages, max: "I2C_RDWR_IOCTL_MAX_MSGS_STR); | 1454 | bb_simple_error_msg_and_die("too many messages, max: "I2C_RDWR_IOCTL_MAX_MSGS_STR); |
1455 | 1455 | ||
1456 | flags = 0; | 1456 | flags = 0; |
1457 | arg_ptr = *argv; | 1457 | arg_ptr = *argv; |
diff --git a/miscutils/inotifyd.c b/miscutils/inotifyd.c index ec0321941..8bff86ae5 100644 --- a/miscutils/inotifyd.c +++ b/miscutils/inotifyd.c | |||
@@ -117,7 +117,7 @@ int inotifyd_main(int argc, char **argv) | |||
117 | // open inotify | 117 | // open inotify |
118 | pfd.fd = inotify_init(); | 118 | pfd.fd = inotify_init(); |
119 | if (pfd.fd < 0) | 119 | if (pfd.fd < 0) |
120 | bb_perror_msg_and_die("no kernel support"); | 120 | bb_simple_perror_msg_and_die("no kernel support"); |
121 | 121 | ||
122 | // setup watches | 122 | // setup watches |
123 | while (*++argv) { | 123 | while (*++argv) { |
diff --git a/miscutils/nandwrite.c b/miscutils/nandwrite.c index 09bcaaf63..f111c6363 100644 --- a/miscutils/nandwrite.c +++ b/miscutils/nandwrite.c | |||
@@ -101,7 +101,7 @@ static unsigned next_good_eraseblock(int fd, struct mtd_info_user *meminfo, | |||
101 | 101 | ||
102 | if (block_offset >= meminfo->size) { | 102 | if (block_offset >= meminfo->size) { |
103 | if (IS_NANDWRITE) | 103 | if (IS_NANDWRITE) |
104 | bb_error_msg_and_die("not enough space in MTD device"); | 104 | bb_simple_error_msg_and_die("not enough space in MTD device"); |
105 | return block_offset; /* let the caller exit */ | 105 | return block_offset; /* let the caller exit */ |
106 | } | 106 | } |
107 | offs = block_offset; | 107 | offs = block_offset; |
@@ -174,7 +174,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
174 | meminfo_writesize = meminfo.writesize; | 174 | meminfo_writesize = meminfo.writesize; |
175 | 175 | ||
176 | if (mtdoffset & (meminfo_writesize - 1)) | 176 | if (mtdoffset & (meminfo_writesize - 1)) |
177 | bb_error_msg_and_die("start address is not page aligned"); | 177 | bb_simple_error_msg_and_die("start address is not page aligned"); |
178 | 178 | ||
179 | filebuf = xmalloc(meminfo_writesize); | 179 | filebuf = xmalloc(meminfo_writesize); |
180 | oobbuf = xmalloc(meminfo.oobsize); | 180 | oobbuf = xmalloc(meminfo.oobsize); |
@@ -248,9 +248,9 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
248 | } | 248 | } |
249 | if (cnt < meminfo_writesize) { | 249 | if (cnt < meminfo_writesize) { |
250 | if (IS_NANDDUMP) | 250 | if (IS_NANDDUMP) |
251 | bb_error_msg_and_die("short read"); | 251 | bb_simple_error_msg_and_die("short read"); |
252 | if (!(opts & OPT_p)) | 252 | if (!(opts & OPT_p)) |
253 | bb_error_msg_and_die("input size is not rounded up to page size, " | 253 | bb_simple_error_msg_and_die("input size is not rounded up to page size, " |
254 | "use -p to zero pad"); | 254 | "use -p to zero pad"); |
255 | /* zero pad to end of write block */ | 255 | /* zero pad to end of write block */ |
256 | memset(filebuf + cnt, 0, meminfo_writesize - cnt); | 256 | memset(filebuf + cnt, 0, meminfo_writesize - cnt); |
@@ -273,7 +273,7 @@ int nandwrite_main(int argc UNUSED_PARAM, char **argv) | |||
273 | /* We filled entire MTD, but did we reach EOF on input? */ | 273 | /* We filled entire MTD, but did we reach EOF on input? */ |
274 | if (full_read(STDIN_FILENO, filebuf, meminfo_writesize) != 0) { | 274 | if (full_read(STDIN_FILENO, filebuf, meminfo_writesize) != 0) { |
275 | /* no */ | 275 | /* no */ |
276 | bb_error_msg_and_die("not enough space in MTD device"); | 276 | bb_simple_error_msg_and_die("not enough space in MTD device"); |
277 | } | 277 | } |
278 | } | 278 | } |
279 | 279 | ||
diff --git a/miscutils/rfkill.c b/miscutils/rfkill.c index 766bad8c7..db7c83750 100644 --- a/miscutils/rfkill.c +++ b/miscutils/rfkill.c | |||
@@ -88,7 +88,7 @@ int rfkill_main(int argc UNUSED_PARAM, char **argv) | |||
88 | 88 | ||
89 | rf_fd = device_open("/dev/rfkill", mode); | 89 | rf_fd = device_open("/dev/rfkill", mode); |
90 | if (rf_fd < 0) | 90 | if (rf_fd < 0) |
91 | bb_perror_msg_and_die("/dev/rfkill"); | 91 | bb_simple_perror_msg_and_die("/dev/rfkill"); |
92 | 92 | ||
93 | if (rf_opt & OPT_l) { | 93 | if (rf_opt & OPT_l) { |
94 | while (full_read(rf_fd, &event, sizeof(event)) == RFKILL_EVENT_SIZE_V1) { | 94 | while (full_read(rf_fd, &event, sizeof(event)) == RFKILL_EVENT_SIZE_V1) { |
diff --git a/miscutils/rx.c b/miscutils/rx.c index 874a3f0a3..319ec1d49 100644 --- a/miscutils/rx.c +++ b/miscutils/rx.c | |||
@@ -120,7 +120,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
120 | /* Write previously received block */ | 120 | /* Write previously received block */ |
121 | errno = 0; | 121 | errno = 0; |
122 | if (full_write(file_fd, blockBuf, blockLength) != blockLength) { | 122 | if (full_write(file_fd, blockBuf, blockLength) != blockLength) { |
123 | bb_perror_msg(bb_msg_write_error); | 123 | bb_simple_perror_msg(bb_msg_write_error); |
124 | goto fatal; | 124 | goto fatal; |
125 | } | 125 | } |
126 | 126 | ||
@@ -150,7 +150,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
150 | goto timeout; | 150 | goto timeout; |
151 | 151 | ||
152 | if (blockNo != (255 - blockNoOnesCompl)) { | 152 | if (blockNo != (255 - blockNoOnesCompl)) { |
153 | bb_error_msg("bad block ones compl"); | 153 | bb_simple_error_msg("bad block ones compl"); |
154 | goto error; | 154 | goto error; |
155 | } | 155 | } |
156 | 156 | ||
@@ -229,7 +229,7 @@ static int receive(/*int read_fd, */int file_fd) | |||
229 | do_crc = 0; | 229 | do_crc = 0; |
230 | goto timeout; | 230 | goto timeout; |
231 | } | 231 | } |
232 | bb_error_msg("too many errors; giving up"); | 232 | bb_simple_error_msg("too many errors; giving up"); |
233 | fatal: | 233 | fatal: |
234 | /* 5 CAN followed by 5 BS. Don't try too hard... */ | 234 | /* 5 CAN followed by 5 BS. Don't try too hard... */ |
235 | safe_write(write_fd, "\030\030\030\030\030\010\010\010\010\010", 10); | 235 | safe_write(write_fd, "\030\030\030\030\030\010\010\010\010\010", 10); |
diff --git a/miscutils/time.c b/miscutils/time.c index 064888ab8..d15d363f3 100644 --- a/miscutils/time.c +++ b/miscutils/time.c | |||
@@ -88,7 +88,7 @@ static void resuse_end(pid_t pid, resource_t *resp) | |||
88 | * returns the child process, set the time the command finished. */ | 88 | * returns the child process, set the time the command finished. */ |
89 | while ((caught = wait3(&resp->waitstatus, 0, &resp->ru)) != pid) { | 89 | while ((caught = wait3(&resp->waitstatus, 0, &resp->ru)) != pid) { |
90 | if (caught == -1 && errno != EINTR) { | 90 | if (caught == -1 && errno != EINTR) { |
91 | bb_perror_msg("wait"); | 91 | bb_simple_perror_msg("wait"); |
92 | return; | 92 | return; |
93 | } | 93 | } |
94 | } | 94 | } |
diff --git a/miscutils/ubi_tools.c b/miscutils/ubi_tools.c index dc7af25a4..8318df0f9 100644 --- a/miscutils/ubi_tools.c +++ b/miscutils/ubi_tools.c | |||
@@ -234,10 +234,10 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv) | |||
234 | // bb_error_msg_and_die("%s invalid maximum size calculated", "UBI"); | 234 | // bb_error_msg_and_die("%s invalid maximum size calculated", "UBI"); |
235 | } else | 235 | } else |
236 | if (!(opts & OPTION_s)) | 236 | if (!(opts & OPTION_s)) |
237 | bb_error_msg_and_die("size not specified"); | 237 | bb_simple_error_msg_and_die("size not specified"); |
238 | 238 | ||
239 | if (!(opts & OPTION_N)) | 239 | if (!(opts & OPTION_N)) |
240 | bb_error_msg_and_die("name not specified"); | 240 | bb_simple_error_msg_and_die("name not specified"); |
241 | 241 | ||
242 | /* the structure is memset(0) above */ | 242 | /* the structure is memset(0) above */ |
243 | mkvol_req.vol_id = vol_id; | 243 | mkvol_req.vol_id = vol_id; |
@@ -264,7 +264,7 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv) | |||
264 | //usage: "\n -N VOLNAME Volume name" | 264 | //usage: "\n -N VOLNAME Volume name" |
265 | if (do_rmvol) { | 265 | if (do_rmvol) { |
266 | if (!(opts & (OPTION_n|OPTION_N))) | 266 | if (!(opts & (OPTION_n|OPTION_N))) |
267 | bb_error_msg_and_die("volume id not specified"); | 267 | bb_simple_error_msg_and_die("volume id not specified"); |
268 | 268 | ||
269 | if (opts & OPTION_N) { | 269 | if (opts & OPTION_N) { |
270 | unsigned num = ubi_devnum_from_devname(ubi_ctrl); | 270 | unsigned num = ubi_devnum_from_devname(ubi_ctrl); |
@@ -288,9 +288,9 @@ int ubi_tools_main(int argc UNUSED_PARAM, char **argv) | |||
288 | //usage: "\n -s SIZE Size in bytes" | 288 | //usage: "\n -s SIZE Size in bytes" |
289 | if (do_rsvol) { | 289 | if (do_rsvol) { |
290 | if (!(opts & OPTION_s)) | 290 | if (!(opts & OPTION_s)) |
291 | bb_error_msg_and_die("size not specified"); | 291 | bb_simple_error_msg_and_die("size not specified"); |
292 | if (!(opts & OPTION_n)) | 292 | if (!(opts & OPTION_n)) |
293 | bb_error_msg_and_die("volume id not specified"); | 293 | bb_simple_error_msg_and_die("volume id not specified"); |
294 | 294 | ||
295 | rsvol_req.bytes = size_bytes; /* signed int64_t */ | 295 | rsvol_req.bytes = size_bytes; /* signed int64_t */ |
296 | rsvol_req.vol_id = vol_id; | 296 | rsvol_req.vol_id = vol_id; |
diff --git a/miscutils/ubirename.c b/miscutils/ubirename.c index 21bd10111..e7c56640c 100644 --- a/miscutils/ubirename.c +++ b/miscutils/ubirename.c | |||
@@ -72,7 +72,7 @@ int ubirename_main(int argc, char **argv) | |||
72 | rnvol = xzalloc(sizeof(*rnvol)); | 72 | rnvol = xzalloc(sizeof(*rnvol)); |
73 | rnvol->count = --argc; | 73 | rnvol->count = --argc; |
74 | if (argc > ARRAY_SIZE(rnvol->ents)) | 74 | if (argc > ARRAY_SIZE(rnvol->ents)) |
75 | bb_error_msg_and_die("too many renames requested"); | 75 | bb_simple_error_msg_and_die("too many renames requested"); |
76 | 76 | ||
77 | ubi_devname = argv[1]; | 77 | ubi_devname = argv[1]; |
78 | ubi_devnum = ubi_devnum_from_devname(ubi_devname); | 78 | ubi_devnum = ubi_devnum_from_devname(ubi_devname); |