mirror of https://github.com/ipxe/ipxe.git
[iscsi] Do not install iBFT when no iSCSI targets exist
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/8/merge
parent
7cfdd769aa
commit
2ace5196e5
|
@ -591,6 +591,12 @@ static int ibft_install ( int ( * install ) ( struct acpi_header *acpi ) ) {
|
||||||
strings.len = 0;
|
strings.len = 0;
|
||||||
len = offset;
|
len = offset;
|
||||||
|
|
||||||
|
/* Do nothing if no targets exist */
|
||||||
|
if ( ! targets ) {
|
||||||
|
rc = 0;
|
||||||
|
goto no_targets;
|
||||||
|
}
|
||||||
|
|
||||||
/* Allocate table */
|
/* Allocate table */
|
||||||
data = zalloc ( len );
|
data = zalloc ( len );
|
||||||
if ( ! data ) {
|
if ( ! data ) {
|
||||||
|
@ -668,6 +674,7 @@ static int ibft_install ( int ( * install ) ( struct acpi_header *acpi ) ) {
|
||||||
err_initiator:
|
err_initiator:
|
||||||
free ( data );
|
free ( data );
|
||||||
err_alloc:
|
err_alloc:
|
||||||
|
no_targets:
|
||||||
free ( strings.data );
|
free ( strings.data );
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue