de6bd50d4238d19ec401127bcf2321dc679d908d |
|
14-Feb-2018 |
Tom Cherry <tomcherry@google.com> |
init: add host side parser for init Create a host side parser for init such that init rc files can be verified for syntax correctness before being used on the device. Bug: 36970783 Test: run the parser on init files on host Change-Id: I7e8772e278ebaff727057308596ebacf28b6fdda
/system/core/init/action.cpp
|
9cbf57048cf0057f499bf1911e4ac3eba795becb |
|
14-Feb-2018 |
Tom Cherry <tomcherry@google.com> |
Move all Action parsing into ActionParser Bug: 36970783 Test: Build Change-Id: Iea2d97fb45c3e88bc83fb72d6fa67049be42cfa9
/system/core/init/action.cpp
|
7fd3bc27eccdcb11de4886bdda05cd26a8d8af5c |
|
14-Feb-2018 |
Tom Cherry <tomcherry@google.com> |
Move ActionManager to its own file Bug: 36970783 Test: build Change-Id: I08fa39052236b462249f79de1d02bf02bdbf4c84
/system/core/init/action.cpp
|
0f6417f232e92aad0d712ab1b131c0829869cddd |
|
14-Feb-2018 |
Tom Cherry <tomcherry@google.com> |
Move ActionParser to its own file Bug: 36970783 Test: build Change-Id: Idd5b923e4789760bb9ef67c10982b2642bc6a31a
/system/core/init/action.cpp
|
eeb21885545f25606498feee0ad3f1f9b29e44e8 |
|
15-Jan-2018 |
Jaekyun Seok <jaekyun@google.com> |
Apply the whitelist of actionable system properties This whitelist will be applied only when ro.actionable_compatible_property.enabled is true. Bug: 38146102 Test: tested on walleye with ro.actionable_compatible_property.enabled=true Change-Id: Ifd7211396b53e50a06d79e7c67224e2b38ef7c9d
/system/core/init/action.cpp
|
c49719fc5d2cf3817f6997ce40fc2dac7d411efa |
|
10-Jan-2018 |
Tom Cherry <tomcherry@google.com> |
init: always expand args in subcontext Currently init expands properties in arguments only when those commands are run in a subcontext. This creates a hole where properties that should not be accessible from a given subcontext of init can be accessed when running a command in the main init executable (for example `start`). This change creates a callback in subcontext init that simply expands and returns arguments back to the main init process, to ensure that only those properties that a subcontext can access get expanded. Bug: 62875318 Test: boot bullhead, new unit tests Change-Id: I2850009e70da877c08e4cc83350c727b0ea98796
/system/core/init/action.cpp
|
579e682628805dd9c3f8c96765c0beb3f56f1494 |
|
20-Dec-2017 |
Elliott Hughes <enh@google.com> |
Add std::string StartsWith*/EndsWith* overloads. We should have done this from the beginning. Thanks to Windows, we're not going to be able to switch libbase over to std::string_view any time soon. Bug: N/A Test: ran tests Change-Id: Iff2f56986e39de53f3ac484415378af17dacf26b
/system/core/init/action.cpp
|
7d0a5c3656ee56eb81e442b58063d500b4f506e0 |
|
10-Nov-2017 |
Steven Moreland <smoreland@google.com> |
EndSection returns Result<Success> Allow it to fail. When there is an error for a section ending, print the error pointing to the line where the section starts. Bug: 69050941 Test: boot, init_tests Change-Id: I1d8ed25f4b74cc9ac24d38b8075751c7d606aea8
/system/core/init/action.cpp
|
cb0f9bbc855097e0c8248643015b837255fd569a |
|
13-Sep-2017 |
Tom Cherry <tomcherry@google.com> |
init: run vendor commands in a separate SELinux context One of the major aspects of treble is the compartmentalization of system and vendor components, however init leaves a huge gap here, as vendor init scripts run in the same context as system init scripts and thus can access and modify the same properties, files, etc as the system can. This change is meant to close that gap. It forks a separate 'subcontext' init that runs in a different SELinux context with permissions that match what vendors should have access to. Commands get sent over a socket to this 'subcontext' init that then runs them in this SELinux context and returns the result. Note that not all commands run in the subcontext; some commands such as those dealing with services only make sense in the context of the main init process. Bug: 62875318 Test: init unit tests, boot bullhead, boot sailfish Change-Id: Idf4a4ebf98842d27b8627f901f961ab9eb412aee
/system/core/init/action.cpp
|
68f2a4614518468f1320ad3e62a6db554e509fb1 |
|
23-Aug-2017 |
Tom Cherry <tomcherry@google.com> |
init: enable error reporting of builtin functions Enable error reporting when builtin functions fail. These errors are now reported with full context including the source file and line number, e.g. init: Command 'write /sys/module/subsystem_restart/parameters/enable_debug ${persist.sys.ssr.enable_debug}' action=early-boot (/init.bullhead.rc:84) took 0ms and failed: cannot expand '${persist.sys.ssr.enable_debug}' There are two small caveats: 1) There are nearly 200 reports of builtins failure due to "No such file or directory". Many of these are due to legacy paths included in rootdir/init.rc. Until they are cleaned up, reporting of these failures is disabled. 2) Similarly, symlink is often used to create backwards compatible symlinks. By their very nature, these calls are expected to fail on newer systems that do already use the new path. Due to this, failures of symlink due to EEXIST are not reported. Bug: 38038887 Test: boot bullhead, only see true errors reported from builtins. Change-Id: I316c13e3adc992cacc6d79ffee987adc8738fca0
/system/core/init/action.cpp
|
130e3d7204d2b2d3d2ba956c3243fbc0fb1cabe4 |
|
23-Aug-2017 |
Tom Cherry <tomcherry@google.com> |
init: pass errors from one Result<T> to another better Result<T> currently has two problems, 1) A failing Result<T> cannot be easily constructed from a Result<U>'s error. 2) errno is lost when passing .error() through multiple Result<T>'s This change fixes both problems having Result<T>::error() return a ResultError class that contains the std::string error message and int errno. It additionally has ostream operators to continue to allow printing the error string directly to an ostream and also to pass the errno through to another Result<T> class via Error() creation. Lastly, it provides a new constructor for Result<T> for ResultError, such that a Result<T> can be constructed from Result<U>::error(). Test: boot bullhead, init unit tests Change-Id: Id9614b727cdabd2f5498b0da0e598e9aff7d9ae0
/system/core/init/action.cpp
|
89bcc85edfff4a2b2378f638ab90b2f7e19a8472 |
|
03-Aug-2017 |
Tom Cherry <tomcherry@google.com> |
init: use Result<T> for the parsing functions Test: boot bullhead Merged-In: I7f00c5f0f54dd4fe05df73e1d6a89b56d788e113 Change-Id: I7f00c5f0f54dd4fe05df73e1d6a89b56d788e113
/system/core/init/action.cpp
|
557946e57c375b05deb5ba07b739f27abc70697e |
|
01-Aug-2017 |
Tom Cherry <tomcherry@google.com> |
init: use Result<T> for builtin functions We currently throw out the return values from builtin functions and occasionally log errors with no supporting context. This change uses the newly introduced Result<T> class to communicate a successful result or an error back to callers in order to print an error with clear context when a builtin fails. Example: init: Command 'write /sys/class/leds/vibrator/trigger transient' action=init (/init.rc:245) took 0ms and failed: Unable to write to file '/sys/class/leds/vibrator/trigger': open() failed: No such file or directory Test: boot bullhead Merged-In: Idc18f331d2d646629c6093c1e0f2996cf9b42aec Change-Id: Idc18f331d2d646629c6093c1e0f2996cf9b42aec
/system/core/init/action.cpp
|
ede0d538501dfc78c741fb3b0645406636d1d1fd |
|
06-Jul-2017 |
Tom Cherry <tomcherry@google.com> |
Move Timer from init to libbase Test: boot bullhead Test: new libbase unit tests Change-Id: Ic398a1daa1fe92c10ea7bc1e6ac3f781cee9a5b5
/system/core/init/action.cpp
|
eeab491efd8f456324f88e444f228b1016712e45 |
|
28-Jun-2017 |
Wei Wang <wvw@google.com> |
init: Support custom shutdown actions We have been seeing panics and errors during shutdown sequence in some vendor's platform, and it is required to disable error handling during shutdown. This CL separates the shutdown request to execute another "shutdown" trigger at the beginning of shutdown stage. And vendor can use this trigger to add custom commands needed for shutting down gracefully. Bug: 38203024 Bug: 62084631 Test: device reboot/shutdown Change-Id: I3fac4ed59f06667d86e477ee55ed391cf113717f
/system/core/init/action.cpp
|
81f5d3ebef2c3789737bf718fc2a2cdd7b9e8b33 |
|
22-Jun-2017 |
Tom Cherry <tomcherry@google.com> |
init: create android::init:: namespace With some small fixups along the way Test: Boot bullhead Test: init unit tests Change-Id: I7beaa473cfa9397f845f810557d1631b4a462d6a
/system/core/init/action.cpp
|
1c3a53f03ca3c2c647f83cd8b8ae7e18c5c7bc69 |
|
23-Jun-2017 |
Tom Cherry <tomcherry@google.com> |
init: cleanup some string usage 1) property_set() takes const std::string& for both of its arguments, so stop using .c_str() with its parameters 2) Simplify a few places where StringPrintf() is used to concatenate strings 3) Use std::to_string() instead of StringPrintf() where it's better suited Test: Boot bullhead Test: init unit tests Change-Id: I68ebda0e469f6230c8f9ad3c8d5f9444e0c4fdfd
/system/core/init/action.cpp
|
d9ebf061176757b874a64c3a8ed00d5cfc82f2c1 |
|
25-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
Merge "init: rename 'Trigger' to 'Event' and convert to std::variant"
|
fe062055cb11fcb1a6178b046173fc0361ad5b96 |
|
25-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
ueventd: replace ueventd_parser.cpp with init_parser.cpp Previously init_parser.cpp was made generic and capable of parsing any number of differently named 'sections' or prefixed lines. We now use these capabilities to do the parsing for ueventd. Bug: 36250207 Bug: 33785894 Test: boot bullhead and ensure the right /dev nodes exist with the right permissions set Test: verify no boot time difference Change-Id: I698ca962d414f8135af32f6c9cd778841b2b8b53
/system/core/init/action.cpp
|
26ed9cb7062c852749b18cd4b5873d07a3389d00 |
|
17-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: rename 'Trigger' to 'Event' and convert to std::variant The term 'trigger' should be used in 'Action' to indicate what causes the 'Action' to be executed. The term 'event' should be used in ActionManager's queue to indicate a state change that is checked against the 'triggers' of an 'Action' to see if it should execute. Convert the previous Trigger class to std::variant, as the latter is better suited for this use. Change-Id: I2558367c8318b536aa69fcec93793f1c12857ef5
/system/core/init/action.cpp
|
30a6f276fd8850b0a78689d7bff3cb06a18cb286 |
|
20-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: clean up the SectionParser interface and Parser class Remove the dependency on Action and Service from what should be a generic Parser class. Make ActionParser, ImportParser, and ServiceParser take a pointer to their associated classes instead of accessing them through a singleton. Misc fixes to SectionParser Interface: 1) Make SectionParser::ParseLineSection() non-const as it always should have been. 2) Use Rvalue references where appropriate 3) Remove extra std::string& filename in SectionParser::EndFile() 4) Only have SectionParser::ParseSection() as pure virtual Document SectionParser. Make ImportParser report the filename and line number of failed imports. Make ServiceParser report the filename and line number of duplicated services. Test: Boot bullhead Change-Id: I86568a5b375fb4f27f4cb235ed1e37635f01d630
/system/core/init/action.cpp
|
012c573e267b8dd70de14237cb470bd7301ee8ea |
|
18-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: Stop combining actions In the past, I had thought it didn't make sense to have multiple Action classes with identical triggers within ActionManager::actions_, and opted to instead combine these into a single action. In theory, it should reduce memory overhead as only one copy of the triggers needs to be stored. In practice, this ends up not being a good idea. Most importantly, given a file with the below three sections in this same order: on boot setprop a b on boot && property:true=true setprop c d on boot setprop e f Assuming that property 'true' == 'true', when the `boot` event happens, the order of the setprop commands will actually be: setprop a b setprop e f setprop c d instead of the more intuitive order of: setprop a b setprop c d setprop e f This is a mistake and this CL fixes it. It also documents this order. Secondly, with a given 'Action' now spanning multiple files, in order to keep track of which file a command is run from, the 'Command' itself needs to store this. Ironically to the original intention, this increases total ram usage. This change now only stores the file name in each 'Action' instead of each 'Command'. All in all this is a negligible trade off of ram usage. Thirdly, this requires a bunch of extra code and assumptions that don't help anything else. In particular it forces to keep property triggers sorted for easy comparison, which I'm using an std::map for currently, but that is not the best data structure to contain them. Lastly, I added the filename and line number to the 'processing action' LOG(INFO) message. Test: Boot bullhead, observe above changes Test: Boot sailfish, observe no change in boot time Change-Id: I3fbcac4ee677351314e33012c758145be82346e9
/system/core/init/action.cpp
|
3f5eaae526413a29de899270714469c76dc91ec8 |
|
07-Apr-2017 |
Tom Cherry <tomcherry@google.com> |
init: more header cleanup Remove includes of "log.h" that really want <android-base/logging.h> Fix header include order Remove headers included in .cpp files that their associated .h already includes Remove some unused headers Test: boot bullhead Change-Id: I2b415adfe86a5c8bbe4fb1ebc53c7b0ee2253824
/system/core/init/action.cpp
|
ccf23537eeacfa47e5f18dd3b75089886d177c1b |
|
29-Mar-2017 |
Tom Cherry <tomcherry@google.com> |
init: replace property_get with its android::base equivalent Slowly try to decouple property_service.cpp from the rest of init. Test: Boot bullhead Change-Id: I267ae0b057bca0bf657b97cb8bfbb18199282729
/system/core/init/action.cpp
|
d8a7257b14086a9070aa521b41118570ee4f4aaa |
|
13-Mar-2017 |
Tom Cherry <tomcherry@google.com> |
init: fix DumpState() logging Fix two formatting issues in Action::DumpState(), Old: on ro.crypto.state=encrypted ro.crypto.type=file zygote-start New: on ro.crypto.state=encrypted && ro.crypto.type=file && zygote-start Old: on boot %sifup lo %shostname localhost %sdomainname localdomain %swrite /proc/sys/vm/overcommit_memory 1 New: on boot ifup lo hostname localhost domainname localdomain write /proc/sys/vm/overcommit_memory 1 Also, now that we're importing many small rc files, it no longer makes sense to call Parser::DumpState() after each import. Therefore, move the conditional to call Parser::DumpState() to after /init.rc and its imports are parsed and after the late imports are parsed. Test: Boot bullhead with DumpState() enabled and check the output Change-Id: I0b81305b8938aa1a7133d7dd2055f34f47609cf9
/system/core/init/action.cpp
|
2bc00140be22f08964102068a736358fe8dde5da |
|
13-Mar-2017 |
Tom Cherry <tomcherry@google.com> |
init: enable C++17 Test: Boot bullhead Change-Id: I40961ff765461e8aef211d27158ffb7c4be76493
/system/core/init/action.cpp
|
331cf2fb7c16b5b25064f8d2f00284105a9b413f |
|
29-Nov-2016 |
Elliott Hughes <enh@google.com> |
Replace the "coldboot" timeout with a property. Also rename init's existing boot-time related properties so they're all "ro.*" properties. Example result: # Three properties showing when init started... [ro.boottime.init]: [5294587604] # ...how long it waited for ueventd... [ro.boottime.init.cold_boot_wait]: [646956470] # ...and how long SELinux initialization took... [ro.boottime.init.selinux]: [45742921] # Plus one property for each service, showing when it first started. [ro.boottime.InputEventFind]: [10278767840] [ro.boottime.adbd]: [8359267180] [ro.boottime.atfwd]: [10338554773] [ro.boottime.audioserver]: [10298157478] [ro.boottime.bootanim]: [9323670089] [ro.boottime.cameraserver]: [10299402321] [ro.boottime.cnd]: [10335931856] [ro.boottime.debuggerd]: [7001352774] [ro.boottime.debuggerd64]: [7002261785] [ro.boottime.drm]: [10301082113] [ro.boottime.fingerprintd]: [10331443314] [ro.boottime.flash-nanohub-fw]: [6995265534] [ro.boottime.gatekeeperd]: [10340355242] [ro.boottime.healthd]: [7856893380] [ro.boottime.hwservicemanager]: [7856051088] [ro.boottime.imscmservice]: [10290530758] [ro.boottime.imsdatadaemon]: [10358136702] [ro.boottime.imsqmidaemon]: [10289084872] [ro.boottime.installd]: [10303296020] [ro.boottime.irsc_util]: [10279807632] [ro.boottime.keystore]: [10305034093] [ro.boottime.lmkd]: [7863506714] [ro.boottime.loc_launcher]: [10324525241] [ro.boottime.logd]: [6526221633] [ro.boottime.logd-reinit]: [7850662702] [ro.boottime.mcfg-sh]: [10337268315] [ro.boottime.media]: [10312152687] [ro.boottime.mediacodec]: [10306852530] [ro.boottime.mediadrm]: [10308707999] [ro.boottime.mediaextractor]: [10310681177] [ro.boottime.msm_irqbalance]: [7862451974] [ro.boottime.netd]: [10313523104] [ro.boottime.netmgrd]: [10285009351] [ro.boottime.oem_qmi_server]: [10293329092] [ro.boottime.per_mgr]: [7857915776] [ro.boottime.per_proxy]: [8335121605] [ro.boottime.perfd]: [10283443101] [ro.boottime.qcamerasvr]: [10329644772] [ro.boottime.qmuxd]: [10282346643] [ro.boottime.qseecomd]: [6855708593] [ro.boottime.qti]: [10286196851] [ro.boottime.ril-daemon]: [10314933677] [ro.boottime.rmt_storage]: [7859105047] [ro.boottime.servicemanager]: [7864555881] [ro.boottime.ss_ramdump]: [8337634938] [ro.boottime.ssr_setup]: [8336268324] [ro.boottime.surfaceflinger]: [7866921402] [ro.boottime.thermal-engine]: [10281249924] [ro.boottime.time_daemon]: [10322006542] [ro.boottime.ueventd]: [5618663938] [ro.boottime.vold]: [7003493920] [ro.boottime.wificond]: [10316641073] [ro.boottime.wpa_supplicant]: [18959816881] [ro.boottime.zygote]: [10295295029] [ro.boottime.zygote_secondary]: [10296637269] Bug: http://b/31800756 Test: boots Change-Id: I094cce0c1bab9406d950ca94212689dc2e15dba5
/system/core/init/action.cpp
|
93df4e18a255262595acb862ab870e9fed721fb8 |
|
17-Nov-2016 |
Wei Wang <wvw@google.com> |
init: move empty string check to InitTriggers Test: mma Bug: 32838381 Change-Id: I69203734ef7d3640da75f3e3cbe9254bf468d916
/system/core/init/action.cpp
|
d67a4abc647d5ed7235ff7ee1695b31340e63a1c |
|
16-Nov-2016 |
Wei Wang <wvw@google.com> |
init: fix undefined behavior in ExecuteCommand ExecuteCommand may change command_ vector which leads undefined behavior This bug is found when adding logs in ExecuteCommand printing our Command class fields Bug: 32838381 Test: on emulator Change-Id: I96468bd2192ca80013871a3a6ac4132149363fff
/system/core/init/action.cpp
|
8b1d526a72c1e6705b03f4b3267ee02fe84ce765 |
|
16-Nov-2016 |
Wei Wang <wvw@google.com> |
Revert "Revert "init: warn slow action"" This reverts commit 1802d11cc766f04e75e93c7f98dcf52fb2e64149. Test: grep init log Bug: 32712851
/system/core/init/action.cpp
|
9b1d5e15ef4bc51cb79ec6504cbd8cd62d7a30bc |
|
15-Nov-2016 |
Treehugger Robot <treehugger-gerrit@google.com> |
Merge "init: fix BuildTriggersString for empty string"
|
69b9b36c114680c87251ab0f140fd5d6b61e1fa9 |
|
15-Nov-2016 |
Wei Wang <wvw@google.com> |
init: fix BuildTriggersString for empty string behavior is undefined if pop_back() on empty std::string Test: grep init log Bug: 32712851 Bug: 32838381 Change-Id: I5bfac2fb275036abd0158b78df14019d2e82716d
/system/core/init/action.cpp
|
1802d11cc766f04e75e93c7f98dcf52fb2e64149 |
|
15-Nov-2016 |
Nick Desaulniers <ndesaulniers@google.com> |
Revert "init: warn slow action" This reverts commit b1a309ac1f08df9864ba2c364225a6bb172fd003. Bug: 32712851 Bug: 32838381 Change-Id: Ib4c47de5ea5b0bad765a43cbff9f73d9978729d4
/system/core/init/action.cpp
|
b1a309ac1f08df9864ba2c364225a6bb172fd003 |
|
10-Nov-2016 |
Wei Wang <wvw@google.com> |
init: warn slow action Slow action that takes longer than 50ms will be warned to user Test: grep init log Bug: 32712851 Change-Id: I3a6a881a8dee1807270343b511a47c76dd230392
/system/core/init/action.cpp
|
7bc87a5a780361928bd1aeed9d2f22233fe05407 |
|
05-Aug-2016 |
Elliott Hughes <enh@google.com> |
Move init's kernel logging into libbase. This will let other stuff (such as adbd and recovery) use it too. Bug: http://b/28467098 Change-Id: Idab51f438ed3edd6fe65a56c4b396eaff5f3833e
/system/core/init/action.cpp
|
35f5d04620a3221b9f57194ab0239c7c7ba5a726 |
|
26-Jul-2016 |
Elliott Hughes <enh@google.com> |
Fix early init logging. Remove the /dev/__kmsg__ workarounds (which can then be removed from sepolicy), and fix confusion in the translation between android-base logging and kernel logging priorities (in particular, where 'notice' comes in the hierarchy). Bug: http://b/30317429 Change-Id: I6eaf9919904b6b55bc402c20bf1a4ae269014bc7 Test: adb shell dmesg | grep init
/system/core/init/action.cpp
|
f86b5a6b90619e02d1d034ef7b0adc3b439f4abb |
|
25-Jun-2016 |
Elliott Hughes <enh@google.com> |
Move init to libbase logging. Change-Id: Ibfbefeff587a69e948978a037c555fd12a5ade6a
/system/core/init/action.cpp
|
1c563d96f000876d77b2d33fbfb03c241bc503e1 |
|
30-Apr-2016 |
Chih-Hung Hsieh <chh@google.com> |
Fix google-explicit-constructor warnings. Bug: 28341362 Change-Id: I4504e98a8db31e0edcbe63c23f9af43eb13e9d86
/system/core/init/action.cpp
|
4f71319df011d796a60a43fc1bc68e16fbf7d321 |
|
05-Dec-2015 |
Elliott Hughes <enh@google.com> |
Track rename of base/ to android-base/. Change-Id: Idf9444fece4aa89c93e15640de59a91f6e758ccf
/system/core/init/action.cpp
|
b7349902a945903f9e36a569051f5131beb0bc24 |
|
26-Aug-2015 |
Tom Cherry <tomcherry@google.com> |
init: Use classes for parsing and clean up memory allocations Create a Parser class that uses multiple SectionParser interfaces to handle parsing the different sections of an init rc. Create an ActionParser and ServiceParser that implement SectionParser and parse the sections corresponding to Action and Service classes. Remove the legacy keyword structure and replace it with std::map's that map keyword -> (minimum args, maximum args, function pointer) for Commands and Service Options. Create an ImportParser that implements SectionParser and handles the import 'section'. Clean up the unsafe memory handling of the Action class by using std::unique_ptr. Change-Id: Ic5ea5510cb956dbc3f78745a35096ca7d6da7085
/system/core/init/action.cpp
|
cb716f976b078dff72aa3a61f9435d45e4beb9f5 |
|
11-Aug-2015 |
Tom Cherry <tomcherry@google.com> |
init: Queue Triggers instead of Actions When init queues a trigger, it actually enqueues all of the Actions that match with that given trigger. This works currently because all init scripts are loaded and therefore all Actions are available before init starts queueing any triggers. To support loading init scripts after init has started queueing triggers, this change enqueues Trigger objects instead of their matching Actions. Each Trigger object then matches its associated Actions during its execution. Additionally, this makes a few cosmetic clean ups related to triggers. Bug: 23186545 Change-Id: I5d177458e6df1c4b32b1072cf77e87ef952c87e4
/system/core/init/action.cpp
|
96f67316a22bc9236aed70b198e91a5406389e5b |
|
30-Jul-2015 |
Tom Cherry <tomcherry@google.com> |
init: use std::vector<std::string> for argument passing Change-Id: Ie7a64e65de3a20d0c7f7d8efc0f7c1ba121d07fe
/system/core/init/action.cpp
|
fa0c21c94ccb98bfa5cf3cc7a6b220be4a5fa378 |
|
24-Jul-2015 |
Tom Cherry <tomcherry@google.com> |
init: Create classes for Action and Command This creates the concept of 'event_trigger' vs 'property_trigger' Previously these were merged into one, such that 'on property:a=b && property:b=c' is triggered when properties a=b and b=c as expected, however combinations such as 'on early-boot && boot' would trigger during both early-boot and boot. Similarly, 'on early-boot && property:a=b' would trigger on both early-boot and again when property a equals b. The event trigger distinction ensures that the first example fails to parse and the second example only triggers on early-boot if property a equals b. This coalesces Actions with the same triggers into a single Action object Change-Id: I8f661d96e8a2d40236f252301bfe10979d663ea6
/system/core/init/action.cpp
|