Commit graph

200 commits

Author SHA1 Message Date
Colin Cross
a44c31cc91 am e755dfd4: Merge changes I1db3137b,I0f66144e
* commit 'e755dfd43812ebd9a0d0d6a2106316f343ffb5a2':
  toolbox: reimplement watchprops using __system_property_foreach()
  libcutils: reimplement property_list() using __system_property_foreach()
2013-06-19 10:33:42 -07:00
Greg Hackmann
68e9b6bc94 toolbox: reimplement watchprops using __system_property_foreach()
Internally, replace the watchlist array with a hashmap since the array
assumes properties are enumerated in a consistent order and foreach()
probably won't.  (find_nth() never guaranteed this either but it usually
worked in practice.)

Signed-off-by: Greg Hackmann <ghackmann@google.com>

(cherry picked from commit 389e358017)

Change-Id: I1db3137b130474f4bb205f01f0bdcf37cf974764
2013-06-18 19:26:28 -07:00
Colin Cross
99c1a4168b resolved conflicts for merge of 95a41f6b to stage-aosp-master
Change-Id: Icfae29edf989fb43a7f0b8bda188a9807f76a3b9
2013-06-17 18:19:28 -07:00
Colin Cross
8196316411 toolbox: hide property implementation from watchprops
(cherry picked from commit 91779634de)

Change-Id: I7a2d8aa507ac61cedc5f67c563531a7d4ec8e4c2
2013-06-17 16:58:09 -07:00
Brian Carlstrom
603746f0e3 am 59fa7e10: Merge "Fixed reversed output in netstat Recv-Q Send-Q columns"
* commit '59fa7e107d43a4ef521413ec0bb7b0c2a5525071':
  Fixed reversed output in netstat Recv-Q Send-Q columns
2013-06-04 10:28:55 -07:00
Brian Carlstrom
3c412f6260 Fixed reversed output in netstat Recv-Q Send-Q columns
Change-Id: I2bc7ac6c886808910212432497f05e34596f5e85
2013-06-03 19:24:44 -07:00
Nick Kralevich
4c1840e654 am 5ea58543: Merge "mount: fix incorrect string length calculation"
* commit '5ea58543154a97c42c0b7fc58c2639a4fea64f5b':
  mount: fix incorrect string length calculation
2013-04-24 17:36:11 -07:00
Nick Kralevich
29a5298366 mount: fix incorrect string length calculation
Fix bug https://code.google.com/p/android/issues/detail?id=54192
which incorrectly calculated the length of a string.

Fix compiler warning:

system/core/toolbox/mount.c:59:2: warning: initializer-string for array of chars is too long [enabled by default]
system/core/toolbox/mount.c:59:2: warning: (near initialization for 'options[16].str') [enabled by default]

Change-Id: If8663f8311c6348a730fcf731d402b57fee10cb5
2013-04-24 16:31:02 -07:00
Colin Cross
0354655320 am b73a0ef4: Merge "use lseek64 to resolve offset oveflow"
* commit 'b73a0ef4d05ad594ba07b98e1f4aa7fe66a18c2e':
  use lseek64 to resolve offset oveflow
2013-04-18 15:20:54 -07:00
Jongrak Kwon
c05aae4ac4 use lseek64 to resolve offset oveflow
The offset variable in lseek is 32 bit and get easily overflow
when accessing with large offset in dd command.
Use lseek64 to resolve it.

Change-Id: Ib75d9dcb587004a6851365ab5bb8584ce1010b57
2013-04-17 14:05:55 -07:00
Ying Wang
129b6d907b am 083b5ccb: Add liblog
* commit '083b5ccba345ed2b4950454f16bd89c5d86b6b27':
  Add liblog
2013-04-09 22:29:03 -07:00
Ying Wang
083b5ccba3 Add liblog
Bug: 8580410
Change-Id: Iab3a9b4307f207c14a04a922cc7350c54e60e9ad
2013-04-09 22:03:45 -07:00
Colin Cross
d3859e433d am 6e0b9ecb: Merge "toolbox/dmesg: do not hardcode KLOG_BUF_LEN"
* commit '6e0b9ecb503b5611d815214e0a134ea0b1395089':
  toolbox/dmesg: do not hardcode KLOG_BUF_LEN
2013-04-06 12:51:35 -07:00
Colin Cross
6e0b9ecb50 Merge "toolbox/dmesg: do not hardcode KLOG_BUF_LEN" 2013-04-06 19:02:01 +00:00
Geremy Condra
a7096004f2 am 911ba269: Merge "Add -i option to toolbox cmd ls"
* commit '911ba269e369035f9a4a250fa22233b37d724356':
  Add -i option to toolbox cmd ls
