summaryrefslogtreecommitdiff
path: root/lib
AgeCommit message (Collapse)AuthorFilesLines
2016-03-17Revert back to upstream 0.6.0 and remove all except for dhcp relatedsubmit/tizen/20160323.053424Yu Jiung5-81/+8
Change-Id: Ide839cfefc7c4049715f86a2bf769c333175b2bf
2015-08-20Merge branch 'upstream' into tizensubmit/tizen/20150901.111553accepted/tizen/wearable/20150902.004616accepted/tizen/tv/20150902.004610accepted/tizen/mobile/20150902.004600Hyejin Kim4-8/+81
And version 0.6.0 applied Change-Id: Iabc3dc2fc4bd984a114445d8b70df57eb43c3b16
2015-08-12Merge remote-tracking branch 'toybox/master' into upstreamupstreamHyejin Kim4-8/+81
2015-08-08Different tools have different ideas about what human-readable outputElliott Hughes2-4/+6
looks like. dd uses "7 MB" where du uses "7M", for example. this patch adds flags, similar to the BSD humanize_number. most callers will pass 0.
2015-08-08First pass at proper bunzip2 command line handling.Rob Landley1-1/+1
2015-08-06Adjust xexec() exit code to be 127, and tweaks for nommu friendliness.Rob Landley1-3/+6
2015-08-05Switch nbd_client to xconnect() and make xconnect() try all returned addressesRob Landley1-5/+10
before failing.
2015-08-05Tweak xconnect: socket can be a string (ala "ftp") from /etc/services.Rob Landley2-6/+4
Still need a rethink on how to handle socket/bind/connect sequence.
2015-08-03Factor out xconnect(), plus some other small cleanups to telnet.c.Rob Landley2-0/+29
2015-08-01Move strlower() from find to lib.Rob Landley2-0/+36
2015-07-20Merge branch 'upstream'Hyejin Kim14-200/+614
Change-Id: I17036143b5e644b1857e28b04d95fbd90fa2c112
2015-07-16Merge branch from toybox/masterHyejin Kim14-195/+615
Conflicts: both modified: lib/portability.c both modified: lib/portability.h both modified: scripts/genconfig.sh both modified: scripts/runtest.sh both added: tests/sed.test both modified: toys/other/acpi.c both modified: toys/other/ifconfig.c deleted by them: toys/other/unshare.c both added: toys/pending/hwclock.c both modified: toys/pending/ip.c deleted by them: toys/pending/sed.c both modified: toys/posix/chgrp.c both modified: toys/posix/cp.c both modified: toys/posix/id.c both modified: toys/posix/ls.c Change-Id: Ib36c5267ec054a5683ca37da2383d83b3cb1b5b4 Signed-off-by: Hyejin Kim <hyejin0906.kim@samsung.com>
2015-07-11Fix 32-bit bionic toybox build.Elliott Hughes1-2/+10
https://android-review.googlesource.com/159035/
2015-07-10Add a basename_r() and use it in names_to_pid() to avoid basename() overwritingRob Landley2-1/+10
itself on some inputs. (Which makes killall really impolite. Bug report from Nicholas Noury via Elliott Hughes.)
2015-07-10Move comment about TOYBOX_DEBUG to start of file so it's more obvious.Rob Landley1-4/+6
2015-07-03Probe for fork() instead of relying on a distro-specific #define.Rob Landley1-1/+14
2015-07-01Fix segfault with "mount -o ro,remount".Elliott Hughes1-1/+1
Or any call to comma_scan where 'opt' appears as the last item in 'optlist'.
2015-06-26Factor out more not-curses infrastructure into lib.Rob Landley2-3/+48
2015-05-31Move the magic list of commands needing cleanup from toys/pending/READMERob Landley2-0/+4
to greppable TODO annotations in the individual files. (grep -riw TODO)
2015-05-28Attempt to fix the mkdir LSM race.Rob Landley1-1/+12
Doing a world writeable mkdir and _then_ adding a label seems like a race window, so set the global "create stuff with these labels" context, then do the creates.
2015-05-18Switch id over to new infrastructure, switch id to use FORCE_FLAGS, andRob Landley1-0/+8
make lib/lsm.h auto-include from toys.h.
2015-05-18More ls -Z upgrading. Move TOYBOX_SELINUX and TOYBOX_SMACK support fromRob Landley2-21/+100
portability.h to new lib/lsm.h. Update ls.c to use it. Fix "ls . toys" (two directories when one is . or ..), which was filtering out the . as something we shouldn't recurse into even though it was explicitly listed on the command line. For some reason "ls -Z . toys" is still segfaulting though (but "ls -Z ." isn't), need to figure out why...
2015-05-14Promote reset (actually write a new one using the simple man 4 console_codesRob Landley2-0/+10
terminal reset escape sequence) and add gettty() function to lib so terminal gets reset even when we redirect stdout/stderr. (This is apparently the expected behavior.)
2015-05-09Add DIRTREE_SHUTUP to disable dirtree warnings if file vanishes out fromRob Landley2-19/+27
under traversal. Pass through full flag set in dirtree_add_node(), add dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
2015-05-08Move not-curses code into interstingtimes.cRob Landley4-121/+129
2015-05-03Move a prototype to the start of portability.h (suggested by Elliott Hughes)Rob Landley1-0/+3
2015-05-01Portability bits for the recent ls smack changes.Rob Landley1-0/+6
2015-04-30And remove the header part too.Rob Landley1-1/+0
2015-04-30Remove redundant numlen.Rob Landley1-10/+0
2015-04-27Some infrastructure hexedit needs. (Poor man's curses.)Rob Landley4-33/+106
2015-04-19Cleanup getprop, add qstrcmp() to lib for qsort (because posix-2008 brokeRob Landley2-0/+9
alphasort), add compile-time probe for config symbol TOYBOX_ON_ANDROID.
2015-04-17Link against libattr and libsmack.Xavier Roche1-0/+9
2015-04-16terminal_size should use LINES, not ROWS.Elliott Hughes1-1/+1
The shell's pseudo-variable is called LINES. This is true of at least bash and mksh.
2015-04-15Put SELINUX in a a menu, and add config option for SMACK.Rob Landley1-0/+4
2015-04-03Add readfileat() to libRob Landley2-4/+8
2015-03-23Tweak of Elliott Hughes's fix for an off by one error in human_readableRob Landley1-2/+2
(137 returned "137 KB".)
2015-03-21Patch from David Halls to fix mac/ios portability issue.Rob Landley1-2/+2
2015-03-16Fix mount -a segfault without -O, reported by Janus Troelsen.Rob Landley1-1/+1
2015-03-16Rename a function to better describe what it does.Rob Landley1-3/+3
2015-03-12Factor out xgetgrnamid() and xgetpwnamid() into xwrap.c.Rob Landley2-0/+34
2015-03-09Upgrade oneit with -r (restart), -3 (send exiting PID values to child), and ↵Rob Landley2-0/+12
signal handling.
2015-03-01Only switch on printf format warnings for error_exit() and friends when ↵Rob Landley1-0/+4
TOYBOX_DEBUG enabled. One again gcc manages to be incompetent about producing warnings. For example, in bzcat we error_exit() with a message that's an error code fed into an array of string constants, and apparently dereferencing an array of string literals doesn't give you a string literal according to -Wformat-security. Not breaking the code to humor the compiler here, the compiler is wrong.
2015-03-01let the compiler check format stringsElliott Hughes2-6/+8
i'll be AFK for a week, so here's the patch i've been using this evening to find other format string mistakes. BSD uses __printflike and takes two arguments instead of hard-coding (1,2), but i figured that as long as you don't need the generality you'd prefer not to have it. and it's easy enough to retrofit if we ever do have a formatting function that takes other arguments.
2015-03-01Patches from Elliott Hughes to add missing arguments to error_exit() calls.Rob Landley1-1/+1
2015-02-09Cleanup/refactoring pass on hwclock.Rob Landley2-0/+12
Inline open_wall_clock_rtc() into rtc_open(), factor out xtzset(), inline set_sysclock_from_hwclock(), set_hwclock_from_sysclock(), and set_sysclock_timezone(). /etc/adjtime is short enough we don't need to bother with a break. The final "else" case in main() should always trigger because >0 in optstr says "at most zero arguments", so the || at the end is always true, so take the test off.
2015-02-07Remove xexec_optargs().Rob Landley2-12/+0
2015-02-06Alright, the Android guys agree with the musl guys: ↵Rob Landley1-6/+0
faccessat(AT_SYMLINK_NOFOLLOW) is not supported.
2015-01-18Remove trailing whitespace.Rob Landley4-8/+7
2015-01-18Lift the basename/libgen.h shenanigans back out of portability.c and make it ↵Rob Landley2-12/+8
a static inline in portability.h, and prototype dirname() while we're at it.
2015-01-18fix non-glibc basename(3) usageElliott Hughes1-0/+5
I considered a #else on the big #ifdef __GLIBC__ above, but that seemed harder to follow.