Commit graph

11501 commits

Author SHA1 Message Date
Elliott Hughes
5ac8b917de Merge "Bump do_write buffer size" 2015-02-07 17:07:01 +00:00
Johan Redestig
7e952f41f1 Bump do_write buffer size
In the case of do_write (write to generic file) there
is really no relation to the PROP_VALUE_MAX limitation
of system properties. The current value, 92, is not so
much for writing to files so bump it a bit.

Ideally there should not be any low hard limit in this
case. Either expand_props should allocate the output
buffer or take the output fd and to streaming write.
Such a change is rather invasive though and at this
point in time it seems reasonable that one dont want
more than 256 character strings in the init files.

Change-Id: I846a282ae4e747e6171eef38b302b46287951451
2015-02-07 10:57:10 +01:00
Christopher Ferris
c9c401e64b Merge "Move map data into backtrace data proper." 2015-02-06 23:29:00 +00:00
Christopher Ferris
12385e3ad0 Move map data into backtrace data proper.
The backtrace structure used to include a pointer to a backtrace_map_t
that represented the map data for a particular pc. This introduced a
race condition where the pointer could be discarded, but the backtrace
structure still contained a pointer to garbage memory. Now all of the map
information is right in the structure.

Bug: 19028453
Change-Id: If7088a73f3c6bf1f3bc8cdd2bb4b62e7cab831c0
2015-02-06 15:00:09 -08:00
Elliott Hughes
5e753100c3 Merge "Clean up reading and writing in init." 2015-02-06 22:22:30 +00:00
Elliott Hughes
f682b4786a Clean up reading and writing in init.
This isn't particularly useful in and of itself, but it does introduce the
first (trivial) unit test, improves the documentation (including details
about how to debug init crashes), and made me aware of how unpleasant the
existing parser is.

I also fixed a bug in passing --- unless you thought the "peboot" and "pm"
commands were features...

Bug: 19217569
Change-Id: I6ab76129a543ce3ed3dab52ef2c638009874c3de
2015-02-06 14:20:30 -08:00
Nick Kralevich
17b5b35200 Merge "fs_mgr: error check umount calls / add retry logic" 2015-02-06 20:27:12 +00:00
Nick Kralevich
7294eb6cae fs_mgr: error check umount calls / add retry logic
Don't silently ignore umount errors. At a minimum, log them.

Add strerror(errno) to another umount call, to make sure we get
some actionable data.

check_fs: try 5 times umounting the filesystem. It appears that
the umount is failing, perhaps because some service is opening
the file on the device or other error. Try unmounting it multiple
times in case it's a transient problem and we can recover.

Bug: 19199624
Bug: 19156134
Change-Id: I7213eb52d55116fb2419a36494d26d5e159981a7
2015-02-05 20:50:22 -08:00
Christopher Ferris
6289412222 Merge "Remove link to gccdemangle." 2015-02-06 04:11:47 +00:00
Christopher Ferris
2a176a89c2 Remove link to gccdemangle.
Bug: 18930951
Change-Id: Ib7fd332b6e02241c0676ef33d2fa210a72efe1b1
2015-02-05 19:33:11 -08:00
Greg Hackmann
f52338fe1e Merge "rootdir: enable armv8_deprecated swp hook" 2015-02-05 23:09:14 +00:00
Greg Hackmann
cee8757f92 rootdir: enable armv8_deprecated swp hook
The upstream kernel now includes support for emulating legacy AArch32
instructions on ARMv8 devices.  By default this framework emulates
deprecated instructions but not obsolete instructions.

Android requires support for the obsolete SWP and SWPB instructions on
all ARM devices, so override this default for the swp emulation hook.

Change-Id: I82b9bdb564413ec7c1a101da75a9928aebe1606b
Signed-off-by: Greg Hackmann <ghackmann@google.com>
2015-02-05 13:38:58 -08:00
Elliott Hughes
d558530ba9 Merge "Fix Windows build." 2015-02-05 16:23:41 +00:00
Elliott Hughes
d79801d60d Fix Windows build.
Take 2. Probably should have done this in the beginning, but thought I was
being clever.

Change-Id: I85c6e487eece9bcc75f8f62c850c2d4d1ee9e908
2015-02-05 08:21:37 -08:00
Elliott Hughes
6c3ff4fe7f Merge "Fix Windows build." 2015-02-05 03:40:07 +00:00
Elliott Hughes
31fa09c1c6 Fix Windows build.
Only two days in, and I'm already really regretting putting this code
somewhere that builds for Mac OS and Windows...

Change-Id: I576ee4a9e647e10dc2d47c7e1e38aedee2bf404c
2015-02-04 19:38:28 -08:00
Elliott Hughes
051f369a14 Merge "Build BSD grep separately from toolbox." 2015-02-05 03:36:07 +00:00
Elliott Hughes
d20218e05d Build BSD grep separately from toolbox.
Also move the dd-only library code into the dd section (so a future
maintainer will know to keep/remove them as a block) and fix the one
build warning remaining.

Change-Id: Ibf6b28ef05e4cbb70b9308b0f4387f5af5b7fa94
2015-02-04 18:50:14 -08:00
Elliott Hughes
1dee489cea Merge "Stop using #if for conditional compilation." 2015-02-05 01:16:29 +00:00
Elliott Hughes
c0e919c920 Stop using #if for conditional compilation.
Use regular 'if' to prevent bitrot.

Also remove remaining typedefs.

