aboutsummaryrefslogtreecommitdiff
path: root/miscutils (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
| * less: document -S flag and make it independently configurableRon Yorston2015-07-191-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The -S flag, to cause long lines to be truncated, was enabled by FEATURE_LESS_DASHCMD. This is non-obvious and -S is useful even if the '-' command isn't enabled. function old new delta .rodata 156045 156077 +32 packed_usage 30223 30244 +21 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/0 up/down: 53/0) Total: 53 bytes Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-07-144-169/+202
|\|
| * Removes stray empty line from codeManinder Singh2015-07-131-1/+0
| | | | | | | | | | | | | | | | | | This patch removes stray empty line from busybox code reported by script find_stray_empty_lines Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Akhilesh Kumar <akhilesh.k@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: use break instead of goto in list_i2c_busses_and_exit()Bartosz Golaszewski2015-06-071-2/+1
| | | | | | | | | | | | | | | | Since there are now more statements in the if block after the while loop in list_i2c_busses_and_exit(), there's no need for a label. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdump: code reworkBartosz Golaszewski2015-06-071-149/+167
| | | | | | | | | | | | | | | | | | Split i2cdump_main() into shorter functions. Simplify the code a bit. Make block an array of ints so that we can store negative results of read functions (fixes a bug found by Denys Vlasenko). Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: add a check for (mode == DETECT_MODE_AUTO)Bartosz Golaszewski2015-06-071-1/+3
| | | | | | | | | | | | | | | | We should only warn the user about addresses to be skipped if (mode == DETECT_MODE_AUTO). Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: don't scan non-regular addresses without the '-a' optionBartosz Golaszewski2015-06-071-2/+4
| | | | | | | | | | | | | | | | | | Addresses 0x00-0x02 shouldn't be scanned by default. This patch makes 'first' default to 0x03 and only enables lower addresses if '-a' option is passed Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cdetect: don't die on addresses already in use by driversBartosz Golaszewski2015-06-071-12/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We can't use i2c_set_slave_addr() in i2cdetect, as we have to check for EBUSY after calling ioctl(I2C_SLAVE) and print 'UU' on busy addresses instead of bailing-out. While we're at it: reorder definitions of local vars in i2cdetect_main(). function old new delta i2cdetect_main 703 744 +41 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/0 up/down: 41/0) Total: 41 bytes text data bss dec hex filename 826097 4164 9584 839845 cd0a5 busybox_old 826145 4164 9584 839893 cd0d5 busybox_unstripped Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * typo fixesManinder Singh2015-05-251-1/+1
| | | | | | | | | | Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: fix "dc p" prinitng bogus dataDenys Vlasenko2015-05-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | function old new delta check_under - 20 +20 print_no_pop 27 32 +5 pop 33 24 -9 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/1 up/down: 25/-9) Total: 16 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Enable seamless compression for WIN32Ron Yorston2015-05-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the archival code we pretend that WIN32 is a no-MMU platform and use the new mingw_popen_fd routine to pipe data to/from commands to compress/decompress. The pretence is maintained by redefining MMU macros in bb_archive.h. This is mostly used in the archival code but there are a handful of places where it's used to access public interfaces. The symbol BB_ARCHIVE_PUBLIC is defined in these places. With these changes: tar supports seamless compression/decompression rpm2cpio and dpkg-deb can be enabled
* | Merge branch 'busybox' into mergeFRPRon Yorston2015-05-185-23/+34
|\|
| * i2c-tools: only try /dev/i2c/* if opening /dev/i2c-* fails with ENOENTBartosz Golaszewski2015-05-111-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Trying to access /dev/i2c/* on every error after opening /dev/i2c-* can mislead users who e.g. don't have root access. Instead of bailing-out with "permission denied" we currently print "no such file or directory". Fix it by trying open("/dev/i2c/%d") only if we got ENOENT. Upstream i2cdetect tries to get any info it can from /sys and /proc even when invoked by an unprivileged user, but we don't want to add unnecessary bloat. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2c-tools: fix 'i2cdetect -l'Bartosz Golaszewski2015-05-111-1/+4
| | | | | | | | | | | | | | | | Calling 'i2cdetect -l' only displays usage and exits. Fix it by correctly parsing command-line arguments. Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * *: Switch to POSIX utmpx APIBernhard Reutner-Fischer2015-04-024-20/+24
| | | | | | | | | | | | | | | | | | | | UTMP is SVID legacy, UTMPX is mandated by POSIX. Glibc and uClibc have identical layout of UTMP and UTMPX, both of these libc treat _PATH_UTMPX as _PATH_UTMP so from a user-perspective nothing changes except the names of the API entrypoints. Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
* | Merge branch 'busybox' into mergeRon Yorston2015-03-149-50/+1446
|\| | | | | | | | | | | Conflicts: coreutils/od_bloaty.c libbb/lineedit.c
| * libbb: introduce and use is_prefixed_with()Denys Vlasenko2015-03-127-19/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta is_prefixed_with - 18 +18 complete_username 78 77 -1 man_main 737 735 -2 fsck_device 429 427 -2 unpack_ar_archive 80 76 -4 strip_unsafe_prefix 105 101 -4 singlemount 1054 1050 -4 rtc_adjtime_is_utc 90 86 -4 resolve_mount_spec 88 84 -4 parse_one_line 1029 1025 -4 parse_conf 1460 1456 -4 may_wakeup 83 79 -4 loadkmap_main 219 215 -4 get_irqs_from_stat 103 99 -4 get_header_cpio 913 909 -4 findfs_main 79 75 -4 fbsplash_main 1230 1226 -4 load_crontab 776 771 -5 expand_vars_to_list 1151 1146 -5 date_main 881 876 -5 skip_dev_pfx 30 24 -6 make_device 2199 2193 -6 complete_cmd_dir_file 773 767 -6 run_applet_and_exit 715 708 -7 uudecode_main 321 313 -8 pwdx_main 197 189 -8 execute 568 560 -8 i2cdetect_main 1186 1176 -10 procps_scan 1242 1230 -12 procps_read_smaps 1017 1005 -12 process_module 746 734 -12 patch_main 1903 1891 -12 nfsmount 3572 3560 -12 stack_machine 126 112 -14 process_timer_stats 449 435 -14 match_fstype 111 97 -14 do_ipaddr 1344 1330 -14 open_list_and_close 359 343 -16 get_header_tar 1795 1779 -16 prepend_new_eth_table 340 323 -17 fsck_main 1811 1794 -17 find_iface_state 56 38 -18 dnsd_main 1321 1303 -18 base_device 179 158 -21 find_keyword 104 82 -22 handle_incoming_and_exit 2785 2762 -23 parse_and_put_prompt 774 746 -28 modinfo 347 317 -30 find_action 204 171 -33 update_passwd 1470 1436 -34 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/49 up/down: 18/-540) Total: -522 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * trivial code shrinkDenys Vlasenko2015-02-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | function old new delta rdate_main 246 251 +5 show_entry 291 287 -4 daytime_stream 44 39 -5 packed_usage 30176 30168 -8 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 5/-17) Total: -12 bytes text data bss dec hex filename 929453 932 17684 948069 e7765 busybox_old 929411 932 17684 948027 e773b busybox_unstripped Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * dc: tweak parsingBernhard Reutner-Fischer2015-02-161-30/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.debian.org/538685 dc requires whitespace between language elements. We were requiring 1 2 + p instead of the abbreviated 1 2+p (for example). function old new delta stack_machine 97 126 +29 dc_main 117 79 -38 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/1 up/down: 29/-38) Total: -9 bytes Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * i2cget, i2cset, i2cdetect, i2cdump: new appletsBartosz Golaszewski2015-02-101-0/+1396
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a minimal implementation of i2cget, i2cset, i2cdump and i2cdetect tools. Supports most features of upstream i2c-tools. function old new delta i2cdump_main - 1444 +1444 i2cset_main - 1239 +1239 i2cdetect_main - 611 +611 list_i2c_busses_and_exit - 532 +532 packed_usage 29975 30438 +463 i2cget_main - 380 +380 check_read_funcs - 140 +140 i2c_funcs_tab - 128 +128 confirm_action - 100 +100 i2c_dev_open - 57 +57 i2c_smbus_access - 44 +44 confirm_or_abort - 43 +43 check_funcs_test_end - 39 +39 i2c_smbus_read_word_data - 38 +38 i2c_smbus_read_byte_data - 38 +38 i2c_smbus_read_byte - 37 +37 i2c_set_slave_addr - 32 +32 applet_names 2480 2512 +32 adap_descs - 32 +32 i2c_set_pec - 29 +29 get_funcs_matrix - 21 +21 i2c_parse_data_addr - 18 +18 i2c_parse_bus_addr - 18 +18 i2c_bus_lookup - 18 +18 i2c_smbus_write_byte - 17 +17 applet_main 1440 1456 +16 will_skip - 14 +14 no_support - 11 +11 applet_nameofs 720 728 +8 applet_install_loc 180 182 +2 ------------------------------------------------------------------------------ (add/remove: 26/0 grow/shrink: 5/0 up/down: 5601/0) Total: 5601 bytes Signed-off-by: Bartosz Golaszewski <bartekgola@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * ubiattach: add option -OMicke Prag2015-01-301-4/+8
| | | | | | | | | | | | | | | | Some images do not have the default VID offset. The option -O must be used to attach such images. Signed-off-by: Micke Prag <micke.prag@telldus.se> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge commit '1_23_0' into mergeTIG_1_23_0Ron Yorston2015-01-231-4/+7
|\| | | | | | | | | Conflicts: libbb/lineedit.c
| * nanddump: don't show --bb in usage when disabledBaruch Siach2014-12-181-1/+3
| | | | | | | | | | | | | | | | The --bb options now depends on LONG_OPTS. Omit mentions of --bb from usage text when LONG_OPTS is disabled. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nandwrite: fix build when long options are disabledBaruch Siach2014-12-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | The Required_argument macro is only defined when long options are enabled. Fixes the following build error: miscutils/nandwrite.c: In function 'nandwrite_main': miscutils/nandwrite.c:120:10: error: expected ',' or ';' before 'Required_argument' Reported-by: Christian Kästner <kaestner at cs.cmu.edu> Signed-off-by: Baruch Siach <baruch at tkos.co.il> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-12-142-42/+56
|\| | | | | | | | | | | | | Conflicts: archival/libarchive/open_transformer.c libbb/lineedit.c miscutils/man.c
| * flashcp: change BUFSIZE to 4kJacob Kjaergaard2014-12-101-1/+1
| | | | | | | | | | | | | | | | some flash partitions can be smaller than the existing BUFSIZE thus write BUFSIZE will fail with "no space left on device" Signed-off-by: Jacob Kjaergaard <jacob.kjaergaard@prevas.dk> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * man: do not mangle $MANPATH in memoryDenys Vlasenko2014-11-301-3/+5
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * man: accept a list of dirs in $MANPATHDenys Vlasenko2014-11-271-37/+49
| | | | | | | | | | | | | | | | | | | | function old new delta add_MANPATH - 143 +143 man_main 852 731 -121 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 0/1 up/down: 143/-121) Total: 22 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-10-065-64/+131
|\|
| * ubiupdatevol: fix -t to not require an option. Closes 7466Denys Vlasenko2014-09-251-9/+14
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: make -E workAaro Koskinen2014-09-231-1/+8
| | | | | | | | | | | | | | | | function old new delta buffer_print 71 104 +33 Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: trivial code shrinkDenys Vlasenko2014-09-221-4/+3
| | | | | | | | | | | | | | function old new delta read_lines 715 695 -20 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: move "retry-on-EAGAIN" logic closer to read opsDenys Vlasenko2014-09-221-26/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes "G" (goto end of input) command work as well as /search_for_nonexistent_string: both will read to EOF now even from somewhat slow input (such as kernel's "git log"). function old new delta ndelay_on 35 43 +8 ndelay_off 35 43 +8 read_lines 695 691 -4 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 16/-4) Total: 12 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: disable "suppress empty wraparound" optimizationDenys Vlasenko2014-09-211-0/+6
| | | | | | | | | | | | It is buggy wrt another use case... Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * taskset: fix logic error in "if it doesn't start with 0x..."Denys Vlasenko2014-08-311-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * taskset: support CPU masks for more than 64 CPUsDenys Vlasenko2014-08-173-24/+79
| | | | | | | | | | | | | | function old new delta taskset_main 522 631 +109 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-06-301-15/+48
|\|
| * nanddump: change default to --bb=skipbadRichard Genoud2014-06-251-1/+1
| | | | | | | | | | | | | | | | since mtd-utils 1.4.7, the default behaviour of nanddump is skipbad (commit 2521d4f1b6b9866a9c89f3c11a4f6a3d763ff1d7) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: kill -b Omit bad blockRichard Genoud2014-06-251-26/+12
| | | | | | | | | | | | | | | | since mtd-utils 1.4.7, the omit bad block method has been removed. (cf commit d8b8f780ec3c916f3990e9227d6bfbb22bf42ef8) Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: add options --bb=skipbad and padbadRichard Genoud2014-06-251-9/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In mtd-utils, the bad block options changed in favor of --bb=[skipbad|padbad|dumpbad] and omitbad has been removed. This patch add the --bb=skipbad and padbad methods to busybox' nanddump. padbad is the current default behaviour. The difference between skipbad and omitbad is this one: On a 16K block NAND, if the 1st block of mtd0 is bad, we'll have: nanddump -b -l 16384 /dev/mtd0 | wc -c 0 nanddump --bb=skipbad -l 16384 /dev/mtd0 | wc -c 16384 <- data from 1st good block Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * nanddump: correct rounding to next page (lead to infinite loop)Richard Genoud2014-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rounding to next page formula was wrong: ex: (len | ~(meminfo->writesize - 1)) + 1; len=128K writesize=4K (len | ~(meminfo->writesize - 1)) + 1 => 4 294 963 201 ?! correct rounding formula: ((len - 1) | (meminfo->writesize - 1)) + 1 => 128K len = 130K ((len - 1) | (meminfo->writesize - 1)) + 1 => 132K modprobe nandsim parts="20,20" badblocks="22,23" without patch: nanddump /dev/mtd1 | wc -c [...] infinite loop with the patch: nanddump /dev/mtd1 | wc -c 327680 Signed-off-by: Richard Genoud <richard.genoud@gmail.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-05-065-198/+232
|\| | | | | | | | | | | | | Conflicts: debianutils/which.c editors/vi.c libbb/executable.c
| * Fix compile failuresDenys Vlasenko2014-05-021-1/+1
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: implement "SHELL=prog" in crontab. Export LOGNAME as POSIX wantsDenys Vlasenko2014-04-301-24/+48
| | | | | | | | | | | | | | | | | | | | | | function old new delta fork_job 343 456 +113 load_crontab 688 777 +89 crond_main 1456 1434 -22 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 2/1 up/down: 202/-22) Total: 180 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: simplify logging codeDenys Vlasenko2014-04-301-87/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Slight change in behavior: now -l 5 will enable the same messages formerly only enabled for -d 5. (Old behavior was non-sensical). function old new delta reopen_logfile_to_stderr - 34 +34 log8 - 26 +26 log7 - 26 +26 log5 - 26 +26 load_crontab 706 688 -18 rescan_crontab_dir 157 137 -20 crond_main 1486 1456 -30 fork_job 389 343 -46 crondlog 108 38 -70 ------------------------------------------------------------------------------ (add/remove: 4/0 grow/shrink: 0/5 up/down: 112/-184) Total: -72 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * libbb: make syslog level for bb_error_msg's configurable. use it in crondDenys Vlasenko2014-04-301-15/+8
| | | | | | | | | | | | | | | | | | function old new delta bb_verror_msg 380 386 +6 syslog_level - 1 +1 crondlog 165 108 -57 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * crond: tweak help text, make course less crypticDenys Vlasenko2014-04-303-61/+68
| | | | | | | | | | | | | | | | | | function old new delta packed_usage 29736 29740 +4 crond_main 1485 1486 +1 load_crontab 712 706 -6 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * adjtimex: make its help text and printed data a bit less crypticDenys Vlasenko2014-04-171-13/+12
| | | | | | | | Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
| * less: fix bugs discovered with "git log -p | less -m" on kernel treeDenys Vlasenko2014-04-131-14/+24
| | | | | | | | | | | | | | function old new delta read_lines 685 733 +48 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
* | Merge branch 'busybox' into mergeRon Yorston2014-03-113-16/+30
|\|