platform/upstream/toybox.git
10 years agoInitial cleanup of last: mostly whitespace, move no record test to start of loop...
Rob Landley [Sat, 10 May 2014 18:20:03 +0000 (13:20 -0500)]
Initial cleanup of last: mostly whitespace, move no record test to start of loop, don't bother to stat an empty file to report when an empty log was created (just report current time).

10 years agoCatch duplicate command name (which breaks the build already, but doesn't identify...
Rob Landley [Sat, 10 May 2014 18:06:31 +0000 (13:06 -0500)]
Catch duplicate command name (which breaks the build already, but doesn't identify the culprit).

10 years agoSwitch human_readable() to just outputing decimal kilo/mega/gigabytes, make du use...
Rob Landley [Tue, 6 May 2014 11:31:28 +0000 (06:31 -0500)]
Switch human_readable() to just outputing decimal kilo/mega/gigabytes, make du use it, move it from lib/pending.c to lib.c.

10 years agoUse compiler built-in macros to determine if argument parsing can use double or float...
Rob Landley [Tue, 6 May 2014 11:14:20 +0000 (06:14 -0500)]
Use compiler built-in macros to determine if argument parsing can use double or float for FLOAT arguments. (I.E. whether double fits in a long's memory.) Check in a way that the macros not being defined just gives us the shorter one.

10 years agoFix bug reported by Ashwini Sharma: rebound has to be at the end or toy_init() doesn...
Rob Landley [Tue, 6 May 2014 02:20:11 +0000 (21:20 -0500)]
Fix bug reported by Ashwini Sharma: rebound has to be at the end or toy_init() doesn't zero the rest of the struct.

10 years agoIn function readfile(), the buffer buf is free'd when readall() fails. This free...
Ashwini Sharma [Fri, 2 May 2014 11:24:11 +0000 (06:24 -0500)]
In function readfile(), the buffer buf is free'd when readall() fails.  This free can cause a crash, if the buffer passed by user of function is not malloc'ed one.

names_to_pid() is one usecase example here.

10 years agoAttached is the patch for lsattr and chattr implementation.
Ashwini Sharma [Fri, 2 May 2014 11:17:48 +0000 (06:17 -0500)]
Attached is the patch for lsattr and chattr implementation.

This is the modified and better version from the last one I sent.
It is having the both the mains (lsattr_main() and chattr_main() )
in single file.

Also removed the dependency of additional file in lib, as common code is in the
same .c file.

10 years agoTeach cpio to set uid/gid and timestamp. (Timestamp has year 2100 problem.)
Rob Landley [Tue, 29 Apr 2014 11:03:17 +0000 (06:03 -0500)]
Teach cpio to set uid/gid and timestamp. (Timestamp has year 2100 problem.)

Note that directory timestamps are still sometimes wrong because creating
things in a directory can update the timestamp. Also, cp -r has logic to
ensure we can write to a directory that doesn't have write permission,
cpio does not. This is fixable, but not what existing cpio does.

10 years agofold cleanup: whitespace and curly brackets.
Rob Landley [Fri, 25 Apr 2014 10:56:16 +0000 (05:56 -0500)]
fold cleanup: whitespace and curly brackets.

10 years agoCosmetic tweak: spell out "Linux Standard Base" in menuconfig.
Rob Landley [Fri, 25 Apr 2014 10:50:00 +0000 (05:50 -0500)]
Cosmetic tweak: spell out "Linux Standard Base" in menuconfig.

10 years agoFix od bug reported by Samuel Holland ("od -v -b" was appending default output type...
Rob Landley [Fri, 25 Apr 2014 10:48:11 +0000 (05:48 -0500)]
Fix od bug reported by Samuel Holland ("od -v -b" was appending default output type even though an output type was specified).

10 years agoAdd example directory, move hello.c into it, add skeleton.c to demonstrate more compl...
Rob Landley [Wed, 23 Apr 2014 22:23:09 +0000 (17:23 -0500)]
Add example directory, move hello.c into it, add skeleton.c to demonstrate more complciated stuff (multiple commands per file, etc), and have genconfig.sh sort backwards so posix is first and example last in menuconfig.

10 years agoAs long as uClibc's still around and requires you to jump through hoops to get iconv...
Rob Landley [Wed, 23 Apr 2014 13:38:29 +0000 (08:38 -0500)]
As long as uClibc's still around and requires you to jump through hoops to get iconv(), probe and build defconfig without it if it's not there.

10 years agousage: is lower case (the help generator looks for that, might as well be consistent).
Rob Landley [Wed, 23 Apr 2014 13:37:07 +0000 (08:37 -0500)]
usage: is lower case (the help generator looks for that, might as well be consistent).

10 years agoRelease announcement for 0.4.8.
Rob Landley [Sun, 20 Apr 2014 19:22:19 +0000 (14:22 -0500)]
Release announcement for 0.4.8.

10 years agoAdded tag 0.4.8 for changeset 8556669d3928
Rob Landley [Sun, 20 Apr 2014 18:38:07 +0000 (13:38 -0500)]
Added tag 0.4.8 for changeset 8556669d3928

10 years agoThis version of fold fixes major bugs (infinite loop, overflow) and adds an option...
Samuel Holland [Thu, 17 Apr 2014 00:49:15 +0000 (19:49 -0500)]
This version of fold fixes major bugs (infinite loop, overflow) and adds an option for un/refolding text.

10 years agoRevert lots of half-finished local debris I didn't mean to check in with Isaac's...
Rob Landley [Wed, 16 Apr 2014 13:54:19 +0000 (08:54 -0500)]
Revert lots of half-finished local debris I didn't mean to check in with Isaac's roadmap update.

Mercurial's "import" command is still broken, committing local tree changes to files that weren't even touched by the patch because the hg developers inisist, when I point out how stupid it is, that they meant to do that. (hg record can do hunks, but import can't even track _files_.)

10 years agoProbe for the existence of FIFREEZE and make fsfreeze depend on it.
Rob Landley [Wed, 16 Apr 2014 12:49:32 +0000 (07:49 -0500)]
Probe for the existence of FIFREEZE and make fsfreeze depend on it.

10 years agoProbes for O_NOFOLLOW that compile and run something aren't compatible with cross...
Rob Landley [Wed, 16 Apr 2014 02:59:42 +0000 (21:59 -0500)]
Probes for O_NOFOLLOW that compile and run something aren't compatible with cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says.

10 years agoA tool to reset the terminal.
Ashwini Sharma [Sun, 13 Apr 2014 21:07:22 +0000 (16:07 -0500)]
A tool to reset the terminal.
This implementation depends on the _stty_ 'sane' settings.

10 years agoAn issue in ifconfig while verifying the HW Address, which is assumed to be of the...
Ashwini sharma [Sun, 13 Apr 2014 21:04:16 +0000 (16:04 -0500)]
An issue in ifconfig while verifying the HW Address, which is assumed to be of the format __C2:79:38:95:CD:AB__ but can be of form __C2:79:38:95:D:A__. In this case the HW address is reported as bad.

10 years agoAn implementation of __printf__ is attached.
Ashwini Sharma [Sun, 13 Apr 2014 20:58:20 +0000 (15:58 -0500)]
An implementation of __printf__ is attached.

10 years agoiconv cleanup.
Rob Landley [Sun, 13 Apr 2014 20:49:15 +0000 (15:49 -0500)]
iconv cleanup.

10 years agoiconv is actually something I'm missing on my current musl based system.
Felix Janda [Sun, 13 Apr 2014 18:12:45 +0000 (13:12 -0500)]
iconv is actually something I'm missing on my current musl based system.
Attached is a simple version using the libc's iconv.

10 years agogetty: build fix, clean up messages, simplify code
Isaac Dunham [Sun, 13 Apr 2014 04:26:50 +0000 (23:26 -0500)]
getty: build fix, clean up messages, simplify code

build fix: xmsprintf has been renamed
shorten and lowercase the error messages
use xexec() instead of execlp(); perror_exit();
remove redundant variable setting

10 years agoOn further analysis, none of the glibc commands are interesting.
Rob Landley [Sun, 13 Apr 2014 01:39:33 +0000 (20:39 -0500)]
On further analysis, none of the glibc commands are interesting.

10 years agoroadmap: describe glibc commands.
Isaac Dunham [Sat, 12 Apr 2014 22:26:44 +0000 (17:26 -0500)]
roadmap: describe glibc commands.

Some glibc commands are irrelevant because they're for functionality
that is excluded from musl (mtrace, rpc*, localedef, iconvconfig, nscd).
getconf and catchsegv look like candidates for the development toolchain;
locale and iconv were already triaged.
getent is pretty lame, but it and the timezone stuff (tzselect zic
zdump) are the only new possibly interesting commands.

10 years agoFix date setting, and fluff out help text a bit.
Rob Landley [Fri, 11 Apr 2014 00:40:14 +0000 (19:40 -0500)]
Fix date setting, and fluff out help text a bit.

10 years agomodprobe: cleanup, incorporate Ashwini's fix for alias loading
Isaac Dunham [Wed, 9 Apr 2014 22:26:09 +0000 (17:26 -0500)]
modprobe: cleanup, incorporate Ashwini's fix for alias loading

Move <fnmatch.h> to toys.h, since it's POSIX.
Avoid duplicating code in an if/else block.
Terser error messages, spelling.
Don't always print the state.

10 years agoBugfix: if $TERM and friends aren't set, putenv() got passed a NULL.
Rob Landley [Wed, 9 Apr 2014 14:23:17 +0000 (09:23 -0500)]
Bugfix: if $TERM and friends aren't set, putenv() got passed a NULL.

10 years agoDocument some of the new temporary files in generated/, add anchor tags.
Rob Landley [Wed, 9 Apr 2014 13:30:09 +0000 (08:30 -0500)]
Document some of the new temporary files in generated/, add anchor tags.

10 years agoNote commands bundled with glibc but not musl.
Rob Landley [Wed, 9 Apr 2014 12:57:08 +0000 (07:57 -0500)]
Note commands bundled with glibc but not musl.

No idea what to do about 'em yet, but there they are.

10 years agoModprobe from Madhur Verma and Kyungwan Han.
Rob Landley [Wed, 9 Apr 2014 12:55:08 +0000 (07:55 -0500)]
Modprobe from  Madhur Verma and Kyungwan Han.

10 years agoA getty implementation from Sandeep Sharma and Kyungwan Han.
Rob Landley [Wed, 9 Apr 2014 12:45:59 +0000 (07:45 -0500)]
A getty implementation from Sandeep Sharma and Kyungwan Han.

10 years ago_mkflags_ had an issue for generating FLAG_xxxx macros for long options.
Ashwini Sharma [Wed, 9 Apr 2014 12:40:02 +0000 (07:40 -0500)]
_mkflags_ had an issue for generating FLAG_xxxx macros for long options.

Only the first __long__ option, without any __short__ option had a proper
flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved
to the next in this case.

10 years agogenerated/help.h is a lot easier to read with an extra newline between each help...
Rob Landley [Mon, 7 Apr 2014 17:53:24 +0000 (12:53 -0500)]
generated/help.h is a lot easier to read with an extra newline between each help entry.

10 years agoopenvt tries opening several devices to get an fd that points to the current console...
Isaac Dunham [Fri, 4 Apr 2014 03:43:28 +0000 (22:43 -0500)]
openvt tries opening several devices to get an fd that points to the current console, without a need for read or write permissions. O_RDWR implies that both O_RDONLY and O_WRONLY would work, so skip it. Reindent.

10 years agoHere is a basic implementation of fold[0]. It does not support multibyte characters...
Samuel Holland [Thu, 3 Apr 2014 23:01:44 +0000 (18:01 -0500)]
Here is a basic implementation of fold[0]. It does not support multibyte characters, though that would probably just require more switch cases.

10 years agoDecided not to go with the sflate implementation of deflate/inflate. The decompressio...
Rob Landley [Wed, 2 Apr 2014 11:37:14 +0000 (06:37 -0500)]
Decided not to go with the sflate implementation of deflate/inflate. The decompression side's already reimplemented in compress, and I'm working on compression side.

10 years agoIn ifconfig.c, there is a glitch in function get_addrinfo() when computing the prefix...
Ashwini Sharma [Wed, 2 Apr 2014 11:35:33 +0000 (06:35 -0500)]
In ifconfig.c, there is a glitch in function get_addrinfo() when computing the prefix length.

10 years agoNew toy fsfreeze, from Isaac Dunham, plus minor cleanups.
Rob Landley [Tue, 1 Apr 2014 23:20:00 +0000 (18:20 -0500)]
New toy fsfreeze, from Isaac Dunham, plus minor cleanups.

10 years agobugfix: the multiplexer increments optc and then the command the multiplexer runs...
Rob Landley [Tue, 1 Apr 2014 23:18:46 +0000 (18:18 -0500)]
bugfix: the multiplexer increments optc and then the command the multiplexer runs increments it further, resulting in a wrong count. Fix: zero it.

10 years agoGroup headers by standard (POSIX or LSB) or function (internationalization, networkin...
Rob Landley [Sat, 29 Mar 2014 23:11:00 +0000 (18:11 -0500)]
Group headers by standard (POSIX or LSB) or function (internationalization, networking). Move headers standards ignore (but which have been there >15 years) to lib/portability.h. Fold xregcomp into lib since it's posix.

10 years agofind: clarify and expand the help for find -type
Isaac Dunham [Sat, 29 Mar 2014 20:25:23 +0000 (15:25 -0500)]
find: clarify and expand the help for find -type

10 years agoAdd help.html (make defconfig && help -ah > help.html) to index.
Rob Landley [Sat, 29 Mar 2014 03:55:30 +0000 (22:55 -0500)]
Add help.html (make defconfig && help -ah > help.html) to index.

10 years agoAdd help -a (to show all commands) and -h (to produce HTML output).
Rob Landley [Fri, 28 Mar 2014 22:48:02 +0000 (17:48 -0500)]
Add help -a (to show all commands) and -h (to produce HTML output).

10 years agoFix cpio -it: don't close(fd) unless we opened it.
Isaac Dunham [Thu, 27 Mar 2014 12:02:01 +0000 (07:02 -0500)]
Fix cpio -it: don't close(fd) unless we opened it.

10 years agoMore cpio bugfixes from Isaac Dunham.
Rob Landley [Wed, 26 Mar 2014 11:07:06 +0000 (06:07 -0500)]
More cpio bugfixes from Isaac Dunham.

Fix FLAG_o to actually be 1 like the comment says, don't try to strlen(name) before reading it, pad TRAILER!!! entry correctly.

10 years agoPromote cpio out of pending.
Rob Landley [Tue, 25 Mar 2014 12:35:56 +0000 (07:35 -0500)]
Promote cpio out of pending.

After some waffling I put it in "posix", even though it was last specified in
susv2 (where it was the obsolete 6 byte header entries predating susv4).

LSB specifies it, including the 8 byte header fields, but for the actual
command it just references SUSv2. (LSB isn't so much a standard as Red Hat's
"notes to self".)

10 years agoSeveral cpio bugfixes spotted by Isaac Dunham.
Rob Landley [Tue, 25 Mar 2014 12:24:50 +0000 (07:24 -0500)]
Several cpio bugfixes spotted by Isaac Dunham.

10 years agoMost of the remaining cpio cleanup.
Rob Landley [Mon, 24 Mar 2014 13:19:21 +0000 (08:19 -0500)]
Most of the remaining cpio cleanup.

10 years agoFix mkdir -p with absolute paths.
Rob Landley [Mon, 24 Mar 2014 11:26:49 +0000 (06:26 -0500)]
Fix mkdir -p with absolute paths.

Stripping leading / is not the right thing to do there.
Broken when the code moved to lib and was genericized for use elsewhere.

10 years agoThere are cases when the long options are of the format abc-def. In current implement...
Ashwini Sharma [Wed, 19 Mar 2014 18:57:06 +0000 (13:57 -0500)]
There are cases when the long options are of the format abc-def. In current implementation FLAG_xxx macros are generated for long options too. with __-__ sign in the macro, it will generate errors.

I am of the opinion that __-__ be converted to '_' for generating the FLAG_xxx macros and be used in the command.

This will enable the user to 'abc-def', but be handled like 'abc_def' in code.

10 years agoClarify an unclear comment pointed out by Steve Long.
Rob Landley [Sun, 16 Mar 2014 21:27:38 +0000 (16:27 -0500)]
Clarify an unclear comment pointed out by Steve Long.

10 years agoNext round of cpio cleanup.
Rob Landley [Sat, 15 Mar 2014 20:41:09 +0000 (15:41 -0500)]
Next round of cpio cleanup.

10 years agoCleanup cpio: use getline() instead of fgets(), have getline() allocate its own memor...
Rob Landley [Fri, 14 Mar 2014 00:55:59 +0000 (19:55 -0500)]
Cleanup cpio: use getline() instead of fgets(), have getline() allocate its own memory (instead of using toybuf), use perror_msg() instead of lower level verror_msg() (which is really an internal function needed to implement perror_msg()), don't set execute bits on created archive.

10 years agoCleanup cpio: fiddle with help text, make option parsing require/exclude -iot combina...
Rob Landley [Fri, 14 Mar 2014 00:42:42 +0000 (19:42 -0500)]
Cleanup cpio: fiddle with help text, make option parsing require/exclude -iot combinations, move loopfiles_stdin() down after write_cpio_member() so we can hardwire it instead of using a function pointer that only ever has one value.

10 years agoPatch from Isaac Dunham to add cpio -d, with a few tweaks by me.
Rob Landley [Wed, 12 Mar 2014 02:10:45 +0000 (21:10 -0500)]
Patch from Isaac Dunham to add cpio -d, with a few tweaks by me.

10 years agoMove mkpathat to lib, remove redundant function used by patch.
Rob Landley [Wed, 12 Mar 2014 01:44:55 +0000 (20:44 -0500)]
Move mkpathat to lib, remove redundant function used by patch.

10 years agoAdd "volatile" annotation to peek/poke to stop potential optimizer overreach.
Rob Landley [Tue, 11 Mar 2014 23:11:12 +0000 (18:11 -0500)]
Add "volatile" annotation to peek/poke to stop potential optimizer overreach.

10 years agoFactor out mkpathat.
Rob Landley [Tue, 11 Mar 2014 22:50:17 +0000 (17:50 -0500)]
Factor out mkpathat.

10 years agoPromote freeramdisk from pending to other, default y.
Rob Landley [Sun, 9 Mar 2014 19:42:28 +0000 (14:42 -0500)]
Promote freeramdisk from pending to other, default y.

10 years agoCleanup freeramdisk: tabs to 2 spaces, square brackets for option name, do optional...
Rob Landley [Sun, 9 Mar 2014 19:38:51 +0000 (14:38 -0500)]
Cleanup freeramdisk: tabs to 2 spaces, square brackets for option name, do optional cleanup under if (CFG_TOYBOX_FREE) guard.

10 years agoPlease find the patches attached herewith for adding 3 new commands -
Vivek Bhagat [Sun, 9 Mar 2014 19:27:11 +0000 (14:27 -0500)]
Please find the patches attached herewith for adding 3 new commands -
1. freeramdisk - If we unmount or detach the RAM disk based file system the Linux Kernel
   will not free the allocated memory associated with the RAM device. This can be useful if
   one wants to mount this device again:  All data will be preserved.
   If we need to free the memory back to the Kernel, one can use the command: "toybox freeramdisk <RAM device>".

2. openvt - Successfully opens a new virtual terminal as mentioned with -c option
        otherwise search and open next available VT.
with -s option it switches to new VT
with -s -w option, it switch back successfully to originating VT.

3. deallocvt - Deallocate specified virtual teminal.
   if no virtual terminal is specified, it deallocates all unused VT.

10 years agoBroken URL that's been pointed out to me a couple times when I'm not at a machine...
Rob Landley [Sun, 9 Mar 2014 01:26:33 +0000 (19:26 -0600)]
Broken URL that's been pointed out to me a couple times when I'm not at a machine I can fix it from, keep forgetting...

10 years agoFix another bug reported by Ashwini Sharma.
Rob Landley [Sat, 1 Mar 2014 05:10:03 +0000 (23:10 -0600)]
Fix another bug reported by Ashwini Sharma.

10 years agoFix two bugs reported by Ashwini Sharma.
Rob Landley [Sat, 1 Mar 2014 05:04:57 +0000 (23:04 -0600)]
Fix two bugs reported by Ashwini Sharma.

10 years agoFix header file generation to not be confused by empty (but non-NULL) option string.
Rob Landley [Sat, 1 Mar 2014 02:46:16 +0000 (20:46 -0600)]
Fix header file generation to not be confused by empty (but non-NULL) option string.

You shouldn't use "" as an option string because a NULL allows toy_init()
to avoid calling the option parsing logic entirely, which lets it drop out
when nothing's using it (ala scripts/single.sh builds). That said, init.c
is currently using a "" option string and a USE_ macro taking advantage
of string concatenation may require a "" option config, so...

10 years agoPut all FOR_xxx blocks after all CLEANUP_xxx in generated/flags.h so the usages don...
Rob Landley [Tue, 25 Feb 2014 05:34:43 +0000 (23:34 -0600)]
Put all FOR_xxx blocks after all CLEANUP_xxx in generated/flags.h so the usages don't have to be in alphabetical order.

10 years agoCLEANUP transitions require all the generated/flags.h stanzas always be present ...
Rob Landley [Mon, 24 Feb 2014 02:11:06 +0000 (20:11 -0600)]
CLEANUP transitions require all the generated/flags.h stanzas always be present (even for commands disabled in the config) to avoid undefined symbol errors referencing FLAG_ macros.

10 years agoAdd -H option to cksum (hex output), fix to use FLAG macros.
Rob Landley [Sat, 22 Feb 2014 14:02:09 +0000 (08:02 -0600)]
Add -H option to cksum (hex output), fix to use FLAG macros.

10 years agoAdd crc code: zcat now works.
Rob Landley [Sat, 22 Feb 2014 14:01:11 +0000 (08:01 -0600)]
Add crc code: zcat now works.

10 years agoUpdate status page.
Rob Landley [Sat, 22 Feb 2014 04:24:02 +0000 (22:24 -0600)]
Update status page.

10 years agoUpdate inflate code: fixed tables, bugfixes, zcat alias.
Rob Landley [Sat, 22 Feb 2014 04:21:59 +0000 (22:21 -0600)]
Update inflate code: fixed tables, bugfixes, zcat alias.

10 years agoMake CLEANUP transitions work, so multiple NEWTOY() can exist in the same file.
Rob Landley [Sun, 16 Feb 2014 23:31:33 +0000 (17:31 -0600)]
Make CLEANUP transitions work, so multiple NEWTOY() can exist in the same file.

Don't #undefine TT in the CLEANUP blocks of generated/flags.h, and #ifdef
around the other TT definition. That way you can put a union at the start
of your GLOBALS() with the arguments filled out by option parsing, and then
have multiple main() functions with different argumetns and different
FLAG_x macros, while sharing infrastructure that's not under lib.

10 years agoVarious cleanups found by Tom Sparrow's static analysis.
Rob Landley [Sun, 16 Feb 2014 17:09:23 +0000 (11:09 -0600)]
Various cleanups found by Tom Sparrow's static analysis.

10 years agoOk, _maybe_ I'm rewriting deflate from scratch rather than cleaning up the existing...
Rob Landley [Thu, 13 Feb 2014 12:45:35 +0000 (06:45 -0600)]
Ok, _maybe_ I'm rewriting deflate from scratch rather than cleaning up the existing one, but you can't prove it. I plead the fifth, third, twelvefth, twentieth, twenty-first, twenth-fith, and twenty-seventh.

10 years agoNot buying it, eh?
Rob Landley [Mon, 10 Feb 2014 14:30:05 +0000 (08:30 -0600)]
Not buying it, eh?

10 years agoNothing to see here, move along.
Rob Landley [Sat, 8 Feb 2014 19:37:57 +0000 (13:37 -0600)]
Nothing to see here, move along.

10 years agoFix segfault with single build of a command with bare longopts.
Rob Landley [Sat, 8 Feb 2014 16:53:26 +0000 (10:53 -0600)]
Fix segfault with single build of a command with bare longopts.

10 years agoMove bunzip2 logic from lib into bzcat.
Rob Landley [Fri, 7 Feb 2014 13:56:46 +0000 (07:56 -0600)]
Move bunzip2 logic from lib into bzcat.

10 years agoTweak help text.
Rob Landley [Tue, 4 Feb 2014 12:20:14 +0000 (06:20 -0600)]
Tweak help text.

10 years agoMore cleanup.html documentation, still way behind...
Rob Landley [Tue, 4 Feb 2014 12:16:44 +0000 (06:16 -0600)]
More cleanup.html documentation, still way behind...

10 years agoUse right config for single builds.
Rob Landley [Tue, 4 Feb 2014 12:14:30 +0000 (06:14 -0600)]
Use right config for single builds.

10 years agoAdd /prefix netmask support to ifconfig, ala "ifconfig eth0 192.168.1.42/28"
Rob Landley [Tue, 4 Feb 2014 12:13:13 +0000 (06:13 -0600)]
Add /prefix netmask support to ifconfig, ala "ifconfig eth0 192.168.1.42/28"

10 years agogzip: alphebetize help entries and remove trailing literal \n, check for command...
Rob Landley [Sun, 2 Feb 2014 21:02:15 +0000 (15:02 -0600)]
gzip: alphebetize help entries and remove trailing literal \n, check for command line option groups, move len/dist tables to GLOBALS and calculate instead of including literal tables, collate enum and typedef, convert main to toybox option parsing.

10 years agoMore gzip whitespace tweaks, and the occasional curly bracket. No actual code changes.
Rob Landley [Sat, 1 Feb 2014 21:03:49 +0000 (15:03 -0600)]
More gzip whitespace tweaks, and the occasional curly bracket. No actual code changes.

10 years agoConvert leading tabs to spaces for gzip.
Rob Landley [Fri, 31 Jan 2014 12:22:32 +0000 (06:22 -0600)]
Convert leading tabs to spaces for gzip.

10 years agoAdd Szabolcs Nagy's deflate/inflate code from git://git.suckless.org/flate
Rob Landley [Fri, 31 Jan 2014 12:01:30 +0000 (06:01 -0600)]
Add Szabolcs Nagy's deflate/inflate code from git://git.suckless.org/flate

Confirmed with him on IRC it's ok to use under toybox license, glued the files
together and hammered square peg into round hole, no other changes yet.

10 years agoMore elaborate help text collating logic.
Rob Landley [Thu, 30 Jan 2014 05:47:53 +0000 (23:47 -0600)]
More elaborate help text collating logic.

10 years agoinit: don't use VT_OPENQRY.
Isaac Dunham [Tue, 28 Jan 2014 23:46:14 +0000 (17:46 -0600)]
init: don't use VT_OPENQRY.

The original codepath checks if there is a VT available,
and if there isn't sets TERM to vt102 (unless TERM is set to something
other than "linux").
Otherwise, TERM is set to "linux" if it is not already set.

However, we can rely on getty/... to set TERM if "linux" is not suitable.
This has the benefit of dropping a slightly messy section.

10 years agoTwo changes to shut up GCC:
Isaac Dunham [Tue, 28 Jan 2014 16:10:25 +0000 (10:10 -0600)]
Two changes to shut up GCC:
* __GLIBC__ was checked unconditionally;
this made for a very messy build on musl.
* int fd in chvt is always initialized; GCC 3.4 does not recognize this.

10 years ago-Eradicate (char*) casts for strings.
Isaac Dunham [Thu, 23 Jan 2014 05:29:50 +0000 (23:29 -0600)]
-Eradicate (char*) casts for strings.
-Don't panic on failure to write messages.
-Don't panic on failure to fork; sleep an extra second instead.
-s/defualt/default/g
-Inline a couple functions called once.
(Don't inline inittab_parsing because it is too large).

10 years agoCollate usage: lines in help text.
Rob Landley [Mon, 20 Jan 2014 23:26:50 +0000 (17:26 -0600)]
Collate usage: lines in help text.

10 years agoRename xmsprintf() to just xmprintf().
Rob Landley [Thu, 16 Jan 2014 15:26:50 +0000 (09:26 -0600)]
Rename xmsprintf() to just xmprintf().

Partly because there's no supplied target string ala sprintf, and partly
because I can never remember what order the m and s go in.

10 years agoHelp text, collate usage blocks (badly).
Rob Landley [Wed, 15 Jan 2014 15:38:31 +0000 (09:38 -0600)]
Help text, collate usage blocks (badly).

10 years agoWhitespace changes, and collate a couple declarations/first assignment.
Rob Landley [Sun, 5 Jan 2014 20:43:27 +0000 (14:43 -0600)]
Whitespace changes, and collate a couple declarations/first assignment.

10 years agoChange header and pages so each page has its own title.
Rob Landley [Sat, 4 Jan 2014 19:09:42 +0000 (13:09 -0600)]
Change header and pages so each page has its own title.

10 years agoReplace python help converter with C implementation.
Rob Landley [Sat, 4 Jan 2014 00:23:09 +0000 (18:23 -0600)]
Replace python help converter with C implementation.