Commit graph

7009 commits

Author SHA1 Message Date
David Gumberg
1c3cb91f72 Use the getopt function in compliance with the standard.
This is a simple change to the use of getopt in reboot.c, as per the standard,
getopt does NOT return an EOF, it returns a -1, (this was done to remove
getopt's dependence on stdio.h), and since the standard does not guarantee 
that EOF is -1, and the documentation tells us that getopt returns -1, 
in my judgement it would be best to test for -1, rather than EOF.

Change-Id: I63a3bb7011eb60753eb910221bbe8ce0a71e6679
Signed-off-by: David Gumberg <davidzgumberg@gmail.com>
2014-03-02 18:35:49 +00:00
Elliott Hughes
a0e4d1643c Merge "Declare (and simplify) uid_from_user." 2014-03-01 01:39:20 +00:00
Elliott Hughes
3f6b63e74d Declare (and simplify) uid_from_user.
uid_from_user doesn't need to cope with numeric ids in the BSD code
like it did with the old Android code; the caller now handles those.

Also explain what SUPPORT_DOT is for.

Change-Id: I185c9f02b7039795069aa30545563b8a6ef54cd5
2014-02-28 17:27:08 -08:00
Elliott Hughes
fbcdf6f9fe Merge "Switch to BSD chown (for -R, primarily)." 2014-03-01 01:18:29 +00:00
Elliott Hughes
54bb1d3b98 Merge "Fix grep -f." 2014-03-01 01:12:49 +00:00
Elliott Hughes
0b024677ec Switch to BSD chown (for -R, primarily).
Change-Id: I45381b8a04f4cb651123a2d43860418e06df6e65
2014-02-28 16:48:49 -08:00
Elliott Hughes
4014501d79 Fix grep -f.
bionic has getline now.

Change-Id: I5e4ee137768ab3113dbe8a07406fa39f4b6546af
2014-02-28 16:45:56 -08:00
Mark Salyzyn
1a1c42fda7 Merge "logd: Always build logd" 2014-02-28 23:44:17 +00:00
Mark Salyzyn
4381d43848 logd: Always build logd
- build breakage aosp-idea133 @ 1049092

Change-Id: Iabac6009567926137f455044b33ab5d67924896d
2014-02-28 15:29:36 -08:00
Mark Salyzyn
a69270db05 Merge "liblog: enable logging to logd." 2014-02-28 22:32:53 +00:00
Mark Salyzyn
ea1b1d483a Merge "logd: institute getGroups for socket credentials" 2014-02-28 21:55:50 +00:00
Mark Salyzyn
154f4608aa liblog: enable logging to logd.
* Modify liblog to send all messages to the new syslog user
  space daemon.

Original-Change-Id: I0ce439738cd921efb2db4c1d6a289a96bdbc8bc2
Original-Change-Id: If4eb0d09409f7e9be3eb4bb7017073dc7e931ab4
Signed-off-by: Nick Kralevich <nnk@google.com>

* Add a TARGET_USES_LOGD make flag for BoardConfig.mk to manage
  whether logd is enabled for use or not.
* rename syslog to logd to avert confusion with bionic syslog
* Add fake log support back in
* prefilter for logging messages from logd
* Fill in timestamps at logging source
* update abstract log reader
* switch from using suffix for id to v3 format
* log a message when creating devices that a deprecated interface
  is being utilized.

Signed-off-by: Mark Salyzyn <salyzyn@google.com>

(cherry pick from commit 099e2c1f6f706a8600c1cef74cce9066fc315480)

Change-Id: I47929a5432977a1d7235267a435cec0a7d6bd440
2014-02-28 13:49:11 -08:00
Mark Salyzyn
1114f18065 logd: institute getGroups for socket credentials
(cherry pick from commit 4d851290fc81eb36d2fcf76e6f06213a28b877f5)

Change-Id: Ib8be84d2a3f873e91fb1495df439a498f395c137
2014-02-28 13:48:33 -08:00
Mark Salyzyn
0577a0679a Merge "libsparse: deal with build warning messages" 2014-02-28 16:58:21 +00:00
Mark Salyzyn
031a748b2a libsparse: deal with build warning messages
- mostly unused parameters, added defs.h to hold __unused macro
- read_all prototype not included, added output_file.h to acquire

Change-Id: Ib7ee00614acab53a6bd6a64f7e26a8c13dbe6297
2014-02-28 08:08:01 -08:00
Mark Salyzyn
b7a4868e1c Merge "logd: Remove $(KERNEL_HEADERS) include." 2014-02-27 17:34:57 +00:00
Martijn Coenen
89343c1113 logd: Remove $(KERNEL_HEADERS) include.
Points to wrong kernel-headers dir in multi-arch
builds.

(cherry picked from commit 920a5629ff)

Change-Id: I5055bf5cd80119a34f0a6b0872ffb0a422a06baf
2014-02-27 07:57:05 -08:00
Narayan Kamath
26fa5cd39d Merge "AArch64: Use negative values in error enumeration" 2014-02-27 13:18:18 +00:00
Christopher Ferris
62f12bd9b1 Merge "Enable libunwind for mips." 2014-02-26 21:47:52 +00:00
Christopher Ferris
c29a1345a0 Enable libunwind for mips.
Change-Id: Ib1d7bea0cb7ac09a9e15c7f429ecfd944649fc87
2014-02-26 13:41:32 -08:00
Nick Kralevich
9453bce4cf Merge "Apply restorecon_recursive to all of /data." 2014-02-26 21:36:30 +00:00
Mark Salyzyn
78617a0875 Merge changes Id25cdef0,I80685cdc,I929dddc7
* changes:
  logd: Add SCHED_BATCH to reduce priority
  logd: Adjust to match defacto coding style
  logd: prune more aggressively when over the top
2014-02-26 21:29:34 +00:00
Mark Salyzyn
e9c8fb900a Merge "logd: initial checkin." 2014-02-26 21:29:14 +00:00
Mark Salyzyn
ca1e343857 Merge "logcat: test: add clear and blocking check" 2014-02-26 21:28:58 +00:00
Elliott Hughes
ecb5dd697c Merge "Fix undefined args access for x86_64." 2014-02-26 21:28:27 +00:00
Elliott Hughes
431735f005 Merge "libcutils: Socket type might contain bitwise OR flags" 2014-02-26 19:34:40 +00:00
Paul Kocialkowski
a7e2e7634c libcutils: Socket type might contain bitwise OR flags
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Change-Id: Ia5c8f136793a989fc1d71c61292afe4e5cf169fa
2014-02-26 11:33:45 -08:00
Mark Salyzyn
882f856668 logd: Add SCHED_BATCH to reduce priority
(cherry picked from commit 85620a1bff)

Change-Id: Id25cdef0dd7f8c5e154a0da2db2dd0554849babc
2014-02-26 09:55:03 -08:00
Mark Salyzyn
c03e72cc1c logd: Adjust to match defacto coding style
(cherry picked from commit c46f77bd2a)

Change-Id: I80685cdc7116e10c5a5a77abe856fd96804f9117
2014-02-26 09:54:23 -08:00
Mark Salyzyn
740f9b4f97 logd: prune more aggressively when over the top
(cherry picked from commit 63c15d5061)

Change-Id: I929dddc7da048c032fb791c7af23f215f8856bf3
2014-02-26 09:53:55 -08:00
Mark Salyzyn
0175b0747a logd: initial checkin.
* Create a new userspace log daemon for handling logging messages.

Original-Change-Id: I75267df16359684490121e6c31cca48614d79856
Signed-off-by: Nick Kralevich <nnk@google.com>

* Merge conflicts
* rename new syslog daemon to logd to prevent confusion with bionic syslog
* replace racy getGroups call with KISS call to client->getGid()
* Timestamps are filed at logging source
* insert entries into list in timestamp order
* Added LogTimeEntry tail filtration handling
* Added region locking around LogWriter list
* separate threads for each writer
* /dev/socket/logd* permissions

Signed-off-by: Mark Salyzyn <salyzyn@google.com>

(cherry picked from commit 3e76e0a497)

Author: Nick Kralevich <nnk@google.com>
Change-Id: Ice88b1412d8f9daa7f9119b2b5aaf684a5e28098
2014-02-26 09:52:35 -08:00
Mark Salyzyn
9b986497e7 logcat: test: add clear and blocking check
(cherry picked from commit 1beb2ab6f6)

Change-Id: I243b1338c4a5935a297a0519c03697fd828e47e6
2014-02-26 09:52:02 -08:00
Fengwei Yin
fff9d11be5 Fix undefined args access for x86_64.
From libc manual for vsnprintf:
   The  functions  vprintf(),  vfprintf(), vsprintf(), vsnprintf()
   are equivalent to the functions printf(), fprintf(), sprintf(), snprintf(),
   respectively, except that they are called with a va_list instead of a
   variable number of arguments.  These  functions  do  not  call  the  va_end  macro.
   Because they invoke the va_arg macro, the value of ap is undefined after the call.

We need to allocate/end new va_list for each vsnprintf.

Change-Id: I66ec058033be1cb918e7b2bc84ca546800da226b
Signed-off-by: Fengwei Yin <fengwei.yin@intel.com>
2014-02-27 01:17:09 +08:00
David 'Digit' Turner
ebb46d76e4 Merge "fs_mgr: Don't run e2fsck inside SDK system images." 2014-02-25 04:57:26 +00:00
Elliott Hughes
d7590650dc Merge "Remove an unused #include of <asm/page.h>." 2014-02-25 00:01:46 +00:00
Elliott Hughes
763bfce0b1 Remove an unused #include of <asm/page.h>.
Change-Id: I000aead8c82ec11151f69e6ce439dd09b0f0b4f4
2014-02-24 15:42:22 -08:00
Elliott Hughes
410f51a88c Merge "Remove unused #includes of <asm/page.h>." 2014-02-24 23:39:49 +00:00
Elliott Hughes
2f77bb6931 Remove unused #includes of <asm/page.h>.
(<asm/page.h> is going away.)

Change-Id: Id0d7ad0eb791cd47490c48458f9f8a6468ddf5c9
2014-02-24 15:38:44 -08:00
David 'Digit' Turner
28483d7ec4 fs_mgr: Don't run e2fsck inside SDK system images.
These images do not have GPL-ed binaries like /system/bin/e2fsck so
avoid running the program when we detect that we're running inside
one of them.

Note that this does not affect other emulator-based build products
(e..g full-eng instead of sdk-eng), which do have the binaries.

BUG=13057123

Change-Id: Ia42f1d02a3845fbf4b2f9d95818f35d760711a12
2014-02-24 23:32:00 +01:00
Colin Cross
deb3eecd06 Merge "Fix the definition of LOCAL_PATH in libusbhost/Android.mk" 2014-02-22 08:16:03 +00:00
Elliott Hughes
536dce31d3 Merge "Fix compiler warnings in libpixelflinger" 2014-02-20 22:22:17 +00:00
Ashok Bhat
3078b13b98 Fix compiler warnings in libpixelflinger
Change-Id: I6a5708ae6bc934b196d59d81a6cd550b05ed704f
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-20 14:21:55 -08:00
Nick Kralevich
783eb16898 Merge "Add -D option to restorecon for relabeling /data/data." 2014-02-20 20:54:18 +00:00
Elliott Hughes
acc0a23a20 Merge "Remove dead code." 2014-02-20 20:06:38 +00:00
Elliott Hughes
b784f37341 Remove dead code.
We have benchmarking for memset in bionic itself, and a benchmarking
framework for other native benchmarking.

Change-Id: I241a288a96d3b2d37f3d51b04a519ac23f18a989
2014-02-20 11:12:41 -08:00
Ashok Bhat
1ee7570052 AArch64: Use negative values in error enumeration
With AArch64 the enumerations with values in the range
0x80000000 to 0x80000007 are being assigned to ssize_t
typed variables which are 64-bit rather than 32-bit, and
are being used in conditions where they are being checked
for being negative. This is not the case when ssize_t is
64-bit, so redefine this to INT32_MIN value.

Change-Id: I7a031a940a28658b3bf34bebac93dfb3ba397b05
Signed-off-by: Marcus Oakland <marcus.oakland@arm.com>
Signed-off-by: Ashok Bhat <ashok.bhat@arm.com>
2014-02-20 14:11:35 +00:00
JP Abgrall
912373005b Merge "Handle FUSE_FSYNCDIR as FUSE_FSYNC" 2014-02-19 20:34:21 +00:00
Daisuke Okitsu
b2831a2db9 Handle FUSE_FSYNCDIR as FUSE_FSYNC
There have been issues with sdcard data corruption even after
successfully calling fsync for /sdcard. This is caused by
the sdcard daemon doing nothing in this case.

Change-Id: I48149ceabdac79ac535b35c2598bb1fbb5410883
2014-02-19 20:33:50 +00:00
JP Abgrall
3b0c24e28d Merge "sdcard: direct I/O file access write buffer alignment" 2014-02-19 20:30:25 +00:00
Nick Kralevich
223e079837 Merge "Enable building init with -Wall -Werror." 2014-02-19 19:09:30 +00:00