aboutsummaryrefslogtreecommitdiff
path: root/docs/Serial-Programming-HOWTO.txt (unfollow)
Commit message (Collapse)AuthorFilesLines
2015-07-26win32: remove setitimer implementation and SIGALRM handlingRon Yorston2-133/+1
Commit 69f49ea imported a setitimer implementation from git. Since setitimer isn't used at all in BusyBox it can be removed. The same technique could be used to implement alarm but nothing in the WIN32 port uses that (yet).
2015-07-17winansi: fixes to cursor positioning, screen clearingRon Yorston1-4/+15
It seems that the cursor positioning escape sequence 'ESC[n;mH' allows n and m values of 0 or 1 to represent the leftmost/topmost position. Allow for this and also fix handling of missing values. When the screen is cleared using FillConsoleOutputCharacterA it's also necessary to make explicit calls to FillConsoleOutputAttribute to reset attributes.
2015-07-15mingw: enable support for IPv6Ron Yorston5-6/+263
Import inet_pton from gnulib and enable IPv6 support by default.
2015-07-15win32: silence some compiler warningsRon Yorston6-14/+22
2015-07-15archival: provide dummy check_errors_in_children for WIN32Ron Yorston3-5/+10
2015-07-14Remove a couple of commentsRon Yorston1-2/+0
2015-07-14mingw: include unwind tables in 64-bit build by defaultRon Yorston1-1/+1
Add "-funwind-tables -fasynchronous-unwind-tables" to CFLAGS for the 64-bit build, overriding the usual default. Without this change setjmp/longjmp don't work.
2015-07-14ash: store pointers to be fixed as pointers, not intRon Yorston1-14/+16
The data block passed during forkshell includes the nodeptr array of (internal) pointers to (other internal) pointers that need to be fixed. Store the pointers as pointers, not int.
2015-07-13ipcalc: enable by default for WIN32Ron Yorston6-15/+16
2015-07-13ash: use alloca to get rid of setjmpRon Yorston1-34/+2
Now that the only thing protected by setjmp/longjmp is the saved string, we can allocate it on the stack to get rid of the jump. Based on commit bd35d8e from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu. function old new delta readtoken1 3182 3116 -66 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 0/1 up/down: 0/-66) Total: -66 bytes Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-13fix file modeDenys Vlasenko1-0/+0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-13ash: remove parsebackquote flagRon Yorston3-7/+3
Commit 503a0b8 from git://git.kernel.org/pub/scm/utils/dash/dash.git by Herbert Xu says: >The parsebackquote flag is only used in a test where it always has the >value zero. So we can remove it altogether. The first statement is incorrect: parsebackquote is non-zero when backquotes (as opposed to $(...)) are used for command substitution. It is possible for the test to be executed with parsebackquote != 0 in that case. The test is question checks whether quotes have been closed, raising the error "unterminated quoted string" if they haven't. There seems to be no good reason to allow unclosed quotes within backquotes. Bash, hush and dash (after commit 503a0b8) all treat the following as an error: XX=`"pwd` whereas BusyBox ash doesn't. It just ignores the unclosed quote and executes pwd. So, parsebackquote should be removed but not for the reason stated. function old new delta parsebackquote 1 - -1 readtoken1 3222 3182 -40 ------------------------------------------------------------------------------ (add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-41) Total: -41 bytes Signed-off-by: Ron Yorston <rmy@frippery.org> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-13Removes stray empty line from codeManinder Singh28-46/+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>
2015-07-03Allow different ways to manipulate environment for XP vs 64-bitRon Yorston5-1/+1130
Commit fa147bd 'Use putenv to implement unsetenv/clearenv' allowed BusyBox to run on ReactOS but broke it on Windows XP so it was reverted. It turns out that the same change is required on 64-bit Windows. Reinstate the 'safe' environment manipulation code but make it a configuration option. Add a config file for 64-bit Windows that does the right thing.
2015-07-01applets: Add installation of individual binariesClayton Shotwell2-2/+28
Adding support to install individual binaries if the option is enabled. This also installs the shared libbusybox.so.* library. Signed-off-by: Clayton Shotwell <clshotwe@rockwellcollins.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-01ps: fix SEGV on narrow screens. closes 8176Denys Vlasenko1-5/+7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-01ipaddress: better formatting, no code changesDenys Vlasenko1-6/+10
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-07-01ip addr: support change and replace commandsMichael Tokarev2-9/+13
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-06-23libbb: really add build details to bannerRon Yorston2-5/+5
Look at the environment variable during compilation, not runtime.
2015-06-23libbb: add details of build environment to bannerRon Yorston1-0/+6
If the environment variable MINGW_VERSION is set print its contents on a line after the BusyBox version string.
2015-06-23Add some more build details to README.mdRon Yorston1-1/+1
2015-06-17lineedit: skip non-executables when tab-completing commandsRon Yorston1-0/+3
Directories on PATH in Windows are stuffed full of DLLs: ignore them when doing tab completion.
2015-06-17lineedit: search applets as well as PATH for tab completionRon Yorston1-1/+14
In standalone shell mode search the applet table as well as PATH when tab completing a command. Use a stupid linear search: we're also about to read all the directories on PATH so efficiency isn't a big concern.
2015-06-17busybox: update help messageRon Yorston1-4/+9
Tweak text of help message in standalone shell mode. Add a warning if Windows globbing is enabled.
2015-06-16Update README.mdRon Yorston1-1/+2
2015-06-07fix whitespacesManinder Singh1-1/+1
reported by script :- scripts/fix_ws.sh Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-06-07fix if(p)/free(p) constructManinder Singh4-14/+7
No need of explicit NULL check before free. 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>
2015-06-07i2cdetect: use break instead of goto in list_i2c_busses_and_exit()Bartosz Golaszewski1-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>
2015-06-07i2cdump: code reworkBartosz Golaszewski1-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>
2015-06-07i2cdetect: add a check for (mode == DETECT_MODE_AUTO)Bartosz Golaszewski1-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>
2015-06-07i2cdetect: don't scan non-regular addresses without the '-a' optionBartosz Golaszewski1-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>
2015-06-07i2cdetect: don't die on addresses already in use by driversBartosz Golaszewski1-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>
2015-06-07chown: fix help textJunling Zheng1-1/+1
Signed-off-by: Junling Zheng <zhengjunling@huawei.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-06-05ash: add winxp optionRon Yorston2-6/+14
In some circumstances Windows XP and Windows Server 2003 seem to dislike environment variables with backslashes in paths. The 'winxp' option prevents BusyBox from changing backslashes to slashes in the environment. Although the option can be managed by the 'set' builtin it only works if '-X' is given as the first argument to the shell.
2015-06-02ash: skip PATH if executable and command are both busyboxRon Yorston1-0/+21
If the command is 'busybox' and the executable is 'busybox.exe' don't bother checking PATH, just run the executable. This means that busybox.exe can be somewhere other than on PATH.
2015-06-01mingw: add magic '--busybox' flagRon Yorston3-2/+7
If BusyBox is invoked with argv[1] set to --busybox skip the first two arguments so that argv[2] becomes the applet name and argv[3] et seq are its arguments. This is needed when BusyBox is run as sh.exe and the executable is reexecuted to invoke compress/decompress applets.
2015-05-29mingw: fixes to implementation of waitpid(2)Ron Yorston2-3/+3
The third argument should be int. We only support positive pid values.
2015-05-29mingw: fix conditions under which open(2) sets errno to EISDIRRon Yorston1-1/+1
2015-05-29mingw: buffer in do_stat_internal need not be staticRon Yorston1-1/+1
2015-05-29mingw: tidy up implementation of kill(2)Ron Yorston3-10/+16
2015-05-28ash: seek to EOF when file is opened for appendRon Yorston1-0/+3
This shouldn't be necessary but without it the offset becomes zero when an external command is run. rm -f log echo 1234567890 >>log cmd /c echo hi >>log echo 1234567890 >>log Before this change log would contain: hi 567890 1234567890
2015-05-27Enable seamless compression for WIN32Ron Yorston11-12/+82
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
2015-05-27mingw: add routine to pipe a file descriptor to/from a commandRon Yorston2-18/+129
2015-05-27mingw: define a macro for spawnRon Yorston3-5/+5
2015-05-27win32: fix waitpid implementationRon Yorston1-2/+11
_cwait requires a process handle, not a pid.
2015-05-25truncate: do not die when a file doesn't exist and no-create flag is onAri Sundholm1-5/+15
Additionally, open(2) failures do not make the program die immediately. This makes the behavior of the program match coreutils more closely. function old new delta truncate_main 161 221 +60 Signed-off-by: Ari Sundholm <ari@tuxera.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25Print one less newline at the end of bb_show_usage()Denys Vlasenko1-1/+1
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25typo fixesManinder Singh17-24/+24
Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
2015-05-25dc: fix "dc p" prinitng bogus dataDenys Vlasenko1-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>
2015-05-24tc: fix print_rateDenys Vlasenko1-7/+7
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>