Change-Id: I2e6ca928e2db29b88b643cf990ff05cfb0be94a6
2015-02-04 17:16:11 -08:00
Elliott Hughes
27d28d3baf Merge "Add a WriteStringToFile overload that cares about permissions." 2015-02-04 22:43:02 +00:00
Elliott Hughes
202f024dee Add a WriteStringToFile overload that cares about permissions.
Change-Id: I857a80b61768d4e9610bdd149eff2d9d8e48d2c0
2015-02-04 14:30:23 -08:00
Elliott Hughes
aec43a12a7 Merge "Use TEMP_FAILURE_RETRY, always build bootchart.cpp." 2015-02-04 18:37:32 +00:00
Elliott Hughes
24627906bf Use TEMP_FAILURE_RETRY, always build bootchart.cpp.
Also switch the revision parsing over to sscanf as promised. I haven't
done the hardware parsing because I don't yet know whether we actually need
to keep the space-stripping code.

Change-Id: Ic33378345cd515cb08d00c543acf44eb72673396
2015-02-04 10:25:09 -08:00
Elliott Hughes
798219e9e9 Merge "Fix clang "ueventd.cpp:111:1: error: no return statement in function returning non-void"." 2015-02-04 18:20:33 +00:00
Elliott Hughes
2145779c87 Fix clang "ueventd.cpp:111:1: error: no return statement in function returning non-void".
Change-Id: I69c9e5534975bffa0fbf98ca4af50400f6b94aa0
2015-02-04 10:19:50 -08:00
Elliott Hughes
e939e70401 Merge "Build init as C++." 2015-02-04 17:17:25 +00:00
Elliott Hughes
f3cf438714 Build init as C++.
This is just the minimal change to keep it building.

Change-Id: I245c5b8413a1db114576c81462eb5737f5ffcef2
2015-02-04 08:59:10 -08:00
Mark Salyzyn
04b30a0638 Merge "logd: logd placed into background cgroup" 2015-02-04 15:27:58 +00:00
Mark Salyzyn
56ba4b5b77 logd: logd placed into background cgroup
Change-Id: I38d7be05ab77fc944a9dbef2b6575d4caa920d08
2015-02-04 01:38:34 +00:00
Dmitriy Ivanov
5204b1580e Merge "Fix x86_64 build" 2015-02-04 01:15:37 +00:00
Elliott Hughes
55732f4928 Merge "android_reboot should take a const char*." 2015-02-04 01:11:39 +00:00
Dmitriy Ivanov
3107a2f5f2 Fix x86_64 build
Change-Id: Iaa3a641907de55b398a3bdd0bbc63cbb9d367982
2015-02-03 16:43:15 -08:00
Elliott Hughes
0068da6a93 android_reboot should take a const char*.
The kernel argument is actually a void*, but it's only read from.

Change-Id: I305c50249bf12b7fbdea4721257aed52a0372f8d
2015-02-03 15:44:16 -08:00
Elliott Hughes
e44d25d645 Merge "Add Google-style StringPrintf." 2015-02-03 23:23:11 +00:00
Elliott Hughes
6b3be2902d Add Google-style StringPrintf.
Change-Id: If333c28b8ed047346a2dd85e591c4bedbab874cc
2015-02-03 15:21:07 -08:00
Elliott Hughes
d4a6fc5bc2 Merge "Init: Fix Clang unsupported attributes" 2015-02-03 22:51:47 +00:00
Elliott Hughes
9fc43358f7 Merge "Extra Win32 compatibility." 2015-02-03 22:27:42 +00:00
Elliott Hughes
714196d05c Extra Win32 compatibility.
Change-Id: Ibc583aba580f4fc15c243f495ead44b2ce4c6e5e
2015-02-03 14:26:58 -08:00
Elliott Hughes
6c6f39678c Merge "Fix Mac build." 2015-02-03 21:03:45 +00:00
Elliott Hughes
af4885a4a8 Fix Mac build.
I knew I should have created a new library that doesn't build for the
Mac or Windows rather than adding to libutils...

Change-Id: I7c07eaa93affb7e83d4da384f03652c39065562a
2015-02-03 13:02:57 -08:00
Elliott Hughes
6974ba4ed4 Merge "Add Google-style ReadFileToString and WriteStringToFile." 2015-02-03 20:19:08 +00:00
Elliott Hughes
dec12b2b71 Add Google-style ReadFileToString and WriteStringToFile.
Bug: 19217569
Change-Id: I64789d3fa6777ee30a324cdf00fdc275c1230e1b
2015-02-03 12:18:11 -08:00
Elliott Hughes
8457a7f9aa Merge "Remove netcfg's unused options." 2015-02-03 20:01:13 +00:00
Elliott Hughes
187eade127 Remove netcfg's unused options.
Only "netcfg" for a list of interfaces and "netcfg <interface> dhcp" still
seem to be used.

Change-Id: I9f0b580474258fa648deb5287f98d8ec5533ca6f
2015-02-03 11:59:22 -08:00
Elliott Hughes
2b2b7632f5 Merge "Revert "Remove netcfg's unused options."" 2015-02-03 19:56:43 +00:00
Elliott Hughes
c463025a19 Revert "Remove netcfg's unused options."
This reverts commit f8e83054cb.

Change-Id: Iede772f96ff9008277df433dcbb5f6603de65283
2015-02-03 19:56:35 +00:00
Andreas Gampe
4fd6d50181 Merge "Init: Fix literal" 2015-02-03 19:32:36 +00:00
Andreas Gampe
0ab46c9e2b Init: Fix literal
This is a literal 0 implicitly converted to a NULL.

Change-Id: I0573e85eb0578f938877c4bec79054081c27e661
2015-02-03 11:31:11 -08:00
Andreas Gampe
fe2fb359d6 Init: Fix Clang unsupported attributes
Make attributes conditional on not compiling with Clang.

Change-Id: Ic4e9b382308651c7b1901bfa192b6591672dc5ab
2015-02-03 11:25:26 -08:00