summaryrefslogtreecommitdiffstats
path: root/init/property_service.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Switch init to epoll.Elliott Hughes2015-04-241-4/+2
| | | | | | | | | | | Not just because it's what the cool kids are doing --- it also lets us simplify the inner loop and decouple it from whatever systems want to be woken to perform some activity if there's data to be read on some fd. Currently this is just used to clean up the existing signal handling, keychord, and property service code. Change-Id: I4d7541a2c4386957ad877df69e3be08b96a7dec5
* Clean up property service initialization.Elliott Hughes2015-04-241-7/+7
| | | | | | | | | | | All the code that was being delayed does is create a socket. We can do that straight away, avoid the overhead, and simplify our main loop. The keychord fd, on the other hand, seems a little tricky. It looks like /dev/keychord isn't immediately available, at least not on N9; we have to wait for ueventd to set us up the bomb. Change-Id: I020e75b8e4b233497707f0a3cbbb6038b714161f
* Don't try to read /system/default.prop.Elliott Hughes2015-04-151-1/+0
| | | | | | It doesn't exist. We use /system/build.prop. Change-Id: Ie635f9b3cc65de807f128339199b853db5a8eb2f
* Log more timing information from init.Elliott Hughes2015-03-281-49/+28
| | | | | | | | | | | | | | | | | Also make important events in init's life NOTICE rather than INFO, and ensure that NOTICE events actually make it to the kernel log. Also fix the logging so that if you have a printf format string error, the compiler now catches it. Also give messages from init, ueventd, and watchdogd distinct tags. (Previously they'd all call themselves "init", and dmesg doesn't include pids, so you couldn't untangle them.) Also include the tag in SELinux messages. Bug: 19544788 Change-Id: Ica6daea065bfdb80155c52c0b06f346a7df208fe
* Add missing parenthesis in init log message.Elliott Hughes2015-03-231-1/+1
| | | | Change-Id: Iddcd8a002bfc692b1e70d59fa8c6530306c500fa
* Always use strerror to report errno.Elliott Hughes2015-03-201-4/+4
| | | | Change-Id: Icd18e4bd7dc093c18967f45b99cd451359457b03
* Use unique_ptr to call closedir.Elliott Hughes2015-03-201-53/+53
| | | | Change-Id: I8f572a06ce59283e5bd444ae0491dea71b0ea304
* Clean up property setting code.Elliott Hughes2015-03-201-10/+13
| | | | | | In particular, ensure that all property_set failures are reported. Change-Id: Iab94a28bcba2346868c0f39bcfe26e55a2c55562
* Revert "Revert "Create libbase.""Dan Albert2015-03-161-2/+0
| | | | This reverts commit a7870d88167f619e758b5bcd15b410d16da7c16b.
* Revert "Create libbase."Nicolas Geoffray2015-03-161-0/+2
| | | | | | | | Breaks internal master. This reverts commit 98ff77204cef9bb8f0f27420833233622060a09e. Change-Id: I18dc6021cb43efff8aa88486c2d980dc2b8eedba
* Create libbase.Dan Albert2015-03-141-2/+0
| | | | | | | Move StringPrintf and the string based file I/O from libutils to libbase. Change-Id: I0297a6063874b9d92100e0dd5123fddfbda932fe
* Clean up reading and writing in init.Elliott Hughes2015-02-061-8/+5
| | | | | | | | | | | | | 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
* Stop using #if for conditional compilation.Elliott Hughes2015-02-041-10/+8
| | | | | | | | Use regular 'if' to prevent bitrot. Also remove remaining typedefs. Change-Id: I2e6ca928e2db29b88b643cf990ff05cfb0be94a6
* Build init as C++.Elliott Hughes2015-02-041-0/+560
This is just the minimal change to keep it building. Change-Id: I245c5b8413a1db114576c81462eb5737f5ffcef2