OSDN Git Service
Rob Landley [Sun, 4 Aug 2013 20:04:08 +0000 (15:04 -0500)]
Fluff out grep test suite some more, including lots of things we don't pass yet.
Rob Landley [Sun, 4 Aug 2013 06:22:49 +0000 (01:22 -0500)]
Cleanup grep, make it pass the current test suite.
Rob Landley [Sun, 4 Aug 2013 05:31:27 +0000 (00:31 -0500)]
System V style init, submitted by Kyungwan Han.
Rob Landley [Thu, 1 Aug 2013 23:15:20 +0000 (18:15 -0500)]
Need to specify bool for CP_MV_MORE config symbol to avoid warnings.
Rob Landley [Thu, 1 Aug 2013 23:10:47 +0000 (18:10 -0500)]
ls --color should depend on LS in menuconfig.
Rob Landley [Thu, 1 Aug 2013 22:21:38 +0000 (17:21 -0500)]
Cleanup grep: help text, whitespace, add parentheses.
M. Farkas-Dyck [Thu, 1 Aug 2013 20:46:45 +0000 (15:46 -0500)]
Found the fault. My method of -w fails sans -E, so I just disallow it.
Kernel build never uses -w sans -E anyhow.
Rob Landley [Thu, 1 Aug 2013 20:22:52 +0000 (15:22 -0500)]
Clean up grep.test to use "infile" properly, and not try to work around the $PATH behavior of scripts/test.sh. Tested with both TEST_HOST=1 and normal.
Ashwini Sharma [Thu, 1 Aug 2013 06:52:32 +0000 (01:52 -0500)]
I add testsuite for grep.
It can test grep's option basically and I think it can help to check progress of development.
Rob Landley [Wed, 31 Jul 2013 21:36:57 +0000 (16:36 -0500)]
Move renice from pending to posix, default y, fix link to standard.
Rob Landley [Wed, 31 Jul 2013 08:24:58 +0000 (03:24 -0500)]
Cleanup renice and implement '|' (required option) in argument parsing.
M. Farkas-Dyck [Tue, 30 Jul 2013 02:16:55 +0000 (21:16 -0500)]
Add renice.
Felix Janda [Sat, 27 Jul 2013 07:45:40 +0000 (09:45 +0200)]
Fix lspci -e
Strake [Fri, 26 Jul 2013 23:23:08 +0000 (18:23 -0500)]
add nl
Ashwini Sharma [Mon, 29 Jul 2013 05:42:30 +0000 (00:42 -0500)]
The attached KLOGD patch is an improved version of the one you have in hg.
This also has a fix for boundary condition crash.
Felix Janda [Wed, 24 Jul 2013 22:48:29 +0000 (00:48 +0200)]
logger: Some cleanup
Strake [Sat, 27 Jul 2013 05:50:29 +0000 (00:50 -0500)]
grep: s/astrcat/x&/g
Strake [Sun, 8 Jun 2003 15:15:17 +0000 (10:15 -0500)]
grep: add -b flag
Strake [Sun, 8 Jun 2003 15:09:05 +0000 (10:09 -0500)]
grep: add -w flag
Felix Janda [Sat, 27 Jul 2013 03:49:05 +0000 (22:49 -0500)]
lspci: use toybuf instead of dynamic memory allocation
Isaac Dunham [Fri, 26 Jul 2013 20:41:31 +0000 (15:41 -0500)]
I've written an lspci implementation.
Currently it supports -emkn; -e is an extension ("class" is a 24-bit number,
but lspci only shows 16 bits; one person on the Puppy forums mentioned
that they need those last 8 bits).
-n is a no-op for compatability with standard lspci.
Isaac Dunham [Fri, 26 Jul 2013 18:27:27 +0000 (13:27 -0500)]
This removes xz_mode.
Mostly outdated comments and unused function parameters/struct members.
Rob Landley [Fri, 26 Jul 2013 18:04:21 +0000 (13:04 -0500)]
Link to Georgi's mirror on github.
Rob Landley [Fri, 26 Jul 2013 03:41:26 +0000 (22:41 -0500)]
Juhani Haverinen pointed out that python 3 doesn't work with config2help.py, so you python2 binary until finishing the C rewrite.
Felix Janda [Thu, 18 Jul 2013 23:18:22 +0000 (01:18 +0200)]
Implement test
Rob Landley [Thu, 25 Jul 2013 18:49:58 +0000 (13:49 -0500)]
Don't make a FLAG_ macro for " ", it's a control character, doing so throws the indexes off. Reported by Ashwini Sharma.
Rob Landley [Thu, 25 Jul 2013 18:32:06 +0000 (13:32 -0500)]
pgrep and pkill by Madhur Verma,
Rob Landley [Thu, 25 Jul 2013 18:30:58 +0000 (13:30 -0500)]
netstat by Ranjan Kumar.
Rob Landley [Thu, 25 Jul 2013 18:28:53 +0000 (13:28 -0500)]
syslogd by Madhur Verma.
Strake [Wed, 24 Jul 2013 01:19:31 +0000 (20:19 -0500)]
grep
Rob Landley [Mon, 22 Jul 2013 06:54:28 +0000 (01:54 -0500)]
More ifconfig cleanup: Remove if_list, unify get_device_info and display_ifconfig(), inline another magic constant #define that's only used once.
Rob Landley [Fri, 19 Jul 2013 10:33:36 +0000 (05:33 -0500)]
Another round of ifconfig cleanup.
Rob Landley [Fri, 19 Jul 2013 07:03:02 +0000 (02:03 -0500)]
Start of TOYBOX_SINGLE support, for building standalone commands with no multiplexer.
Rob Landley [Thu, 18 Jul 2013 23:20:03 +0000 (18:20 -0500)]
Replace users of xexec(toys.optargs) with xexec_optargs(0) to avoid free/reuse bug during argument parsing.
Isaac Dunham [Wed, 17 Jul 2013 22:27:14 +0000 (17:27 -0500)]
make xzcat use loopfiles(), thereby allowing regular usage.
Isaac Dunham [Wed, 17 Jul 2013 22:25:07 +0000 (17:25 -0500)]
xzcat: remove XZ_(PREALLOC|SINGLE), inline xz_dec_bcj_create
Because we only use XZ_DYNALLOC, there's a bunch of dead code.
This patch removes the #ifdef's and if()s associated with support for
multiple modes.
single_call was only used to store the mode; it is no longer needed.
A little bit of reorganization was needed to reduce the number of prototypes.
Documentation associated with dead code was dropped.
There are still some relics of multiple modes in the continued presence
of "XZ_DYNALLOC" and xz_mode.
Additionally, I inlined xz_dec_bcj_create; it was called once.
This loses about 125 lines, mostly comments.
Rob Landley [Wed, 17 Jul 2013 22:22:46 +0000 (17:22 -0500)]
Add timeout, factoring out common code from sleep.
Rob Landley [Tue, 16 Jul 2013 05:04:56 +0000 (00:04 -0500)]
Split lib/xwrap.c from lib/lib.c
Rob Landley [Mon, 15 Jul 2013 18:12:08 +0000 (13:12 -0500)]
klogd, submitted by Ashwini Sharma.
Rob Landley [Mon, 15 Jul 2013 03:12:22 +0000 (22:12 -0500)]
New stuff added to lib.c needs review too, so make a lib/pending.c and move several functions to it.
Strake [Fri, 12 Jul 2013 23:10:52 +0000 (18:10 -0500)]
add grep
Rob Landley [Fri, 12 Jul 2013 03:38:29 +0000 (22:38 -0500)]
Eject cleanups.
Rob Landley [Thu, 11 Jul 2013 23:02:54 +0000 (18:02 -0500)]
Eject, by Kyungwan Han.
Isaac Dunham [Thu, 11 Jul 2013 02:26:49 +0000 (21:26 -0500)]
add paramtype in to the list of tags
Isaac Dunham [Sat, 6 Jul 2013 16:26:15 +0000 (11:26 -0500)]
This inlines CRC64, and nothing more.
The functions involved were called only once.
Felix Janda [Wed, 3 Jul 2013 07:29:24 +0000 (02:29 -0500)]
here's a version of paste. It doesn't deal with wide characters yet and
likely behaves very badly when given too many files or delimiters.
Rob Landley [Tue, 2 Jul 2013 05:16:16 +0000 (00:16 -0500)]
Added tag 0.4.5 for changeset
62ba5ce62e9d
Rob Landley [Mon, 1 Jul 2013 05:10:28 +0000 (00:10 -0500)]
Make ls output major, minor for block devices.
Rob Landley [Mon, 1 Jul 2013 04:52:45 +0000 (23:52 -0500)]
First pass at ls --color
Rob Landley [Sun, 30 Jun 2013 21:52:57 +0000 (16:52 -0500)]
Condense ls help text.
Rob Landley [Sun, 30 Jun 2013 20:58:24 +0000 (15:58 -0500)]
Add config option for --help support in all commands.
Rob Landley [Sun, 30 Jun 2013 06:26:56 +0000 (01:26 -0500)]
Fix another segfault in ls -C when terminal size is 0x0.
Isaac Dunham [Fri, 28 Jun 2013 07:11:48 +0000 (02:11 -0500)]
modinfo: support -b basedir and -k kernel.release, fix two bugs
Add two less-frequently used flags for modinfo; -b specifies an alternate
root and -k replaces the output of uname -r.
Additionally, avoid a potential overflow in sprintf,
and correct an inverted test.
Rob Landley [Thu, 27 Jun 2013 04:22:43 +0000 (23:22 -0500)]
Update status to include recently implemented commands.
Rob Landley [Sun, 23 Jun 2013 19:38:31 +0000 (14:38 -0500)]
Modinfo cleanups.
Don't use xopen() if you want to iterate through multiple files.
Don't abort if unable to open the file, but return error if it can't map it.
(And leak the filehandle.) All modinfo_file() actually uses is the filename,
no reason to go through dirtree() for that. Nothing is actually _checking_ the
return value of modinfo_file(). Avoid global data outside of toy_union.
Make sure extension is at end of file (we can add support for more extensions
later).
Isaac Dunham [Sun, 23 Jun 2013 19:02:16 +0000 (14:02 -0500)]
Patch that assumes that the presence of the string ".ko" indicates
use of a path to a module (*.ko.xz and similar included, but not supported).
Rob Landley [Sun, 23 Jun 2013 04:30:07 +0000 (23:30 -0500)]
Implement mv as an extension of cp.
Rob Landley [Sat, 22 Jun 2013 20:36:25 +0000 (15:36 -0500)]
Option type @ counts number of occurrences, it doesn't take an argument.
Rob Landley [Sat, 22 Jun 2013 19:23:06 +0000 (14:23 -0500)]
Generate FLAG_longopt macros for --longopts with no corresponding short option.
Rob Landley [Tue, 18 Jun 2013 23:13:06 +0000 (18:13 -0500)]
Add pivot_root.
Rob Landley [Mon, 17 Jun 2013 04:08:09 +0000 (23:08 -0500)]
Test cases for split.
Rob Landley [Mon, 17 Jun 2013 01:02:38 +0000 (20:02 -0500)]
Misc website updates.
Rob Landley [Mon, 17 Jun 2013 01:00:11 +0000 (20:00 -0500)]
Typo fix
Rob Landley [Mon, 17 Jun 2013 00:59:51 +0000 (19:59 -0500)]
Add xexit() and make error_exit() use it.
Rob Landley [Sun, 16 Jun 2013 21:37:43 +0000 (16:37 -0500)]
Implement split.
Rob Landley [Sun, 16 Jun 2013 07:23:59 +0000 (02:23 -0500)]
Upgrade modinfo to support multiple modules, and add tests, from Isaac Dunham.
Rob Landley [Sat, 15 Jun 2013 05:49:06 +0000 (00:49 -0500)]
Force 64 bit math in expr, from Daniel Verkamp
Rob Landley [Sat, 8 Jun 2013 19:11:41 +0000 (14:11 -0500)]
Yet more ifconfig cleanup.
Rob Landley [Wed, 5 Jun 2013 05:59:01 +0000 (00:59 -0500)]
Start of expr, by Daniel Verkamp.
Rob Landley [Mon, 3 Jun 2013 01:51:17 +0000 (20:51 -0500)]
More ifconfig cleanup, described on list.
Rob Landley [Sun, 2 Jun 2013 05:54:55 +0000 (00:54 -0500)]
Move stat from pending to other, default y.
Rob Landley [Sun, 2 Jun 2013 05:52:14 +0000 (00:52 -0500)]
Stat cleanup.
Move ftname out of GLOBALS into 'F' handler. Make 'i' zero pad output (zeroes
in middle of ID can get lost).
Rob Landley [Sun, 2 Jun 2013 05:24:24 +0000 (00:24 -0500)]
Stat cleanup.
lib: rename format_mode() to mode_to_string() (echoing string_to_mode), make it
take a normal char * argument.
stat: collapse big switch/case statements that only have one line each
into if/else staircase (much fewer lines of code). Remove return type
(other stat implementations print ? for unknown escapes, so do that here).
Inline do_stat() and do_statfs(). Set default string in normal local
variable "format". Remove unnecessary struct d. Restructure stat logic to
"if (flagf && !statfs()) else if (!flagf && !stat()) else perror_msg();"
Teach %N to add -> symlink. Judicious use of putchar() instead of xputc to
let FILE * do its job collating output.
Rob Landley [Sun, 2 Jun 2013 03:36:48 +0000 (22:36 -0500)]
Add peek/poke to header file.
Rob Landley [Sun, 2 Jun 2013 01:47:16 +0000 (20:47 -0500)]
Stat cleanup.
Put global stat info in a union so we don't have to malloc it and thus don't need an explicit size tracked in main(). Make date_stat_format() take a timespec and take advantage of stat having an embedded timespec (nanosecond printing), typecast the long long prints for XYZ because on some 32 bit platforms it's an int.
Rob Landley [Sun, 2 Jun 2013 01:41:35 +0000 (20:41 -0500)]
Enable readfile() and add peek() and poke() functions.
Rob Landley [Tue, 28 May 2013 05:28:45 +0000 (00:28 -0500)]
Stat cleanup.
From the mailing list:
Ok, first thing: clean up the help text. I realize what's there is copied verbatim from the man page, but that man page sucks. ("modification time" vs "change time"?) Took a bit of finagling to fit it in 80x24, but just made it.
GLOBALS() indent was still tab, change to two spaces. And I tend to put a blank line between options lib/args.c automatically fills out and normal globals.
We never do anything with date_stat_format() but immediately print it, might as well make the function do it.
The types[] array in do_stat() is a rough edge. Hmmm... there's no else case that sets the type in case it was unknown (such as 0). In theory, this never happens. In practice it means I can cheat slightly, given this observation:
$ find linux -name stat.h | xargs grep 'S_IF[A-Z]*[ \t]'
linux/include/uapi/linux/stat.h:#define S_IFMT
00170000
linux/include/uapi/linux/stat.h:#define S_IFSOCK
0140000
linux/include/uapi/linux/stat.h:#define S_IFLNK
0120000
linux/include/uapi/linux/stat.h:#define S_IFREG
0100000
linux/include/uapi/linux/stat.h:#define S_IFBLK
0060000
linux/include/uapi/linux/stat.h:#define S_IFDIR
0040000
linux/include/uapi/linux/stat.h:#define S_IFCHR
0020000
linux/include/uapi/linux/stat.h:#define S_IFIFO
0010000
I.E. the only place the I_IFBLAH constants occur a stat.h header in current linux code is in the generic stuff, it doesn't vary per target. (The access permission bits are actually subtly standardized in posix due to the command line arguments to chmod, although I'm sure cygwin finds a way to break. But the type fields, not so much. But linux has to be binary compatible with itself foreverish, and that's all I really care about.)
So, we have ALMOST have this going by twos, except there's no 8 and there is a 1. so let's make the 1 the default, feed a blank string into the 8... No, duh: octal. So it's actually 2, 4, 6, 8, 10, 12. So make the loop look like:
filetype = statf->st_mode & S_IFMT;
TT.ftname = types;
for (i = 1; filetype != (i*8192) && i < 7; i++)
TT.ftname += strlen(TT.ftname)+1;
Yes that's linux-specific, and I think I'm ok with that.
Printing all zeroes and pretending that's nanosecond resolution... either support it or don't. Let's see, supporting it is stat->st_atim.tv_nsec and similar... no mention of nanoseconds in strftime() (et tu, posix2008?) so pass it as a second argument and append it by hand... (Need to test that against musl...)
When we hit an unknown type in print_it() we print the literal character, which is right for %% but what about an unknown option?
$ stat -c %q /
?
Eh, I guess that's a "don't care". It didn't die with an error, that's the important thing.
I have a horrible idea for compressing the switch/case blocks, but should probably check this in and get some sleep for right now...
Felix Janda [Sun, 26 May 2013 07:48:13 +0000 (09:48 +0200)]
stat: Separate stat and statfs
Felix Janda [Sat, 25 May 2013 19:58:14 +0000 (21:58 +0200)]
stat: Add support for stat'ing multiple files
Rob Landley [Mon, 27 May 2013 18:39:03 +0000 (13:39 -0500)]
Tests for touch (needs more work).
Rob Landley [Mon, 27 May 2013 18:38:09 +0000 (13:38 -0500)]
Tests for losetup.
Rob Landley [Tue, 21 May 2013 05:23:23 +0000 (00:23 -0500)]
More ifconfig cleanup, inlining show_ip_addr(), hex_to_binary(), and set_hw_address().
Rob Landley [Tue, 21 May 2013 01:50:25 +0000 (20:50 -0500)]
Next round of ifconfig cleanup, to be described on mailing list.
Rob Landley [Sun, 19 May 2013 05:48:19 +0000 (00:48 -0500)]
Yet more ifconfig cleanup. (As described on the mailing list [CLEANUP] thread.)
Rob Landley [Sun, 19 May 2013 05:14:45 +0000 (00:14 -0500)]
xioctl() error message should use hex ioctl number; that's what headers list.
Ivo van Poorten [Sun, 19 May 2013 03:33:40 +0000 (22:33 -0500)]
Make groups handle multiple usernames on command line.
Rob Landley [Wed, 15 May 2013 01:42:54 +0000 (20:42 -0500)]
Tighten up lsusb, default to "y".
Rob Landley [Wed, 15 May 2013 01:22:23 +0000 (20:22 -0500)]
Silence warning and comment a subtle bit.
Andre Renaud [Tue, 14 May 2013 22:42:11 +0000 (17:42 -0500)]
Attached is a pretty simple implementation of lsub. It doesn't implement any of the flags/options, but does the raw output.
Ivo van poorten [Tue, 14 May 2013 05:03:26 +0000 (00:03 -0500)]
add groups implementation to id.c
Rob Landley [Mon, 13 May 2013 02:09:16 +0000 (21:09 -0500)]
Ifconfig cleanup to option parsing.
Rob Landley [Fri, 10 May 2013 23:57:01 +0000 (18:57 -0500)]
Convert getmountlist() to xgetmountlist().
Rob Landley [Fri, 10 May 2013 23:54:14 +0000 (18:54 -0500)]
Web page tweaks.
Rob Landley [Thu, 9 May 2013 04:19:45 +0000 (23:19 -0500)]
Add --help option to toybox command when TOYBOX_HELP is enabled.
Rob Landley [Wed, 8 May 2013 03:50:33 +0000 (22:50 -0500)]
Another stab at recapitulating phylogeny in a README file.
Rob Landley [Wed, 8 May 2013 03:03:31 +0000 (22:03 -0500)]
Some work I did over the weekend on nbd_client, not sure where I left off...
Felix Janda [Tue, 30 Apr 2013 19:11:43 +0000 (21:11 +0200)]
generated/help.h depends on CONFIG_TOYBOX_HELP
Rob Landley [Tue, 30 Apr 2013 05:31:01 +0000 (00:31 -0500)]
Fix bare longopts to set unique optflag bits.
Rob Landley [Mon, 29 Apr 2013 21:00:40 +0000 (16:00 -0500)]
The host sort on many distros behaves stupidly, and sorts stuff in non-ascii order by default. Make it stop.
Rob Landley [Mon, 29 Apr 2013 17:30:28 +0000 (12:30 -0500)]
Fix xabspath when last path component exists but we haven't got permissions to open it (ala readlink -f /dev/sda as a normal user). Spotted by Ashwini Sharma.