| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We need to escape any double-quotes.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Update check_boot_option_count to check if a parser returned more than
one boot option with is_default set.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we pass "events" between the udev, user-event and
device-handler layers. These events all get sent through
device_handler_event, then de-multiplexed to an appropriate handler,
depending on their source.
Instead, just export relevant device_handler functions, and have the
(old) event sources call these functions directly.
This also means we can include a lot more of the device hander code in
the parser tests.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Rather than exposing log internals (through always_flush and
set_stream), do all logging init through pb_log_init(). If pb_log_init()
hasn't been called, pb_log will drop messages.
Also, add a pb_debug() function, specifically for debugging information.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
If we didn't find any valid boot options in the pxe buffer, we'll call
discover_context_add_boot_option with a NULL boot option.
This change adds a check before we try to add the boot option, and a
test to verify this situation.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Check the overriding of 'partition' directive from yaboot conf file for
'petitboot', then verify the device name on which the resource resides
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We need to provide the dry_run argument.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add an --enable-test-valgrind argument to configure, to run all tests
under valgrind, configured to fail on leaked memory
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
.. so we can free at exit
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A couple of fixes for yaboot's device-handling code. Firstly, we need to
use 'device=' rather than 'root=', as the latter is purely for ybin, to
define where the yaboot binary goes.
Secondly, we need to respect global and option-specific device=
parameters. To do this, we keep all boot_image and initrd strings in the
state, and create the actual resources in yaboot_finish.
Add a test for all override cases, and fix the incorrect boot= parsing
in the rh8 test.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
All of the image options should be overridable by global options.
Instead of building the boot_args during yaboot_process_pair, we add
discovered data into the state struct, then create the boot args from
this data during yaboot_finish
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
In the cleanup of yaboot option state, 3fb8fb6fb, we change from
checking opt->boot_image to opt, to indicate that we're parsing an image
section.
We missed one check, which is causing a segfault due to the null opt.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
Add a couple of tests to verify the pxe parser, particularly the
different styles of initrd handling.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a check for external URL resources.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
For non-local parsers (ie, PXE), we need to have the conf_url set. This
change adds a function to provide the originating URL.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the Makfile.am relocatable output files from automake _LIBRARIES
to automake _PROGRAMS. Also, change the output file name extension
from .o to .ro to better show these are relocatable files.
Fixes automake warnings like these:
discover/Makefile.am: `libparser.o' is not a standard library name
discover/Makefile.am: did you mean `libparser.a'?
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
General cleanup of Makefile.am. This cleanup should retain the same
makefile behavior.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
When we see a boot option with is_default set, store it in the handler
and register a timeout waiter.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Fixes to make maintainer-clean work properly.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
Remove the GNU awk specifics to allow the use of a standard
awk program. Fixes build errors on older distros.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We should talloc_free the parser list once we're done, enabling
valgrind's leak check. Before:
[jk@pablo parser]$ valgrind ./test-null
...
==9330== HEAP SUMMARY:
==9330== in use at exit: 288 bytes in 3 blocks
==9330== total heap usage: 11 allocs, 8 frees, 1,177 bytes allocated
After:
[jk@pablo parser]$ valgrind ./test-null
...
==9940== HEAP SUMMARY:
==9940== in use at exit: 0 bytes in 0 blocks
==9940== total heap usage: 11 allocs, 11 frees, 1,177 bytes allocated
==9940==
==9940== All heap blocks were freed -- no leaks are possible
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new routine check_not_present_resource() to check
that a resource is not present. This is typically used
to check that an initrd entry has not been found.
Also add any needed checks for no initrd to the existing
tests.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
|
| |
Now that we dynamically add parsers, we can use a list to
hold them. Also simplifies the test_run_parser() routine.
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a resource type for grub, allowing us to parse search parameters.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a real-world config file from a f18 ppc64 machine.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a yaboot test to add boot options for an external device, then
hotplug that device.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a function, test_hotplug_device(), to simulate the addition of
devices during tests. This should make it possible to observe boot
options' resources changing from unresolved state to resolved.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add check_resolved_local_resource and check_unresolved_resource to
check the resources returned from parsers.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Simple function to check a boot_option's name.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Add a small helper to check boot option arguments.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add a helper function to check the expected boot option counts, and
print the boot option details if the check fails.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|