summaryrefslogtreecommitdiffstats
path: root/discover
Commit message (Collapse)AuthorAgeFilesLines
* lib/types: Create common file for type definitionsJeremy Kerr2013-04-107-7/+7
| | | | | | | | | | | | 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>
* discover: Remove {U,}MOUNT_BIN definesJeremy Kerr2013-03-051-7/+4
| | | | | | | Use pb_system_apps instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add udevadm to pb_system_appsJeremy Kerr2013-03-051-1/+1
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: Use pb_run_cmd rather than calling system()Jeremy Kerr2013-03-051-1/+11
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: remove (unused) duplicate struct mount_mapJeremy Kerr2013-03-051-5/+0
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: remove unused message.h fileJeremy Kerr2013-03-052-32/+0
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* parser: remove unused fields from struct parserJeremy Kerr2013-03-051-2/+0
| | | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: simplify handler switch statementJeremy Kerr2013-03-052-35/+22
| | | | | | | | Instead of using nested switch statements in device_handler_event, define an array of handlers, and lookup instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Cleanup --dry-run option codeGeoff Levand2012-03-301-2/+2
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* pb-discover: Ignore ram, loop and no-name devicesGeoff Levand2012-03-262-10/+18
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Fix device mount retryGeoff Levand2012-03-261-4/+11
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add more paths to grub2 parserGeoff Levand2012-03-261-0/+4
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Log to stderr, allow --log=-Geoff Levand2012-03-261-4/+8
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Zero automatic sockaddrGeoff Levand2012-03-261-0/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add DEVPATH to udev_print_event()Geoff Levand2012-03-261-2/+6
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add grub2 conf file parserGeoff Levand2012-03-183-3/+190
| | | | | | | | Add grub2 parser and sample config file. Reorder parser priorities: From (yaboot -> kboot) to (kboot -> grub2 -> yaboot). 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-184-1/+15
| | | | | | | | 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-183-9/+32
| | | | | | | | 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>
* Add parser routine conf_replace_char()Geoff Levand2012-03-182-0/+17
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Convert test to automakeGeoff Levand2012-03-161-5/+9
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Use static array for parsersGeoff Levand2012-03-165-28/+19
| | | | | | | | | 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>
* Use define_parser() for nativeGeoff Levand2012-03-161-12/+19
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add --start-daemon option to ui programsGeoff Levand2012-03-081-2/+2
| | | | | | | | Add the option --start-daemon to automatically start pb-discover if it is not already started. For use when running as a stand-alone app. Signed-off-by: Geoff Levand <geoff@infradead.org>
* Log file cleanupsGeoff Levand2012-03-081-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Retry device mount without 'ro' optionGeoff Levand2012-03-081-0/+3
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add '--action=add' to udevadm trigger commandGeoff Levand2012-02-241-1/+3
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Move installed programs from bin to sbinGeoff Levand2012-02-241-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Add usage comment to parse_user_eventGeoff Levand2012-02-151-0/+6
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* 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>
OpenPOWER on IntegriCloud