OSDN Git Service

android-x86/external-toybox.git
9 years agoam fc0d50d2: Merge remote-tracking branch \'toybox/master\' into HEAD
Elliott Hughes [Sat, 11 Jul 2015 21:03:00 +0000 (21:03 +0000)]
am fc0d50d2: Merge remote-tracking branch \'toybox/master\' into HEAD

* commit 'fc0d50d22bc6d71beae156445af98739cd322434':
  Fix 32-bit bionic toybox build.

9 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Sat, 11 Jul 2015 20:41:22 +0000 (13:41 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

9 years agoFix 32-bit bionic toybox build.
Elliott Hughes [Sat, 11 Jul 2015 19:20:31 +0000 (14:20 -0500)]
Fix 32-bit bionic toybox build.

https://android-review.googlesource.com/159035/

9 years agoam f8b41e81: Fix 32-bit bionic toybox build.
Elliott Hughes [Sat, 11 Jul 2015 02:39:28 +0000 (02:39 +0000)]
am f8b41e81: Fix 32-bit bionic toybox build.

* commit 'f8b41e81fca2b53410f80c95f111c754d5eff99a':
  Fix 32-bit bionic toybox build.

9 years agoFix 32-bit bionic toybox build.
Elliott Hughes [Sat, 11 Jul 2015 02:11:18 +0000 (19:11 -0700)]
Fix 32-bit bionic toybox build.

Change-Id: Ief60448ec3dddf88e0202fafaefa3c79462a3e70

9 years agoam 718f34dd: Regenerate generated files after upstream sync.
Elliott Hughes [Sat, 11 Jul 2015 01:39:47 +0000 (01:39 +0000)]
am 718f34dd: Regenerate generated files after upstream sync.

* commit '718f34dd95df3d20f2bd955f7fb30d65590e3ddd':
  Regenerate generated files after upstream sync.

9 years agoam f41c7e0b: Merge remote-tracking branch \'toybox/master\' into HEAD
Elliott Hughes [Sat, 11 Jul 2015 01:39:46 +0000 (01:39 +0000)]
am f41c7e0b: Merge remote-tracking branch \'toybox/master\' into HEAD

* commit 'f41c7e0b78a92bf606692bba4b5b92bee359f71b':
  Add a basename_r() and use it in names_to_pid() to avoid basename() overwriting itself on some inputs. (Which makes killall really impolite. Bug report from Nicholas Noury via Elliott Hughes.)
  More explanation of TOYBOX_DEBUG for option string checking.
  Move comment about TOYBOX_DEBUG to start of file so it's more obvious.
  ifconfig MAC addresses should be lowercase.
  I added dhcpd -6 option.
  find: add -inum option
  Rename a function to be more obvious, and factor out a repeated calculation the compiler was almost certainly retaining in a register anyway.
  Promote hwclock.
  Fix hwclock -w.
  There is a typo in mkfifo.c for __Z__  option.
  Fix ionice.
  Avoid integer overflow with insane input data.
  Save failure reason for each make change .bad file.

9 years agoRegenerate generated files after upstream sync.
Elliott Hughes [Sat, 11 Jul 2015 01:02:00 +0000 (18:02 -0700)]
Regenerate generated files after upstream sync.

Change-Id: I8d43cd7f341def8e1a7289110290c4d719fc3d15

9 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Sat, 11 Jul 2015 00:53:10 +0000 (17:53 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

9 years agoAdd a basename_r() and use it in names_to_pid() to avoid basename() overwriting
Rob Landley [Fri, 10 Jul 2015 19:52:14 +0000 (14:52 -0500)]
Add a basename_r() and use it in names_to_pid() to avoid basename() overwriting
itself on some inputs. (Which makes killall really impolite. Bug report
from Nicholas Noury via Elliott Hughes.)

9 years agoMore explanation of TOYBOX_DEBUG for option string checking.
Rob Landley [Fri, 10 Jul 2015 19:23:00 +0000 (14:23 -0500)]
More explanation of TOYBOX_DEBUG for option string checking.

9 years agoMove comment about TOYBOX_DEBUG to start of file so it's more obvious.
Rob Landley [Fri, 10 Jul 2015 19:12:44 +0000 (14:12 -0500)]
Move comment about TOYBOX_DEBUG to start of file so it's more obvious.

9 years agoifconfig MAC addresses should be lowercase.
Elliott Hughes [Fri, 10 Jul 2015 18:53:39 +0000 (13:53 -0500)]
ifconfig MAC addresses should be lowercase.

A minor nit, but for some reason this really stands out every time I
run ifconfig...

9 years agoI added dhcpd -6 option.
Yeongdeok Suh [Fri, 10 Jul 2015 18:49:12 +0000 (13:49 -0500)]
I added dhcpd -6 option.

It's for supporting ipv6, and I referred to RFC 3315 Specification
http://www.rfc-base.org/txt/rfc-3315.txt

There are some different kind of requests in dhcpd6,
but I inplemented only a basic protocol. (Solicit - Advertise - Request - Reply)
There's a sample packet as below. toybox dhcpd works in the same way.
http://packetlife.net/captures/DHCPv6.cap

9 years agoRevert "Don't add a symlink for killall --- it's broken."
Elliott Hughes [Fri, 10 Jul 2015 17:38:35 +0000 (10:38 -0700)]
Revert "Don't add a symlink for killall --- it's broken."

This reverts commit c96e42498c99b179444e6812dd8b0583f0624fcd.

9 years agoam c96e4249: Don\'t add a symlink for killall --- it\'s broken.
Elliott Hughes [Fri, 10 Jul 2015 17:35:02 +0000 (17:35 +0000)]
am c96e4249: Don\'t add a symlink for killall --- it\'s broken.

* commit 'c96e42498c99b179444e6812dd8b0583f0624fcd':
  Don't add a symlink for killall --- it's broken.

9 years agofind: add -inum option
Greg Hackmann [Fri, 10 Jul 2015 17:14:02 +0000 (12:14 -0500)]
find: add -inum option

-inum is a commonly implemented extension to search by inode number.

Linux's fs-layer tracepoints log many events in terms of inodes, so
"find -inum" is useful for mapping those events back to specific files.

9 years agoDon't add a symlink for killall --- it's broken.
Elliott Hughes [Fri, 10 Jul 2015 16:13:34 +0000 (09:13 -0700)]
Don't add a symlink for killall --- it's broken.

(Breakage described in http://b/22331310.)

Bug: http://b/22402103
Change-Id: I8ba017476def0537f0036ddbc7438bbc822619f8

9 years agoRename a function to be more obvious, and factor out a repeated calculation
Rob Landley [Fri, 10 Jul 2015 06:23:54 +0000 (01:23 -0500)]
Rename a function to be more obvious, and factor out a repeated calculation
the compiler was almost certainly retaining in a register anyway.

9 years agoPromote hwclock.
Rob Landley [Fri, 10 Jul 2015 06:21:28 +0000 (01:21 -0500)]
Promote hwclock.

9 years agoFix hwclock -w.
Elliott Hughes [Fri, 10 Jul 2015 05:57:22 +0000 (00:57 -0500)]
Fix hwclock -w.

The gmtime_r/localtime_r error check was backwards, and the wrong argument
was being passed to the RTC_SET_TIME ioctl.

Also, the error reporting was misleading (showing errno for functions that
don't set errno) and too vague for the user to tell what failed.

9 years agoThere is a typo in mkfifo.c for __Z__ option.
Sameer Pradhan [Thu, 9 Jul 2015 22:19:03 +0000 (17:19 -0500)]
There is a typo in mkfifo.c for __Z__  option.

9 years agoFix ionice.
Elliott Hughes [Wed, 8 Jul 2015 07:32:57 +0000 (02:32 -0500)]
Fix ionice.

ioprio_set takes a "prio" argument that combines class and level. Although
bionic (via the uapi headers) includes the appropriate constants and even
a convenience macro, glibc doesn't, so just hard-code the encoding.

Also fix the sense of a conditional so we actually execute the provided
command.

9 years agoam efac088b: Merge remote-tracking branch \'toybox/master\' into HEAD
Elliott Hughes [Tue, 7 Jul 2015 01:39:38 +0000 (01:39 +0000)]
am efac088b: Merge remote-tracking branch \'toybox/master\' into HEAD

* commit 'efac088b31902aaf676952d8b9beedab270d9a2d': (28 commits)
  Kylie McClain pointed out that -z affects both input and output.
  Actually set time with touch -d and -t when you don't specify nanonseconds.
  First pass on cp --preserve
  Promote xxd to other.
  Probe for fork() instead of relying on a distro-specific #define.
  Added i option to use other interface on running dhcpd.
  Cleanup xxd.
  Minor cleanups on xxd.
  The android guys sent in xxd. It doesn't share code with od and hexdump. Hmmm...
  Fix segfault with "mount -o ro,remount".
  Improve -Z error reporting.
  Fix top.c build.
  mkfifo -Z
  Add ionice and iorenice.
  Add undo buffer for 'u'.
  Simplify hexedit logic by adjusting viewport all in one place up top. (Easier to genericize logic and reuse later in less or vi...)
  Factor out more not-curses infrastructure into lib.
  Suggestion from Elliott Hughes: tweak test infrastructure to notice if command exits with high errno and assume it segfaulted.
  Fix version number in ifconfig cleanup reference.
  Don't segfault if none of the file arguments to ls exists.
  ...

9 years agoam 30b9035c: Merge "Redo mkstatus.py to grep pending for pending data and trust toybo...
Elliott Hughes [Tue, 7 Jul 2015 01:39:37 +0000 (01:39 +0000)]
am 30b9035c: Merge "Redo mkstatus.py to grep pending for pending data and trust toybox defconfig output for ready command list, to reduce manual updating."

* commit '30b9035c945c8783a1aefb1baeadc54ec650b51b':
  Redo mkstatus.py to grep pending for pending data and trust toybox defconfig output for ready command list, to reduce manual updating.

9 years agoam 3e713d86: Merge "Move the magic list of commands needing cleanup from toys/pending...
Elliott Hughes [Tue, 7 Jul 2015 01:39:37 +0000 (01:39 +0000)]
am 3e713d86: Merge "Move the magic list of commands needing cleanup from toys/pending/README to greppable TODO annotations in the individual files. (grep -riw TODO)"

* commit '3e713d8612c64d3819f20a872d74bd8e42461a8f':
  Move the magic list of commands needing cleanup from toys/pending/README to greppable TODO annotations in the individual files. (grep -riw TODO)

9 years agoam 9f05d690: Merge "On testing fold command, I found w option didnt check the range...
Elliott Hughes [Tue, 7 Jul 2015 01:39:36 +0000 (01:39 +0000)]
am 9f05d690: Merge "On testing fold command, I found w option didnt check the range of value."

* commit '9f05d690aa5c59b386f86f910933f3df8f13a746':
  On testing fold command, I found w option didnt check the range of value.

9 years agoam bef6d0ab: Merge "mknod: Add -Z option"
Elliott Hughes [Tue, 7 Jul 2015 01:39:36 +0000 (01:39 +0000)]
am bef6d0ab: Merge "mknod: Add -Z option"

* commit 'bef6d0ab42098805f15300c5c234ee8e352e3d5f':
  mknod: Add -Z option

9 years agoam e3764ccd: Regenerate generated files after upstream toybox sync.
Elliott Hughes [Tue, 7 Jul 2015 01:39:35 +0000 (01:39 +0000)]
am e3764ccd: Regenerate generated files after upstream toybox sync.

* commit 'e3764ccdc1fc3cde5a679539c58c825ed54293ee':
  Regenerate generated files after upstream toybox sync.

9 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Tue, 7 Jul 2015 01:17:00 +0000 (18:17 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

9 years agoMerge "Redo mkstatus.py to grep pending for pending data and trust toybox defconfig...
Elliott Hughes [Tue, 7 Jul 2015 01:16:09 +0000 (01:16 +0000)]
Merge "Redo mkstatus.py to grep pending for pending data and trust toybox defconfig output for ready command list, to reduce manual updating."

9 years agoMerge "Move the magic list of commands needing cleanup from toys/pending/README to...
Elliott Hughes [Tue, 7 Jul 2015 01:16:03 +0000 (01:16 +0000)]
Merge "Move the magic list of commands needing cleanup from toys/pending/README to greppable TODO annotations in the individual files. (grep -riw TODO)"

9 years agoMerge "On testing fold command, I found w option didnt check the range of value."
Elliott Hughes [Tue, 7 Jul 2015 01:14:17 +0000 (01:14 +0000)]
Merge "On testing fold command, I found w option didnt check the range of value."

9 years agoMerge "mknod: Add -Z option"
Elliott Hughes [Tue, 7 Jul 2015 01:14:11 +0000 (01:14 +0000)]
Merge "mknod: Add -Z option"

9 years agoRegenerate generated files after upstream toybox sync.
Elliott Hughes [Tue, 7 Jul 2015 01:09:49 +0000 (18:09 -0700)]
Regenerate generated files after upstream toybox sync.

Change-Id: I712c4e8391d333536887dcea162e640b2b73948e

9 years agoAvoid integer overflow with insane input data.
Rob Landley [Tue, 7 Jul 2015 00:41:57 +0000 (19:41 -0500)]
Avoid integer overflow with insane input data.

9 years agoSave failure reason for each make change .bad file.
Rob Landley [Mon, 6 Jul 2015 10:08:48 +0000 (05:08 -0500)]
Save failure reason for each make change .bad file.

9 years agoKylie McClain pointed out that -z affects both input and output.
Rob Landley [Sun, 5 Jul 2015 07:36:51 +0000 (02:36 -0500)]
Kylie McClain pointed out that -z affects both input and output.

Can't say I'm happy with the API (-z and -Z to keep them independent would
be nice), but compatibility with what exists trumps having a good API...

9 years agoActually set time with touch -d and -t when you don't specify nanonseconds.
Rob Landley [Sat, 4 Jul 2015 08:49:53 +0000 (03:49 -0500)]
Actually set time with touch -d and -t when you don't specify nanonseconds.

There's a nanoseconds field value that says use current time, which I set
but forgot to clear in the right places. (Oops.)

9 years agoFirst pass on cp --preserve
Rob Landley [Sat, 4 Jul 2015 04:08:39 +0000 (23:08 -0500)]
First pass on cp --preserve

9 years agoPromote xxd to other.
Rob Landley [Fri, 3 Jul 2015 20:19:07 +0000 (15:19 -0500)]
Promote xxd to other.

9 years agoProbe for fork() instead of relying on a distro-specific #define.
Rob Landley [Fri, 3 Jul 2015 20:17:25 +0000 (15:17 -0500)]
Probe for fork() instead of relying on a distro-specific #define.

9 years agoAdded i option to use other interface on running dhcpd.
Hyejin Kim [Fri, 3 Jul 2015 18:22:37 +0000 (13:22 -0500)]
Added i option to use other interface on running dhcpd.

9 years agoCleanup xxd.
Rob Landley [Thu, 2 Jul 2015 18:40:03 +0000 (13:40 -0500)]
Cleanup xxd.

9 years agoMinor cleanups on xxd.
Rob Landley [Thu, 2 Jul 2015 17:17:59 +0000 (12:17 -0500)]
Minor cleanups on xxd.

9 years agoThe android guys sent in xxd. It doesn't share code with od and hexdump. Hmmm...
Rob Landley [Thu, 2 Jul 2015 16:44:01 +0000 (11:44 -0500)]
The android guys sent in xxd. It doesn't share code with od and hexdump. Hmmm...

9 years agoFix segfault with "mount -o ro,remount".
Elliott Hughes [Wed, 1 Jul 2015 20:00:06 +0000 (15:00 -0500)]
Fix segfault with "mount -o ro,remount".

Or any call to comma_scan where 'opt' appears as the last item in 'optlist'.

9 years agoImprove -Z error reporting.
Elliott Hughes [Wed, 1 Jul 2015 19:56:07 +0000 (14:56 -0500)]
Improve -Z error reporting.

The most likely reason for setfscreatecon to fail is that you don't have permission, and that's reported by the write return EACCES. There isn't really a "bad" context; they're just strings.

Before:

  $ adb shell mkdir -Z x y
  mkdir: bad -Z 'x'

After:

  $ adb shell mkdir -Z x y
  mkdir: -Z 'x' failed: Permission denied

Other than this, the ToT mkdir works fine with SELinux.

9 years agoFix top.c build.
Elliott Hughes [Wed, 1 Jul 2015 19:46:23 +0000 (14:46 -0500)]
Fix top.c build.

Broken by recent lib.h additions.

9 years agomkfifo -Z
Rob Landley [Mon, 29 Jun 2015 06:31:34 +0000 (01:31 -0500)]
mkfifo -Z

9 years agoAdd ionice and iorenice.
Rob Landley [Sun, 28 Jun 2015 21:23:08 +0000 (16:23 -0500)]
Add ionice and iorenice.

9 years agoAdd undo buffer for 'u'.
Rob Landley [Sun, 28 Jun 2015 02:35:37 +0000 (21:35 -0500)]
Add undo buffer for 'u'.

9 years agoSimplify hexedit logic by adjusting viewport all in one place up top.
Rob Landley [Sat, 27 Jun 2015 18:36:25 +0000 (13:36 -0500)]
Simplify hexedit logic by adjusting viewport all in one place up top.
(Easier to genericize logic and reuse later in less or vi...)

9 years agoFactor out more not-curses infrastructure into lib.
Rob Landley [Fri, 26 Jun 2015 21:26:15 +0000 (16:26 -0500)]
Factor out more not-curses infrastructure into lib.

9 years agoSuggestion from Elliott Hughes: tweak test infrastructure to notice if
Rob Landley [Thu, 25 Jun 2015 22:55:54 +0000 (17:55 -0500)]
Suggestion from Elliott Hughes: tweak test infrastructure to notice if
command exits with high errno and assume it segfaulted.

9 years agoFix version number in ifconfig cleanup reference.
Rob Landley [Tue, 23 Jun 2015 19:35:57 +0000 (14:35 -0500)]
Fix version number in ifconfig cleanup reference.

9 years agoDon't segfault if none of the file arguments to ls exists.
Rob Landley [Tue, 23 Jun 2015 18:56:53 +0000 (13:56 -0500)]
Don't segfault if none of the file arguments to ls exists.

9 years agoDon't depend on malloc(0) to return non-null.
Rob Landley [Tue, 23 Jun 2015 18:15:13 +0000 (13:15 -0500)]
Don't depend on malloc(0) to return non-null.

9 years agoFix ls so spacing is right for ls -l, -o, -g, -og, -ogZ, -lZ, -gZ, and -oZ.
Rob Landley [Tue, 23 Jun 2015 17:59:19 +0000 (12:59 -0500)]
Fix ls so spacing is right for ls -l, -o, -g, -og, -ogZ, -lZ, -gZ, and -oZ.

9 years agoFluff up explanation of why 0BSD license for SPDX submission.
Rob Landley [Mon, 15 Jun 2015 20:19:11 +0000 (15:19 -0500)]
Fluff up explanation of why 0BSD license for SPDX submission.

9 years agoUse lsm_set_create() to set security blanket context before mknod, avoiding
Rob Landley [Mon, 15 Jun 2015 20:17:56 +0000 (15:17 -0500)]
Use lsm_set_create() to set security blanket context before mknod, avoiding
racy gap between create/label.

9 years agoam 18ed9c76: Explain why attempts to remove the libc++ dependency are futile.
Elliott Hughes [Thu, 11 Jun 2015 17:56:10 +0000 (17:56 +0000)]
am 18ed9c76: Explain why attempts to remove the libc++ dependency are futile.

* commit '18ed9c765096a1a9b993b29df74749f7e811315a':
  Explain why attempts to remove the libc++ dependency are futile.

9 years agoAdd nproc.
Rob Landley [Thu, 11 Jun 2015 08:35:49 +0000 (03:35 -0500)]
Add nproc.

9 years agoExplain why attempts to remove the libc++ dependency are futile.
Elliott Hughes [Wed, 10 Jun 2015 18:45:39 +0000 (11:45 -0700)]
Explain why attempts to remove the libc++ dependency are futile.

This isn't as useless as it seems though. It should prevent me from
going down this path a third time, and it removes one pointless barrier
that gets in the way of running a toybox binary on an older release.

Change-Id: Ia193eb7af162878a331db1b1e1c90ff0f617becb

9 years agoCosmetic tweak: no need for pages of text from "make defconfig" and friends.
Rob Landley [Wed, 10 Jun 2015 16:58:47 +0000 (11:58 -0500)]
Cosmetic tweak: no need for pages of text from "make defconfig" and friends.

9 years agoam 0e7e9a15: Switch to toybox mount(1).
Elliott Hughes [Mon, 8 Jun 2015 22:43:45 +0000 (22:43 +0000)]
am 0e7e9a15: Switch to toybox mount(1).

* commit '0e7e9a15726650e492b09f51a48ef14a7e1b0c2e':
  Switch to toybox mount(1).

9 years agoSwitch to toybox mount(1).
Elliott Hughes [Mon, 8 Jun 2015 21:52:58 +0000 (14:52 -0700)]
Switch to toybox mount(1).

Change-Id: I3a42b70644897e46b46e730b3a39371e35a4dbab

9 years agoLast grep commit broke non -r use of grep. Oops.
Rob Landley [Sun, 7 Jun 2015 02:34:02 +0000 (21:34 -0500)]
Last grep commit broke non -r use of grep. Oops.

9 years agoMake "printf --" and "printf ---" work.
Rob Landley [Tue, 2 Jun 2015 14:58:51 +0000 (09:58 -0500)]
Make "printf --" and "printf ---" work.

9 years agoam 6f52fbcc: Add a symlink for tty(1).
Elliott Hughes [Sun, 31 May 2015 19:04:38 +0000 (19:04 +0000)]
am 6f52fbcc: Add a symlink for tty(1).

* commit '6f52fbcc814f574517cd9a4516f6b9fe45f1afba':
  Add a symlink for tty(1).

9 years agoam 8eaf5baa: Add generated/cflags to .gitignore.
Elliott Hughes [Sun, 31 May 2015 17:14:20 +0000 (17:14 +0000)]
am 8eaf5baa: Add generated/cflags to .gitignore.

* commit '8eaf5baa49687b84716f71f518f5fde133c23b1a':
  Add generated/cflags to .gitignore.

9 years agoam a0da26da: Regenerate generated files.
Elliott Hughes [Sun, 31 May 2015 17:14:19 +0000 (17:14 +0000)]
am a0da26da: Regenerate generated files.

* commit 'a0da26da9e470dd4c6790c4a54d26ac71e144eeb':
  Regenerate generated files.

9 years agoam 8bdb3249: Merge remote-tracking branch \'toybox/master\' into HEAD
Elliott Hughes [Sun, 31 May 2015 17:14:18 +0000 (17:14 +0000)]
am 8bdb3249: Merge remote-tracking branch \'toybox/master\' into HEAD

* commit '8bdb32495fe8f0a038fe0ac02905dc4f2d8c660b':
  Attempt to fix the mkdir LSM race.
  ls -lZ wasn't putting a space before the xattr output.
  mkdir: Fix argument of option -Z
  Make "grep -r regex" work on implicit "." if no files specified.
  Add -Z support to mkdir, based on a patch from Jose Bollo.
  Adapted patch from José Bollo to do the "tonight we're gonna api like it's 1999 and every path ever is from cwd or root" api versions for sockets and as a fallback of the open fails.
  Switch id over to new infrastructure, switch id to use FORCE_FLAGS, and make lib/lsm.h auto-include from toys.h.
  Fix "ls -Z . toys" segfaulting, because preprocessing skipped.
  Recent commit broke ls -R (test reversed), and "ls -R singledir" should show label: at the start (yes, even "ls -R" in an empty dir).
  More ls -Z upgrading. Move TOYBOX_SELINUX and TOYBOX_SMACK support from portability.h to new lib/lsm.h. Update ls.c to use it.
  stat: fix group name

9 years agoRedo mkstatus.py to grep pending for pending data and trust toybox
Rob Landley [Sun, 31 May 2015 10:15:47 +0000 (05:15 -0500)]
Redo mkstatus.py to grep pending for pending data and trust toybox
defconfig output for ready command list, to reduce manual updating.

9 years agoMove the magic list of commands needing cleanup from toys/pending/README
Rob Landley [Sun, 31 May 2015 10:11:28 +0000 (05:11 -0500)]
Move the magic list of commands needing cleanup from toys/pending/README
to greppable TODO annotations in the individual files. (grep -riw TODO)

9 years agoOn testing fold command, I found w option didnt check the range of value.
Hyejin Kim [Mon, 25 May 2015 06:51:56 +0000 (01:51 -0500)]
On testing fold command, I found w option didnt check the range of value.

9 years agomknod: Add -Z option
José Bollo [Mon, 11 May 2015 16:54:15 +0000 (18:54 +0200)]
mknod: Add -Z option

Change-Id: I23174fb7b54d029784e6d7460368128113090079

9 years agoAdd a symlink for tty(1).
Elliott Hughes [Sun, 31 May 2015 17:02:48 +0000 (10:02 -0700)]
Add a symlink for tty(1).

It's POSIX and I find myself using it a surprising amount for debugging,
especially adb. (And, as long as our ps is non-standard, you can't just
type "ps" to see what tty you're on.)

Change-Id: I45aae330f0e6bfbd90829005f199b44bb9aa3c50

9 years agoAdd generated/cflags to .gitignore.
Elliott Hughes [Sun, 31 May 2015 16:53:31 +0000 (09:53 -0700)]
Add generated/cflags to .gitignore.

Change-Id: I64b94e69b7670a1c0e739abb650544bd9e5d7d4d

9 years agoRegenerate generated files.
Elliott Hughes [Sun, 31 May 2015 16:51:58 +0000 (09:51 -0700)]
Regenerate generated files.

Change-Id: I7525f17bf72a87d6eb25d687b70e5b7b4dd41d03

9 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Sat, 30 May 2015 20:22:56 +0000 (13:22 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

9 years agoAttempt to fix the mkdir LSM race.
Rob Landley [Thu, 28 May 2015 06:43:47 +0000 (01:43 -0500)]
Attempt to fix the mkdir LSM race.

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.

9 years agoam 632d81c4: Add MODULE_LICENSE and NOTICE
Bill Yi [Fri, 22 May 2015 21:11:09 +0000 (21:11 +0000)]
am 632d81c4: Add MODULE_LICENSE and NOTICE

* commit '632d81c469358ec4f41a90474dcf93326839438a':
  Add MODULE_LICENSE and NOTICE

9 years agoAdd MODULE_LICENSE and NOTICE
Bill Yi [Fri, 22 May 2015 20:45:26 +0000 (13:45 -0700)]
Add MODULE_LICENSE and NOTICE

Change-Id: I0c800604bcbd6b5e63f3782540754f07534c22fb

9 years agols -lZ wasn't putting a space before the xattr output.
Rob Landley [Fri, 22 May 2015 02:25:41 +0000 (21:25 -0500)]
ls -lZ wasn't putting a space before the xattr output.

9 years agomkdir: Fix argument of option -Z
José Bollo [Fri, 22 May 2015 02:00:25 +0000 (21:00 -0500)]
mkdir: Fix argument of option -Z

9 years agoMake "grep -r regex" work on implicit "." if no files specified.
Rob Landley [Thu, 21 May 2015 04:59:53 +0000 (23:59 -0500)]
Make "grep -r regex" work on implicit "." if no files specified.

9 years agoAdd -Z support to mkdir, based on a patch from Jose Bollo.
Rob Landley [Wed, 20 May 2015 04:29:18 +0000 (23:29 -0500)]
Add -Z support to mkdir, based on a patch from Jose Bollo.

I have no idea why -Z isn't showing up in mkdir --help when enabled, I
need to look at that...

9 years agoAdapted patch from José Bollo to do the "tonight we're gonna api like
Rob Landley [Tue, 19 May 2015 19:53:06 +0000 (14:53 -0500)]
Adapted patch from José Bollo to do the "tonight we're gonna api like
it's 1999 and every path ever is from cwd or root" api versions for sockets
and as a fallback of the open fails.

There are still some holes (symlink to socket with -L will give you info
about the symlink, not the socket, and symlink to a file you can't open will
give you info about the symlink, not the file) but the correct fix is
to make O_PATH work in the kernel for the LSM functions. (If we can read
this data by path, we should be able to read it by O_PATH. We should not
need two codepaths for this.)

9 years agoSwitch id over to new infrastructure, switch id to use FORCE_FLAGS, and
Rob Landley [Tue, 19 May 2015 00:14:53 +0000 (19:14 -0500)]
Switch id over to new infrastructure, switch id to use FORCE_FLAGS, and
make lib/lsm.h auto-include from toys.h.

9 years agoFix "ls -Z . toys" segfaulting, because preprocessing skipped.
Rob Landley [Mon, 18 May 2015 19:48:11 +0000 (14:48 -0500)]
Fix "ls -Z . toys" segfaulting, because preprocessing skipped.

strwidth() got called on ->extra which was NULL. Had some other bad effects
ala "ls -sk file1 file2 file3" ignored the -k. This should fix that too.

9 years agoRecent commit broke ls -R (test reversed), and "ls -R singledir" should
Rob Landley [Mon, 18 May 2015 18:33:36 +0000 (13:33 -0500)]
Recent commit broke ls -R (test reversed), and "ls -R singledir" should
show label: at the start (yes, even "ls -R" in an empty dir).

9 years agoMore ls -Z upgrading. Move TOYBOX_SELINUX and TOYBOX_SMACK support from
Rob Landley [Mon, 18 May 2015 07:00:43 +0000 (02:00 -0500)]
More ls -Z upgrading. Move TOYBOX_SELINUX and TOYBOX_SMACK support from
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...

9 years agoMerge branch 'mnc-dev-plus-aosp' of https://googleplex-android.googlesource.com/_dire...
Elliott Hughes [Sat, 16 May 2015 06:50:27 +0000 (06:50 +0000)]
Merge branch 'mnc-dev-plus-aosp' of https://googleplex-android.googlesource.com/_direct/platform/external/toybox into mnc-dev-plus-aosp

9 years agoam 45d0f825: Revert "Switch to toybox ls."
Elliott Hughes [Sat, 16 May 2015 06:50:23 +0000 (06:50 +0000)]
am 45d0f825: Revert "Switch to toybox ls."

* commit '45d0f825c8d3c3b2dea18796ebb04071672ead0f':
  Revert "Switch to toybox ls."

9 years agoRevert "Switch to toybox ls."
Elliott Hughes [Sat, 16 May 2015 06:28:13 +0000 (06:28 +0000)]
Revert "Switch to toybox ls."

This reverts commit 981564094b07bb82d78667f317478a8a018a814b.

Change-Id: Ib84805d06a8ba281bc2a5d2f2b469f6f07d1769a
(cherry picked from commit 45d0f825c8d3c3b2dea18796ebb04071672ead0f)

9 years agoRevert "Switch to toybox ls."
Elliott Hughes [Sat, 16 May 2015 06:28:13 +0000 (06:28 +0000)]
Revert "Switch to toybox ls."

This reverts commit 981564094b07bb82d78667f317478a8a018a814b.

Change-Id: Ib84805d06a8ba281bc2a5d2f2b469f6f07d1769a

9 years agoMerge remote-tracking branch 'goog/mnc-dev-plus-aosp' into mm
Elliott Hughes [Sat, 16 May 2015 00:55:54 +0000 (17:55 -0700)]
Merge remote-tracking branch 'goog/mnc-dev-plus-aosp' into mm

9 years agoam 98156409: Switch to toybox ls.
Elliott Hughes [Sat, 16 May 2015 00:43:20 +0000 (00:43 +0000)]
am 98156409: Switch to toybox ls.

* commit '981564094b07bb82d78667f317478a8a018a814b':
  Switch to toybox ls.

9 years agoam 30d712d3: Remove lspci.
Elliott Hughes [Sat, 16 May 2015 00:37:34 +0000 (00:37 +0000)]
am 30d712d3: Remove lspci.

* commit '30d712d325f71d51d428b94ead0ef9f4698f30c8':
  Remove lspci.