discover/pxe: check for a valid boot option before adding
authorJeremy Kerr <jk@ozlabs.org>
Fri, 6 Sep 2013 03:46:56 +0000 (11:46 +0800)
committerJeremy Kerr <jk@ozlabs.org>
Fri, 6 Sep 2013 05:23:35 +0000 (13:23 +0800)
commit15c8cadd1173f681142a3f48319a203d7b917850
tree7e9e39bb89c14412063e48e784a9857546253d64
parentd28b706489cfd2c11e281ff3eaeb136ca154a1ee
discover/pxe: check for a valid boot option before adding

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>
discover/pxe-parser.c
test/parser/Makefile.am
test/parser/test-pxe-empty.c [new file with mode: 0644]