summaryrefslogtreecommitdiffstats
path: root/init/parser.h
Commit message (Collapse)AuthorAgeFilesLines
* init: limit visibility of init_parser.c helpersGreg Hackmann2013-11-251-1/+0
| | | | | | | To prevent clashing with forthcoming changes to uevent_parser.c Change-Id: I2ee183261c7f43e0e4104a16a280c7ee73d7df96 Signed-off-by: Greg Hackmann <ghackmann@google.com>
* init: delay importing files until after parsing the current fileDima Zavin2012-01-051-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | If we process the import directive inline, then the ordering of the commands for the "on xxx" sections would be a little unexpected. The init.rc files do not really have an implied order as to which section appears and gets processed first. The init code itself provides that ordering explicitly. For the user, the expectation is that if both the current file and the imported file define a section (e.g. "on init"), then the commands in the current file will be executed first, and then the ones from the imported file(s). The current implementation did not do that. It processed the import directive inline, and thus the imported (i.e. dependent) files would appear first in the command lists for the sections. This created unintended side effects and the solution would have been to try and put the import lines somewhere in the middle of the init file. This would be difficult to notice and hard to extract the dependencies. To solve this, we add the imports to a list for each file being parsed and process the list after finishing parsing the file. This provides predictable order for imports and provides a logical flow from the user perspective: the currently parsed file gets to run its commands before the files being imported. Change-Id: I06dc35ff286314060e16b18923683cd2787269de Signed-off-by: Dima Zavin <dima@android.com>
* init: Split parser into generic parser and init parserColin Cross2010-04-211-9/+18
| | | | Change-Id: I451ebc4ff12f2ac660eb533fa10ad561fa25c9dd
* init: Handle commands in event queue loopColin Cross2010-04-161-1/+1
| | | | Change-Id: I679059dae43143f3c8f16b68de5694539b699e50
* init: Move parser prototypes to parser.hColin Cross2010-04-131-0/+31
Change-Id: I31db51eb8e8a33a0bd06b41206bc9f9147d16d41