summaryrefslogtreecommitdiffstats
path: root/discover
Commit message (Collapse)AuthorAgeFilesLines
* Convert build to use automakeGeoff Levand2012-02-121-0/+58
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix paths.c build warningsGeoff Levand2011-12-041-2/+2
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix params.c loggingGeoff Levand2011-12-041-4/+4
| | | | | | | Fixes build warnings like these: implicit declaration of function ‘pb_log’ Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix params.c build warningsGeoff Levand2011-12-041-2/+2
| | | | | | | Fixes warnings like these: warning: no previous prototype Signed-off-by: Geoff Levand <geoff@infradead.org>
* Iterate over all conf file parsersGeoff Levand2009-07-093-6/+6
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add discover server optionsGeoff Levand2009-07-091-2/+96
| | | | | | Add --help, --log, and --version command line options to the discover server. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Use yaboot global boot optionGeoff Levand2009-07-091-7/+44
| | | | | | | Use any yaboot global boot option in preference to the yaboot.conf device path. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Fix parsing for OpenSUSEGeoff Levand2009-07-091-22/+44
| | | | | | | Fix the special yaboot.conf parsing needed for the OpenSUSE install CD. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Zero parser globals before useGeoff Levand2009-07-094-2/+20
| | | | Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Remove discover sd to ps3d hackGeoff Levand2009-07-091-8/+0
| | | | | | | This is now old enough to be retired and allow config files on ps3d devices to refer to scsi devices. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* Add discover user eventGeoff Levand2009-06-306-0/+329
| | | | | | | Add a gereric event interface to pb-discover. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Make udev_event a generic eventGeoff Levand2009-06-307-129/+212
| | | | | | | | | | The struct udev_event can be used as a generic event, so rename it struct event and move it from udev.h into a new file event.h. Also, rename the emums UDEV_ACTION_ADD and UDEV_ACTION_REMOVE to ACTION_UDEV_ADD and ACTION_UDEV_REMOVE. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Switch device-handler to system helpersGeoff Levand2009-06-301-100/+14
| | | | | | | Convert device-handler to use the common lib system routines. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add URL test to resolve_pathGeoff Levand2009-06-301-0/+8
| | | | | | | | | | Add a check to discover's resolve_path() to test if the path is a URL, and if so just return that path. If the path has "file://", treat it as a local path. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add discover device reportGeoff Levand2009-06-303-12/+97
| | | | | | | | | | Fillout the missing discover code that reports current devices. Replaces device_handler_get_current_devices() with two new accessor routines device_handler_get_device_count() and device_handler_get_device(). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Remove device handler test codeGeoff Levand2009-06-301-33/+4
| | | | | | | | | Remove the test code from device-handler.c and hookup handler.devices and handler.n_devices in device_handler_get_current_devices(). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Check if yaboot.conf files are emptyGeoff Levand2009-06-301-1/+6
| | | | | | | Add a yaboot parser check to ignore empty yaboot.conf files. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Remove unneeded conf stripGeoff Levand2009-06-301-5/+0
| | | | | | | | conf_get_param_pair() already runs conf_strip_str() on value, so remove a redundent conf_strip_str() call. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Udev log socket deviceGeoff Levand2009-06-301-0/+2
| | | | | | | To aid problem resolution log the udev socket device to the pb_log. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add udev triggerGeoff Levand2009-06-303-0/+13
| | | | | | | | Add a new routine udev_trigger() that requests a replay of system udev events. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Remove yaboot-cfg filesGeoff Levand2009-03-302-521/+0
| | | | | | | | Remove the now unused yaboot-cnf.h and yaboot-cnf.c files. These files are no longer needed with the parser-conf routines. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Hookup yaboot parserGeoff Levand2009-03-301-200/+221
| | | | | | | | | Hookup the yaboot parser to the new parser-conf routines. This update eliminates the dependency on yaboot-cnf.h and yaboot-cnf.c. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Split common routines from kboot parserGeoff Levand2009-03-304-269/+431
| | | | | | | | | | | | | | | | 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>
* Log new boot optionsGeoff Levand2009-03-301-0/+9
| | | | | | | Add calls to log new devices in device_add_boot_option(). Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* log discover mount failureGeoff Levand2009-03-301-2/+4
| | | | | | | Add the status value to the discover mount failure log. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Log server messages to fileGeoff Levand2009-03-234-8/+20
| | | | | | | Log discover server messages to a file. Helps in debugging the server when is has problems at system startup. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
* 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>
* Make device instance constantGeoff Levand2009-02-013-4/+4
| | | | | | | Make the instance of devices read-only. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Move log to libraryGeoff Levand2009-02-018-38/+6
| | | | | | | | | | | 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>
* Move waiter to libraryGeoff Levand2009-02-015-109/+4
| | | | | | | | | | | Move the waiter routines into the petitboot library. The waiter routines are generic enough to be used for both server and client. Does not change the waiter source. jk: move to lib/waiter/ 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-013-3/+7
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Fix build warningsGeoff Levand2009-02-016-4/+7
| | | | | | | | | | | | | | | | | | | | | | Fix various minor build warnings: lib/pb-protocol/pb-protocol.c:72: warning: comparison between signed and unsigned lib/pb-protocol/pb-protocol.c:78: warning: comparison between signed and unsigned lib/pb-protocol/pb-protocol.c:141: warning: unused parameter 'buf_len' lib/pb-protocol/pb-protocol.c:241: warning: comparison between signed and unsigned discover/pb-discover.c:14: warning: no previous prototype for 'sigint_handler' discover/pb-discover.c:13: warning: unused parameter 'signum' discover/log.c:22: warning: no previous prototype for 'pb_log_set_stream' discover/discover-server.c:159: warning: no previous prototype for 'discover_server_notify_add' discover/discover-server.c:169: warning: no previous prototype for 'discover_server_notify_remove' discover/discover-server.c:179: warning: no previous prototype for 'discover_server_set_device_source' discover/discover-server.c:184: warning: no previous prototype for 'discover_server_init' discover/discover-server.c:229: warning: no previous prototype for 'discover_server_destroy' discover/device-handler.c:395: warning: comparison between signed and unsigned discover/paths.c:44: warning: comparison between signed and unsigned Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use separate section for parsers arrayJeremy Kerr2009-01-025-15/+41
| | | | | | | 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-029-175/+219
| | | | | | | | 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>
* Use a list for device->boot_optionsJeremy Kerr2009-01-021-2/+7
| | | | | | Makes adding and removing options easier for parsers. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Remove reference to device.hJeremy Kerr2008-12-311-1/+0
| | | | | | It isn't needed anymore. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Use talloc for device handler destructionJeremy Kerr2008-12-161-14/+11
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Add device handler cleanupJeremy Kerr2008-12-162-20/+140
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Initial device handler codeJeremy Kerr2008-12-165-72/+318
| | | | | | Mount discovered devices, and set up symlinks for UUID and LABELs Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Fix invocation of udev_initJeremy Kerr2008-12-161-1/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Hook up udev events to device handlerJeremy Kerr2008-12-152-2/+9
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Create device-handler for managing registered devicesJeremy Kerr2008-12-155-34/+112
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* Initial support for multiple UIsJeremy Kerr2008-12-1522-0/+2772
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