2013-04-04 23:42:16 -07:00
William Roberts
403b195548 Add -i option to toolbox cmd ls
Change-Id: I4690fc10dc07bf1883bcf8ec18399235dc97d317
2013-04-03 17:39:19 -07:00
James Sullins
edee93dc5b toolbox/dmesg: do not hardcode KLOG_BUF_LEN
Change-Id: Ia99654a53d6adfeba5a5088b7cff45c6e47b6188
2013-04-01 21:50:03 +05:30
Dmitry Shmidt
4db7df71da toolbox: renice: Add -t TYPE parameter and switch to getopt
Change-Id: Idaedabe1505a9c373629ef1fd31aa4b4beb068c2
Signed-off-by: Dmitry Shmidt <dimitrysh@google.com>
2013-01-22 16:59:36 -08:00
Dima Zavin
487c4ea012 am 7ec62dbd: am 82ea44f8: Merge "Change setsebool syntax to be consistent with other init built-ins."
* commit '7ec62dbd9d2bd7369fa074bf002f642b03e6dd39':
  Change setsebool syntax to be consistent with other init built-ins.
2012-12-19 09:51:38 -08:00
Dima Zavin
82ea44f88f Merge "Change setsebool syntax to be consistent with other init built-ins." 2012-12-18 23:42:09 -08:00
Stephen Smalley
0e23fee505 Change setsebool syntax to be consistent with other init built-ins.
Change setsebool syntax from name=value to name value.
This is to make it consistent with setprop and similar commands.
Update both the init built-in command and the toolbox command
for consistency.

Change-Id: I2c8e016ba26731c4a2ad4a49ae3b89362bf8f8a8
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2012-12-13 15:41:53 -05:00
Elliott Hughes
229d2ace9d am b8db1e09: am 777991d9: Merge "Fixed improper size displaying in \'df\' utility"
* commit 'b8db1e093d412f57263dc597dbac14c377945781':
  Fixed improper size displaying in 'df' utility
2012-12-03 08:15:25 -08:00
Elliott Hughes
777991d939 Merge "Fixed improper size displaying in 'df' utility" 2012-12-03 07:33:38 -08:00
Kenny Root
efb5e3c709 resolved conflicts for merge of 20f5daa8 to master
Change-Id: Ie3e67696d265a56dfa4d089c777506f27783a9a6
2012-10-16 18:00:29 -07:00
Kenny Root
20f5daa865 resolved conflicts for merge of 44f4f8a4 to jb-mr1-dev-plus-aosp
Change-Id: I66988d8e87a8110ca9ab3da19870b80bbaf06eba
2012-10-16 17:51:14 -07:00
Kenny Root
b83c09812f Remove HAVE_SELINUX guards
Change-Id: Idef0a784a1d237257ff4135bb1df62ff8a67ded3
2012-10-16 12:34:06 -07:00
Kenny Root
f638b7e0a0 am e47eb98a: am 674c0445: Merge "toolbox: silence some compiler warnings"
* commit 'e47eb98a337081d0d6c740eb7d8b990faf4090d7':
  toolbox: silence some compiler warnings
2012-10-11 00:30:23 -07:00
Kenny Root
e47eb98a33 am 674c0445: Merge "toolbox: silence some compiler warnings"
* commit '674c0445e25cdf9bcd7d32a84103bd3b7e24a4a0':
  toolbox: silence some compiler warnings
2012-10-11 00:29:10 -07:00
Kenny Root
ef5d0340e4 toolbox: silence some compiler warnings
Comparison of signed and unsigned integers. Use parenthesis around a
group of bitwise OR operations.

Change-Id: Ia404380593ce2c2a291133c07c0fc7a016a3ad3f
2012-10-10 11:28:27 -07:00
Michal Frynas
1f90dcd0c0 Fixed improper size displaying in 'df' utility
'df' command used to display filesystem usage statistics as integer
values, in most cases rounding the actual value down. Because of
that 'df' tended to display faulty size values.
This fix to 'df' utility calculates the fractional part of the size,
then it rounds it when needed to the nearest one-digit integer value
and displays after decimal dot.

Change-Id: I9bc52635d45d3e55ce61b3b1c6b80d1267516e75
2012-10-02 10:39:19 +02:00
Jeff Sharkey
ad8663e970 am 08f748a2: am 42a1e6c9: Merge "Iteration on multi-user external storage." into jb-mr1-dev
* commit '08f748a2f8e6933fdd96290de049c1aa1f3f8479':
  Iteration on multi-user external storage.
2012-08-22 18:21:03 -07:00
Jeff Sharkey
bfcd810b79 Iteration on multi-user external storage.
Define /storage as top-level concept, so that we enforce permissions
uniformly.  Moves external storage paths from headers to per-device
environment variables.  Added missing mount flags, and we no longer
have adb-specific external storage.

