summaryrefslogtreecommitdiffstats
path: root/discover/kboot-parser.c
Commit message (Collapse)AuthorAgeFilesLines
* lib/types: Create common file for type definitionsJeremy Kerr2013-04-101-1/+1
| | | | | | | | | | | | The device and boot_option types are defined in pb-protocol.h, but aren't really specific to the procotol. This means a lot of non-messaging-related files are #including the protocol definitions unnecessarily. This change separates the types out into lib/types/types.h. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Minor comment fixGeoff Levand2012-03-181-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add new member get_pair to conf parser contextGeoff Levand2012-03-181-0/+1
| | | | | | | | To allow parsers more control over finding paramerter pairs add a new member get_pair to the parser struct conf_context. Initialize get_pair=conf_get_pair_equal for existing parsers. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Refactor parser routine conf_get_param_pair()Geoff Levand2012-03-181-1/+1
| | | | | | | | Refactor conf_get_param_pair() and rename to conf_get_pair(). Add two new wrapper routines conf_get_pair_equal() and conf_get_pair_space(). Signed-off-by: Geoff Levand <geoff@infradead.org>
* Use static array for parsersGeoff Levand2012-03-161-1/+1
| | | | | | | | | Change the parser structure array implementation from using an array in a seperate parsers section to a static array of pointers in parser.c. Parser priority is now set by the position in the new parsers array. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix seg fault with bare kboot.conf variablesGeoff Levand2012-03-161-0/+5
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Iterate over all conf file parsersGeoff Levand2009-07-091-1/+1
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Zero parser globals before useGeoff Levand2009-07-091-0/+1
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Split common routines from kboot parserGeoff Levand2009-03-301-269/+99
| | | | | | | | | | | | | | | | Pull out the common .conf file parsing logic from kboot-parser.c and into two new files parser-conf.h and parser-conf.c, and rework the kboot parser to use those common routines. The new common routines are based on a .conf file parser context struct conf_context. The specific parsers setup the context then call the main parsing entry routine conf_parse(). conf_parse() uses the context info to open and read .conf files and call parser specific callbacks to process name:value pairs and to add boot_option instances to the discover server. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Loop through valid kboot conf namesGeoff Levand2009-03-231-13/+38
| | | | | | | | | | | The PS3 bootloader spec allows several kboot.conf file names. Add a loop in the parser to check for all of them. Also, print some diagnostic messages to the log file and change the parser routine name from 'parser' to 'kboot_parser' to give a better log file output. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Move log to libraryGeoff Levand2009-02-011-1/+1
| | | | | | | | | | | Move the log routines to the petitboot library. The log routines are generic enough to be used for both server and client. Does not change the log source. jk: move to lib/log/ instead of lib/ Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Fix unused parameter warningsJeremy Kerr2009-02-011-1/+3
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use separate section for parsers arrayJeremy Kerr2009-01-021-5/+1
| | | | | | | Instead of hardcoding the array of parsers, use the linker to do the work for us. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Hook up parsers to device discoveryJeremy Kerr2009-01-021-73/+82
| | | | | | | | Iterate the parsers from the device handler on an add event. Initial change to just the kboot parser. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Initial support for multiple UIsJeremy Kerr2008-12-151-0/+288
Move the device discovery code from separate udev helpers to a single process to listen on two sockets: one SOCK_DGRAM for incoming udev events, and one SOCK_STREAM for UIs to connect. Initial support for client/server infrastructure, still need to wire-up the udev messages. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud