Fix NBI flags in the presence of segment merging
authorMichael Brown <mbrown@fensystems.co.uk>
Mon, 9 Jun 2008 23:11:25 +0000 (00:11 +0100)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 9 Jun 2008 23:22:45 +0000 (16:22 -0700)
commit78b21d2bdd5846a21318c428e49755f08f95fb01
tree0ad9b738a73e7c6ba274f21b56b5d380f3cd7557
parent1428a3cf777fb3daca91c25db8985ecb8e699756
Fix NBI flags in the presence of segment merging

output_nbi() was calculating ihdr.flags before merging in subsequent
segments; this meant that if the last segment got merged,
NBI_IFLAG_LAST was never set.  This breaks mknbi's disnbi.pl and
causes gPXE to reject the NBI file as invalid.

Move the calculation of ihdr.flags until after segment merging has
taken place.

Signed-off-by: Michael Brown <mcb30@etherboot.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
nbi.c