Bug: 6925012
Change-Id: Ic7ca953be2f552d3f0ec9e69f89fef751daa1b29
2012-08-22 14:28:37 -07:00
Jean-Baptiste Queru
1ef97deea5 am 81eecb1e: am 2ab69388: am 76080925: am 52d5dfc8: Merge "vmstat: Fix -n flag"
* commit '81eecb1eb8c23e603c78d60a7278a3afd1798962':
  vmstat: Fix -n flag
2012-08-20 14:56:02 -07:00
Jean-Baptiste Queru
2ab69388cb am 76080925: am 52d5dfc8: Merge "vmstat: Fix -n flag"
* commit '76080925410db41cfa5c70ffcffaa2b3b4d59aad':
  vmstat: Fix -n flag
2012-08-20 14:51:52 -07:00
Jean-Baptiste Queru
52d5dfc8d3 Merge "vmstat: Fix -n flag" 2012-08-20 14:25:13 -07:00
Jon Larimer
78f7aefae2 Merge "Make usage() static in du.c to avoid conflicts" 2012-08-14 10:38:45 -07:00
Kenny Root
3790b9be66 am f48a4b4b: am ba822edb: am 02e9f8d5: am 53dab583: Merge "Make setenforce usage function static."
* commit 'f48a4b4be699f63670acbff94b78e1fdf3b4338c':
  Make setenforce usage function static.
2012-08-13 16:08:20 -07:00
Kenny Root
ba822edb30 am 02e9f8d5: am 53dab583: Merge "Make setenforce usage function static."
* commit '02e9f8d5aa390d89f79b2b3bb8630af4062b4d2c':
  Make setenforce usage function static.
2012-08-13 16:03:25 -07:00
Jon Larimer
f286dd75f6 Make usage() static in du.c to avoid conflicts
Change-Id: Ic6b036d050943fb5f0af8553c081ca75362167e8
2012-08-13 16:02:55 -04:00
Matt Finifter
492051ed2a Make setenforce usage function static.
Change-Id: I6de204dc072418805160a35d799b8948ecb39251
2012-08-13 12:56:23 -07:00
Kenny Root
28358cf9e7 am a0347971: am 605103fb: resolved conflicts for merge of 4dcd52ab to jb-mr1-dev
* commit 'a0347971dec3dc34c6ccebad5170ced255fdf35f':
  Add support for reloading policy from /data/system.
2012-08-13 10:26:19 -07:00
Kenny Root
605103fb55 resolved conflicts for merge of 4dcd52ab to jb-mr1-dev
Change-Id: Ibd0c03a7883a2e31adab18543c016776b7b36866
2012-08-13 10:21:35 -07:00
Stephen Smalley
ae6f3d7c05 Add support for reloading policy from /data/system.
To support runtime policy management, add support for reloading
policy from /data/system.  This can be triggered by setting the
selinux.loadpolicy property to 1, whether from init.rc after
mounting /data or from the system_server (e.g. upon invocation of
a new device admin API for provisioning policy). ueventd and
installd are restarted upon policy reloads to pick up the new
policy configurations relevant to their operation.

Change-Id: I97479aecef8cec23b32f60e09cc778cc5520b691
Signed-off-by: Stephen Smalley <sds@tycho.nsa.gov>
2012-08-09 09:59:10 -04:00
Elliott Hughes
7acf56f8f7 am 79737802: am 8268a75e: am c5db017c: am 63b2c577: Merge "Conditionally use SIGSTKFLT"
* commit '79737802421d7b32707f1c248b5ecb239965234a':
  Conditionally use SIGSTKFLT
2012-08-08 15:11:22 -07:00
Elliott Hughes
8268a75e86 am c5db017c: am 63b2c577: Merge "Conditionally use SIGSTKFLT"
* commit 'c5db017cc3d30b1b15544ca9889e66890710f93c':
  Conditionally use SIGSTKFLT
2012-08-08 14:06:25 -07:00
Michael Wright
52abb4b1ef Added clear command to toolbox
Change-Id: Ifb1b7693727997b94614f7da73081f0894ee88ad
2012-08-07 21:47:51 -07:00
Chris Dearman
7ac420972a Conditionally use SIGSTKFLT
Change-Id: I555b33b5a93df332c556944a1c00fff417825247
2012-08-01 15:51:09 -07:00
Jeff Sharkey
3e8b1581ff Ported "grep" from NetBSD to toolbox.
Bug: 6798417
Change-Id: I581c496a726a4814edaaa3672849c090bac8552c
2012-07-13 16:37:38 -07:00
Jeff Sharkey
57df14c654 Ported "cp" from NetBSD to toolbox.
Bug: 6798417
Change-Id: I716ab459b9edf4c7405bf042adbee0300b6f51c9
2012-07-13 16:26:30 -07:00
Arun Raghavan
6caab4ce95 vmstat: Fix -n flag
The loop condition for the number of iterations basically caused the
argument to -n to be ignored. This fixes the condition appropriately.
2012-07-10 10:43:57 +05:30