OSDN Git Service

android-x86/external-toybox.git
7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: 89bb822f3e
Elliott Hughes [Mon, 2 Oct 2017 17:02:35 +0000 (17:02 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: 89bb822f3e
am: 243a090d82

Change-Id: I60d7c28199f0e7e49098459cd5bf0ccc6f0d6b7c

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Mon, 2 Oct 2017 16:59:30 +0000 (16:59 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: 89bb822f3e

Change-Id: I0ba2a80d0d3a593ba89359fd6cc4f8d3c609ee1e

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Mon, 2 Oct 2017 15:09:49 +0000 (08:09 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

Change-Id: I960715d0496be2af52a090af8b0715ea61914838

7 years agoFix xargs to obey POSIX's ARG_MAX restrictions.
Elliott Hughes [Wed, 20 Sep 2017 20:53:23 +0000 (13:53 -0700)]
Fix xargs to obey POSIX's ARG_MAX restrictions.

This avoids "xargs: exec echo: Argument list too long" errors in practice.

find(1) needs to be fixed too, but that's a bit more complicated and a working
xargs provides a workaround.

Bug: http://b/65818597
Test: find /proc | strace -f -e execve ./toybox xargs echo > /dev/null

7 years agoBasic Mach-O support in file(1).
Elliott Hughes [Mon, 25 Sep 2017 16:59:48 +0000 (09:59 -0700)]
Basic Mach-O support in file(1).

The Nexus Player build was subtly broken in that it assumed that the host was
using ELF. No-one noticed until a Mac user tried to flash their build, which
contained a Mach-O x86 binary instead of an ELF x86 binary. Hilarity ensued.

(On the same day, file(1) was able to explain a mixup with an ELF hexagon
binary. Next time we see a Mach-O binary on an Android device, we'll be ready!)

Bug: http://b/66741960

7 years agoAdd #warning about musl intentionally breaking chrt.
Rob Landley [Thu, 21 Sep 2017 20:33:01 +0000 (15:33 -0500)]
Add #warning about musl intentionally breaking chrt.

7 years agoBuild toybox iotop. am: 33cf0f77c8
Elliott Hughes [Tue, 19 Sep 2017 21:44:04 +0000 (21:44 +0000)]
Build toybox iotop. am: 33cf0f77c8
am: a0f59ea43d

Change-Id: Ia86aa224a6fc21e2a9edac19fd1b7ddcd71b6b25

7 years agoBuild toybox iotop.
Elliott Hughes [Tue, 19 Sep 2017 21:39:06 +0000 (21:39 +0000)]
Build toybox iotop.
am: 33cf0f77c8

Change-Id: I47efef72d1cce8a6d2f25eb1c1f86251888c71db

7 years agoBuild toybox iotop.
Elliott Hughes [Mon, 18 Sep 2017 23:44:16 +0000 (16:44 -0700)]
Build toybox iotop.

Bug: N/A
Test: adb shell toybox iotop
Change-Id: I9e0fa345e4defe4d60e196b5c9acdd70f7c2d272

7 years agoFix URL typo
Zach Riggle [Wed, 13 Sep 2017 17:15:45 +0000 (12:15 -0500)]
Fix URL typo

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: f37062b46d
Elliott Hughes [Thu, 14 Sep 2017 16:03:46 +0000 (16:03 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: f37062b46d
am: a949b8829c

Change-Id: I2add91bb705fe680ddfe344118c4763d0d09bfd5

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Thu, 14 Sep 2017 16:01:20 +0000 (16:01 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: f37062b46d

Change-Id: I69d3341992386193d7a6c8b13e98db2ee44437fa

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Thu, 14 Sep 2017 06:25:38 +0000 (23:25 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

Change-Id: I8697d5bd7aa445d4c7acae8164eda00d20fa3c38

7 years agoLast commit used xstrtod(), forgot to check it in.
Rob Landley [Sun, 10 Sep 2017 03:05:10 +0000 (22:05 -0500)]
Last commit used xstrtod(), forgot to check it in.

7 years agoRedo/add seq precision logic.
Rob Landley [Sun, 10 Sep 2017 02:35:19 +0000 (21:35 -0500)]
Redo/add seq precision logic.

Josh Gao hit a case where "seq 1000000 1000001" output 1e+06, and while he
was there changed several things to work like existing seq implementations.
I changed a couple back (commenting out the test cases) until somebody
came come up with a reason (or existing use case) to do it that way.

7 years agoTighten up wc -m tests (which no longer depend on $LANG).
Rob Landley [Wed, 6 Sep 2017 11:12:09 +0000 (06:12 -0500)]
Tighten up wc -m tests (which no longer depend on $LANG).

7 years agoReplace remaining mb*towc() calls with utf8towc().
Rob Landley [Wed, 6 Sep 2017 02:04:43 +0000 (21:04 -0500)]
Replace remaining mb*towc() calls with utf8towc().

7 years agoTweak utf8towc() to return -1 earlier sometimes (instead of -2), and add test
Rob Landley [Tue, 5 Sep 2017 07:36:24 +0000 (02:36 -0500)]
Tweak utf8towc() to return -1 earlier sometimes (instead of -2), and add test
program to compare against libc output.

7 years agoutf8towc() has to be in lib.c if strlower() is going to use it, because
Rob Landley [Sun, 3 Sep 2017 01:40:24 +0000 (20:40 -0500)]
utf8towc() has to be in lib.c if strlower() is going to use it, because
scripts/*.c builds against lib.c but not linestack.c.

7 years agoIn wc, replace mbrtowc() with new utf8towc() which doesn't have a context struct
Rob Landley [Sat, 2 Sep 2017 23:15:09 +0000 (18:15 -0500)]
In wc, replace mbrtowc() with new utf8towc() which doesn't have a context struct
or care about locale.

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: 11385503ee
Elliott Hughes [Fri, 1 Sep 2017 01:16:32 +0000 (01:16 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: 11385503ee
am: 4077f75055

Change-Id: Ia1136cf64257e0bbe11cafbee5cae87f9bea8265

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Fri, 1 Sep 2017 01:13:05 +0000 (01:13 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: 11385503ee

Change-Id: I901afa0deb4ec639315342fd0526987a87972530

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Thu, 31 Aug 2017 23:17:43 +0000 (16:17 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

7 years agoAnother try at fixing the ps segfault resulting from /proc entries vanishing
Rob Landley [Thu, 31 Aug 2017 21:50:27 +0000 (16:50 -0500)]
Another try at fixing the ps segfault resulting from /proc entries vanishing
out from under us due to asyncronous process exit.

The directory we're traversing vanishing can result in DIRTREE_ABORTVAL
being returned, which we turn into a NUL entry, but then we were trying to
look at that null entry's children. Oops.

7 years agoMerge changes Ic29ef854,Ib285513b,Iad699b76,I40ecac5c,Iab911639, ... am: ff808f44a5
Elliott Hughes [Wed, 23 Aug 2017 22:41:28 +0000 (22:41 +0000)]
Merge changes Ic29ef854,Ib285513b,Iad699b76,I40ecac5c,Iab911639, ... am: ff808f44a5
am: c6038dc77c

Change-Id: I0e8e8b9cb9741b5cb839e25f059590ce5c303429

7 years agoMerge changes Ic29ef854,Ib285513b,Iad699b76,I40ecac5c,Iab911639, ...
Elliott Hughes [Wed, 23 Aug 2017 22:38:02 +0000 (22:38 +0000)]
Merge changes Ic29ef854,Ib285513b,Iad699b76,I40ecac5c,Iab911639, ...
am: ff808f44a5

Change-Id: I7ddf3bbde0a08795019f87c986ae0a423b15c64e

7 years agoMerge changes Ic29ef854,Ib285513b,Iad699b76,I40ecac5c,Iab911639, ...
Treehugger Robot [Wed, 23 Aug 2017 22:17:22 +0000 (22:17 +0000)]
Merge changes Ic29ef854,Ib285513b,Iad699b76,I40ecac5c,Iab911639, ...

* changes:
  Merge remote-tracking branch 'toybox/master' into HEAD
  Fix iconv build and add trivial test.
  lsof cleanup.
  Check for .git before setting GITHASH.
  Allow GITHASH to be set on the command line, to work around a yocto bug.
  Don't unnecessarily use printf in wc.test when echo will do.
  Test that our rm -rf can zap chmod 000 directories. (Skip test on host because ubuntu's can't.)
  Add basic env.test
  testcmd should only use absolute path to command when not doing TEST_HOST.
  Typo (env -0 was checking the flag wrong).

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Wed, 23 Aug 2017 19:40:12 +0000 (12:40 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

Change-Id: Ic29ef85448390b4cddfc42d4b11a6d62780a6d26

7 years agoFix iconv build and add trivial test.
Elliott Hughes [Tue, 22 Aug 2017 21:03:45 +0000 (14:03 -0700)]
Fix iconv build and add trivial test.

7 years agolsof cleanup.
Rob Landley [Fri, 18 Aug 2017 02:50:27 +0000 (21:50 -0500)]
lsof cleanup.

7 years agoCheck in my Android test-running script. am: d3633b18c3 am: 437565ff8b
Elliott Hughes [Wed, 9 Aug 2017 21:57:40 +0000 (21:57 +0000)]
Check in my Android test-running script. am: d3633b18c3 am: 437565ff8b
am: 4c3f9c371a

Change-Id: Id6f9147b634a15d27bb97a94c2d2a1256305dbc3

7 years agoCheck in my Android test-running script. am: d3633b18c3
Elliott Hughes [Wed, 9 Aug 2017 21:55:37 +0000 (21:55 +0000)]
Check in my Android test-running script. am: d3633b18c3
am: 437565ff8b

Change-Id: Ideaa9eb87720ac0fb307e6c579320891d8117a96

7 years agoCheck in my Android test-running script.
Elliott Hughes [Wed, 9 Aug 2017 21:53:09 +0000 (21:53 +0000)]
Check in my Android test-running script.
am: d3633b18c3

Change-Id: I7bef631169150aa217ca3c619a83c704edfd509f

7 years agoCheck in my Android test-running script.
Elliott Hughes [Thu, 3 Aug 2017 21:52:32 +0000 (14:52 -0700)]
Check in my Android test-running script.

Also update the documentation in Android.mk.

Bug: N/A
Test: ran tests
Change-Id: Id986221f274101fff4d42b2a538bf39cd4956e06

7 years agoCheck for .git before setting GITHASH.
Rob Landley [Mon, 7 Aug 2017 01:42:34 +0000 (20:42 -0500)]
Check for .git before setting GITHASH.

The GITHASH problem was building a tarball version under an existing git repo,
where git describe found ../../../../.git so only call git if we have a .git
directory in the source.

7 years agoAllow GITHASH to be set on the command line, to work around a yocto bug.
Rob Landley [Sun, 6 Aug 2017 01:12:57 +0000 (20:12 -0500)]
Allow GITHASH to be set on the command line, to work around a yocto bug.

7 years agoDon't unnecessarily use printf in wc.test when echo will do.
Elliott Hughes [Fri, 4 Aug 2017 00:13:20 +0000 (17:13 -0700)]
Don't unnecessarily use printf in wc.test when echo will do.

(And is much faster if your shell doesn't have a builtin printf.)

7 years agoTest that our rm -rf can zap chmod 000 directories. (Skip test on host
Rob Landley [Tue, 25 Jul 2017 20:13:16 +0000 (15:13 -0500)]
Test that our rm -rf can zap chmod 000 directories. (Skip test on host
because ubuntu's can't.)

7 years agoAdd basic env.test
Rob Landley [Sun, 23 Jul 2017 19:32:27 +0000 (14:32 -0500)]
Add basic env.test

7 years agotestcmd should only use absolute path to command when not doing TEST_HOST.
Rob Landley [Sat, 22 Jul 2017 22:00:11 +0000 (17:00 -0500)]
testcmd should only use absolute path to command when not doing TEST_HOST.

7 years agoTypo (env -0 was checking the flag wrong).
Rob Landley [Sat, 22 Jul 2017 21:44:00 +0000 (16:44 -0500)]
Typo (env -0 was checking the flag wrong).

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: 3f4a99df44 am: e81bf45656
Elliott Hughes [Sat, 22 Jul 2017 01:30:02 +0000 (01:30 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: 3f4a99df44 am: e81bf45656
am: 84a7c0bc55

Change-Id: Idb7bef292e1c9d37e8d6fd09877e8842c7d3e5c7

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: 3f4a99df44
Elliott Hughes [Sat, 22 Jul 2017 01:27:31 +0000 (01:27 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: 3f4a99df44
am: e81bf45656

Change-Id: I36e77656b872d58531497c15371abc4fd1059197

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Sat, 22 Jul 2017 01:25:35 +0000 (01:25 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: 3f4a99df44

Change-Id: I9a899ec7891a9d14d934dfa306ee0a8c082d74a2

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Fri, 21 Jul 2017 22:01:10 +0000 (15:01 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

7 years agonetcat: make -l exit after handling a request.
Josh Gao [Fri, 9 Jun 2017 17:51:18 +0000 (10:51 -0700)]
netcat: make -l exit after handling a request.

Bug: http://b/62305466

7 years agotypo
Rob Landley [Mon, 17 Jul 2017 10:37:05 +0000 (05:37 -0500)]
typo

7 years agoRedo ping plumbing. Actual ping part isn't there yet because kernel weirdness.
Rob Landley [Mon, 17 Jul 2017 10:24:34 +0000 (05:24 -0500)]
Redo ping plumbing. Actual ping part isn't there yet because kernel weirdness.

7 years agoSplit out xgetaddrinfo() from xconnect()
Rob Landley [Mon, 17 Jul 2017 10:23:45 +0000 (05:23 -0500)]
Split out xgetaddrinfo() from xconnect()

7 years agoFix toybox_vendor dependencies again. am: 2211432f50 am: 2491131bd4
Yifan Hong [Fri, 14 Jul 2017 19:39:48 +0000 (19:39 +0000)]
Fix toybox_vendor dependencies again. am: 2211432f50 am: 2491131bd4
am: 35c8dee8cf

Change-Id: Ib1a52d5367879e2d592d94367bdc55b6c9a14edc

7 years agoFix toybox_vendor dependencies again. am: 2211432f50
Yifan Hong [Fri, 14 Jul 2017 19:37:11 +0000 (19:37 +0000)]
Fix toybox_vendor dependencies again. am: 2211432f50
am: 2491131bd4

Change-Id: I86dbcd59297a067e9c095b4015db2037cf87b337

7 years agoFix toybox_vendor dependencies again.
Yifan Hong [Fri, 14 Jul 2017 19:34:11 +0000 (19:34 +0000)]
Fix toybox_vendor dependencies again.
am: 2211432f50

Change-Id: Ie9e53014faad1c8a1a9e52d3f0fbce971f2a039f

7 years agoFix toybox_vendor dependencies again.
Yifan Hong [Thu, 13 Jul 2017 00:56:30 +0000 (00:56 +0000)]
Fix toybox_vendor dependencies again.

toybox_vendor now links to other libraries as shared libraries.
This allows toybox_vendor to use the "vendor" version of these libraries
(in particular, liblog and libselinx_vendor).

Test: mma -j
Test: m -j, flash, boots
Test: `adb shell /vendor/bin/restorecon /dev/null` shows error message
Test: `adb shell /vendor/bin/getprop -Z' shows error message
Test: mma -j BOARD_VNDK_VERSION=current

Bug: 63537547
Bug: 62886649

Change-Id: Ia55cc50bd4dbf14ac3a7fdc27be5974074741a26

7 years agoRevert "Fix toybox_vendor dependencies on libselinux_vendor." am: cf90d7eb8f am:...
Jeffrey Vander Stoep [Thu, 13 Jul 2017 00:31:34 +0000 (00:31 +0000)]
Revert "Fix toybox_vendor dependencies on libselinux_vendor." am: cf90d7eb8f am: 3391276ee0
am: d9729a74e0

Change-Id: Ic88baf2c195e4eef503b3be91ffb5b02ff6bf091

7 years agoRevert "Fix toybox_vendor dependencies on libselinux_vendor." am: cf90d7eb8f
Jeffrey Vander Stoep [Thu, 13 Jul 2017 00:29:03 +0000 (00:29 +0000)]
Revert "Fix toybox_vendor dependencies on libselinux_vendor." am: cf90d7eb8f
am: 3391276ee0

Change-Id: I352844f6fbc30c5fc4eb84e81305f7b4480c74c0

7 years agoRevert "Fix toybox_vendor dependencies on libselinux_vendor."
Jeffrey Vander Stoep [Thu, 13 Jul 2017 00:26:37 +0000 (00:26 +0000)]
Revert "Fix toybox_vendor dependencies on libselinux_vendor."
am: cf90d7eb8f

Change-Id: I87a2558190f9183b4674b542f730cd0c481b66ec

7 years agoRevert "Fix toybox_vendor dependencies on libselinux_vendor."
Jeffrey Vander Stoep [Mon, 10 Jul 2017 06:19:45 +0000 (06:19 +0000)]
Revert "Fix toybox_vendor dependencies on libselinux_vendor."

This reverts commit 9e5e16264cf411f4efbb509e8df4630f4996a21a.

Bug: 63537547
Bug: 62886649

Change-Id: I881f74b59e93819067b52ca07d21e7f650886ac8

7 years agoDon't include the build number in `toybox --version`.
Elliott Hughes [Tue, 11 Jul 2017 19:01:55 +0000 (19:01 +0000)]
Don't include the build number in `toybox --version`.
am: 51566dfbb4

Change-Id: Iffad57b40c239b62dd3899b2199ddf1bef2e30e2

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: b62e8ff3da am: 63a7993a8f
Elliott Hughes [Tue, 11 Jul 2017 18:55:29 +0000 (18:55 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: b62e8ff3da am: 63a7993a8f
am: 724542f80a

Change-Id: I3b412a6662df6896f5f59503a64cf7d06c4a02b0

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: b62e8ff3da
Elliott Hughes [Tue, 11 Jul 2017 18:52:24 +0000 (18:52 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: b62e8ff3da
am: 63a7993a8f

Change-Id: I9140de37d50dd91ac8798367307dbfa67b9a23ba

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Tue, 11 Jul 2017 18:48:54 +0000 (18:48 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: b62e8ff3da

Change-Id: I2720c0aa0fce8d3afb854edaf4dd7b91ee48d8a9

7 years agoDon't include the build number in `toybox --version`.
Elliott Hughes [Tue, 11 Jul 2017 00:14:20 +0000 (17:14 -0700)]
Don't include the build number in `toybox --version`.

This adds undesired noise to OTA packages, and isn't worth that cost.

Bug: http://b/63513984
Test: toybox --version

(cherry picked from commit bf4741d56c55172ffbeffdf21b8d2e5ff5916991)

Change-Id: I4cefb27954c708f06df70bc1874f19927ba16801

7 years agoDon't include the build number in `toybox --version`. am: bf4741d56c am: 7ecc0fa0e3
Elliott Hughes [Tue, 11 Jul 2017 16:07:13 +0000 (16:07 +0000)]
Don't include the build number in `toybox --version`. am: bf4741d56c am: 7ecc0fa0e3
am: 3ebb2f4d8a

Change-Id: Ic301b60498246f6a4d59b03dc8905799125463fd

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Tue, 11 Jul 2017 16:04:11 +0000 (09:04 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

Change-Id: I752a046ed45ada48db41a0b2b11428f5a344b90b

7 years agoDon't include the build number in `toybox --version`. am: bf4741d56c
Elliott Hughes [Tue, 11 Jul 2017 16:03:43 +0000 (16:03 +0000)]
Don't include the build number in `toybox --version`. am: bf4741d56c
am: 7ecc0fa0e3

Change-Id: Ic5abe957351ee098f2a2d23b0dd439e1bbeca5e3

7 years agoDon't include the build number in `toybox --version`.
Elliott Hughes [Tue, 11 Jul 2017 16:00:13 +0000 (16:00 +0000)]
Don't include the build number in `toybox --version`.
am: bf4741d56c

Change-Id: I09153d00fb62c2d7ba583765dcc5a3eace581acf

7 years agoDon't remove "remount" from the option list during early parsing, the mount
Rob Landley [Tue, 11 Jul 2017 10:17:35 +0000 (05:17 -0500)]
Don't remove "remount" from the option list during early parsing, the mount
flag doesn't get set right otherwise and it tries to overmount instead.

7 years agocomma_scan()'s clean option wasn't removing entry at end of list.
Rob Landley [Tue, 11 Jul 2017 10:16:09 +0000 (05:16 -0500)]
comma_scan()'s clean option wasn't removing entry at end of list.

7 years agoDon't include the build number in `toybox --version`.
Elliott Hughes [Tue, 11 Jul 2017 00:14:20 +0000 (17:14 -0700)]
Don't include the build number in `toybox --version`.

This adds undesired noise to OTA packages, and isn't worth that cost.

Bug: http://b/63513984
Test: toybox --version
Change-Id: Ied2b55155411acb5e73d250c62a8f26d6fa02908

7 years agoFix toybox_vendor dependencies on libselinux_vendor.
Yifan Hong [Mon, 10 Jul 2017 18:09:40 +0000 (18:09 +0000)]
Fix toybox_vendor dependencies on libselinux_vendor.

toybox_vendor now links to other libraries as shared libraries.
This allows toybox_vendor to use the "vendor" version of these libraries
(in particular, liblog and libselinx_vendor).

Test: mma -j
Test: m -j, flash, boots
Test: `adb shell /vendor/bin/restorecon /dev/null` shows error message
Test: `adb shell /vendor/bin/getprop -Z' shows error message
Test: mma -j BOARD_VNDK_VERSION=current

Bug: 62886649

(revert of commit 4ab405afe2668a5ca25be411df2d05a5e0995478)
(resubmit of commit e06cffe06993e0ade6f7836becb26e7f076c8a68)

Change-Id: I0812b58eb3d769d1a73e64009481075c09da2450

7 years agoFix toybox_vendor dependencies on libselinux_vendor.
Yifan Hong [Mon, 10 Jul 2017 19:06:59 +0000 (19:06 +0000)]
Fix toybox_vendor dependencies on libselinux_vendor.
am: a546dbb3c8  -s ours

Change-Id: I389dce2c521b9ab12602d25a5942518d076ebb14

7 years agoFix toybox_vendor dependencies on libselinux_vendor.
Yifan Hong [Mon, 10 Jul 2017 18:09:40 +0000 (18:09 +0000)]
Fix toybox_vendor dependencies on libselinux_vendor.

toybox_vendor now links to other libraries as shared libraries.
This allows toybox_vendor to use the "vendor" version of these libraries
(in particular, liblog and libselinx_vendor).

Test: mma -j
Test: m -j, flash, boots
Test: `adb shell /vendor/bin/restorecon /dev/null` shows error message
Test: `adb shell /vendor/bin/getprop -Z' shows error message
Test: mma -j BOARD_VNDK_VERSION=current

Bug: 62886649

(revert of commit 4ab405afe2668a5ca25be411df2d05a5e0995478)
(resubmit of commit e06cffe06993e0ade6f7836becb26e7f076c8a68)

Change-Id: I0812b58eb3d769d1a73e64009481075c09da2450
Merged-In: If01094b71ef7e99b5756b851132de643660a1e2c

7 years agoRevert "Fix toybox_vendor dependencies on libselinux_vendor."
Jeff Vander Stoep [Mon, 10 Jul 2017 07:51:14 +0000 (07:51 +0000)]
Revert "Fix toybox_vendor dependencies on libselinux_vendor."
am: 4ab405afe2

Change-Id: I8c945e89a3b56ffe9ce43f76bb294f91a74f9390

7 years agoRevert "Fix toybox_vendor dependencies on libselinux_vendor."
Jeff Vander Stoep [Mon, 10 Jul 2017 07:13:39 +0000 (00:13 -0700)]
Revert "Fix toybox_vendor dependencies on libselinux_vendor."

This reverts commit 9e5e16264cf411f4efbb509e8df4630f4996a21a.
Test: "mma external/toybox" builds successfully

Merged-In: I13b1bf1af3537aff489be0c02572c44fd69414d6
Change-Id: I8782b3718bc62b7787819647a26d7a7e5c29369b

7 years agoFix toybox_vendor dependencies on libselinux_vendor. am: 9e5e16264c am: 537e6e363e
Yifan Hong [Mon, 10 Jul 2017 03:55:00 +0000 (03:55 +0000)]
Fix toybox_vendor dependencies on libselinux_vendor. am: 9e5e16264c am: 537e6e363e
am: 4876bcc290

Change-Id: I7d439ea59d0d0a1a82c350bdf43a84858854706d

7 years agoFix toybox_vendor dependencies on libselinux_vendor. am: 9e5e16264c
Yifan Hong [Mon, 10 Jul 2017 03:50:00 +0000 (03:50 +0000)]
Fix toybox_vendor dependencies on libselinux_vendor. am: 9e5e16264c
am: 537e6e363e

Change-Id: Ie15f7887c803e5597613ab7f43a707fae580a2b5

7 years agoFix toybox_vendor dependencies on libselinux_vendor.
Yifan Hong [Mon, 10 Jul 2017 03:45:32 +0000 (03:45 +0000)]
Fix toybox_vendor dependencies on libselinux_vendor.
am: 9e5e16264c

Change-Id: Iace953ff7dff37810c5889fb8ebefb038ee5578a

7 years agodd cleanup: binary search is overkill, eliminate struct pair,
Rob Landley [Sun, 9 Jul 2017 07:13:00 +0000 (02:13 -0500)]
dd cleanup: binary search is overkill, eliminate struct pair,
simplify strstarteq, use local variable "conv" instead of toys.optargs.

7 years agoFix -Wformat compiler warning in expr.c.
Elliott Hughes [Fri, 7 Jul 2017 20:06:36 +0000 (13:06 -0700)]
Fix -Wformat compiler warning in expr.c.

Android forces -Wformat on for all source.

  toys/pending/expr.c:116:28: warning: field precision should have type 'int',
                                       but argument has type 'long' [-Wformat]
      ret->s = xmprintf("%.*s", m[1].rm_eo-m[1].rm_so, target+m[1].rm_so);
                         ~~^~   ~~~~~~~~~~~~~~~~~~~~~

7 years agoPosix says strings should only output hits that end with NUL or newline.
Rob Landley [Fri, 7 Jul 2017 21:36:45 +0000 (16:36 -0500)]
Posix says strings should only output hits that end with NUL or newline.
We don't currently do that, but a test suite checking that we don't
do that is requiring us to violate posix to pass it.

7 years agostrings -t oxd tests
Ilya Kuzmich [Mon, 29 May 2017 14:57:09 +0000 (17:57 +0300)]
strings -t oxd tests

7 years agoMake dd use atolx_range(), and teach atolx_range() about "w" suffix (word, *2).
Rob Landley [Fri, 7 Jul 2017 08:51:47 +0000 (03:51 -0500)]
Make dd use atolx_range(), and teach atolx_range() about "w" suffix (word, *2).

7 years agoFix dd tests so TEST_HOST passes. (Ubuntu's dd doesn't support hex values
Rob Landley [Fri, 7 Jul 2017 08:43:24 +0000 (03:43 -0500)]
Fix dd tests so TEST_HOST passes. (Ubuntu's dd doesn't support hex values
and don't expect a specific error message, just that it errored.)

7 years agoFix toybox_vendor dependencies on libselinux_vendor.
Yifan Hong [Mon, 26 Jun 2017 23:16:43 +0000 (16:16 -0700)]
Fix toybox_vendor dependencies on libselinux_vendor.

toybox_vendor now links to other libraries as shared libraries.
This allows toybox_vendor to use the "vendor" version of these libraries
(in particular, liblog and libselinx_vendor).

Test: mma -j
Test: m -j, flash, boots
Test: `adb shell /vendor/bin/restorecon /dev/null` shows error message
Test: `adb shell /vendor/bin/getprop -Z' shows error message
Test: mma -j BOARD_VNDK_VERSION=current

Bug: 62886649
Change-Id: If01094b71ef7e99b5756b851132de643660a1e2c

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: a379d5ee15 am: a4f4fa78eb
Elliott Hughes [Wed, 5 Jul 2017 19:51:55 +0000 (19:51 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: a379d5ee15 am: a4f4fa78eb
am: cb13c3da93

Change-Id: I627d5f6fa77e1083ea1167ff8179c94c3046918e

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: a379d5ee15
Elliott Hughes [Wed, 5 Jul 2017 19:47:56 +0000 (19:47 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: a379d5ee15
am: a4f4fa78eb

Change-Id: Icfa74ce051e6151fc206329884311e54adef8021

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Wed, 5 Jul 2017 19:43:55 +0000 (19:43 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: a379d5ee15

Change-Id: I2120b3a09b81b1aa593b6bf2b8b7a5192d1b5738

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Wed, 5 Jul 2017 17:27:25 +0000 (10:27 -0700)]
Merge remote-tracking branch 'toybox/master' into HEAD

Change-Id: I81d3056bfb854ba9e312cb6a02b4eb200abd1eb4

7 years agoAdd -t, deviations from posix, redo loop to have fewer duplicate tests.
Rob Landley [Mon, 3 Jul 2017 02:39:32 +0000 (21:39 -0500)]
Add -t, deviations from posix, redo loop to have fewer duplicate tests.

7 years agostrings tests and bugfixes
Ilya Kuzmich [Mon, 29 May 2017 04:05:16 +0000 (07:05 +0300)]
strings tests and bugfixes

Fixes missing newline in output if last byte of the input is string.
Fixes one-off offset bug.
Adds strings tests.

Signed-off-by: Ilya Kuzmich <ilya.kuzmich@gmail.com>
7 years agowhitespace/comment tweaks.
Rob Landley [Tue, 27 Jun 2017 19:57:28 +0000 (14:57 -0500)]
whitespace/comment tweaks.

7 years agoteach head -c
Ilya Kuzmich [Sun, 28 May 2017 15:29:19 +0000 (18:29 +0300)]
teach head -c

Not POSIX, but implemented in coreutils, busybox and freebsd.

7 years agoBuild vendor toybox unconditionally. am: 3829236617 am: cb54b3a2cf
padarshr [Tue, 27 Jun 2017 19:03:28 +0000 (19:03 +0000)]
Build vendor toybox unconditionally. am: 3829236617 am: cb54b3a2cf
am: 4dfba4ea3a

Change-Id: I2790203d483605d8f0ad33f509a233c8780313ba

7 years agoBuild vendor toybox unconditionally. am: 3829236617
padarshr [Tue, 27 Jun 2017 19:00:28 +0000 (19:00 +0000)]
Build vendor toybox unconditionally. am: 3829236617
am: cb54b3a2cf

Change-Id: I76b168233472338a23522467bb3c6137477ff4d5

7 years agoBuild vendor toybox unconditionally.
padarshr [Tue, 27 Jun 2017 18:57:25 +0000 (18:57 +0000)]
Build vendor toybox unconditionally.
am: 3829236617

Change-Id: Icea5df4c2e9e986364efb742e45e5baf77dc0f39

7 years agoMost things seem to want the "b" suffix to mean 512 instead of 1.
Rob Landley [Mon, 26 Jun 2017 20:32:27 +0000 (15:32 -0500)]
Most things seem to want the "b" suffix to mean 512 instead of 1.
(According to the git history I added "b" for "od" but the man page says 512
there too.)

7 years agoBuild vendor toybox unconditionally.
padarshr [Mon, 19 Jun 2017 17:34:15 +0000 (23:04 +0530)]
Build vendor toybox unconditionally.

Always build vendor toybox irrespective of whether
PRODUCT_FULL_TREBLE is enabled or not, as even on Non-Full
treble builds this can be used in vendor scripts.

Change-Id: I91d0fc9be198d95d82530a3b1e21c4463d9398dd

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: f353b240a5 am: 66859184e5
Elliott Hughes [Mon, 19 Jun 2017 22:56:02 +0000 (22:56 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: f353b240a5 am: 66859184e5
am: 86fb74fe51

Change-Id: I915bb8c5ee24107acedc88cca27a5bd7da9dfa86

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD am: f353b240a5
Elliott Hughes [Mon, 19 Jun 2017 22:49:31 +0000 (22:49 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD am: f353b240a5
am: 66859184e5

Change-Id: I23b47ac02e42705de3dca793d2125a2c8b86ca22

7 years agoMerge remote-tracking branch 'toybox/master' into HEAD
Elliott Hughes [Mon, 19 Jun 2017 22:43:33 +0000 (22:43 +0000)]
Merge remote-tracking branch 'toybox/master' into HEAD
am: f353b240a5

Change-Id: I06997a45f022ede7080ab0b163b8b0c018438cb4