Initial support for multiple UIs 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>
Rework device-path handling Pass full device paths around, rather than shortened device names and mountpoints. The parse() function has been updated to only take a device path; the mountpoint can be derived with mountpoint_for_device. Also, add initial handling for uuid= and label= syntaxes. This allows us to remap ps3 devices where necessary. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Don't reset dev->id in yaboot parser - this may end up giving duplicate IDs for different partitions. It's fine to keep the device where we discovered the config file. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Resolve device paths in kernel and initrd locations. Instead of mounting in random locations, create a fixed mapping between device and mountpoint. This allows the parsers to refer to files outside the current partition. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Use pb_log in the udev-helper. Rather than printf(), as stdout gets lost in the ether. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Separate parsing infrastructure and add test wrapper Add a parsers.h header, providing the interface that parsers should be written to (instead of the olf udev-helper.h). This allows us to build the parsers into a separate test executable. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Remove duplicate prepend_mountpoint() functions. Replace prepend_mountpoint() with join_paths(), and make it available to all parsers, instead of duplicating it in each. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Add some basic yaboot.conf parsing support Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>