If there is no "netinfo" packet, extract_netinfo_args() will fail and cause
parse_device_path() to abort. This basically meant that yaboot will fail to
load any kernel/initrd under those circumstances.
This fix changes extract_netinfo_args() to be a void function.
Signed-off-by: Tony Breeds <tonyb@au1.ibm.com>
/*
* Check netinfo for ipv4 parameters and add them to the fspec iff the
* fspec has no existing value.
/*
* Check netinfo for ipv4 parameters and add them to the fspec iff the
* fspec has no existing value.
- *
- * Returns 1 on success, 0 on failure.
extract_netinfo_args(struct boot_fspec_t *result)
{
struct bootp_packet *packet;
extract_netinfo_args(struct boot_fspec_t *result)
{
struct bootp_packet *packet;
/* Check to see if we can get the [scyg]iaddr fields from netinfo */
packet = prom_get_netinfo();
if (!packet)
/* Check to see if we can get the [scyg]iaddr fields from netinfo */
packet = prom_get_netinfo();
if (!packet)
DEBUG_F("We have a boot packet\n");
DEBUG_F(" siaddr = <%x>\n", packet->siaddr);
DEBUG_F("We have a boot packet\n");
DEBUG_F(" siaddr = <%x>\n", packet->siaddr);
result->giaddr = ipv4_to_str(packet->siaddr);
DEBUG_F("Forcing giaddr to siaddr <%s>\n", result->giaddr);
}
result->giaddr = ipv4_to_str(packet->siaddr);
DEBUG_F("Forcing giaddr to siaddr <%s>\n", result->giaddr);
}
ret = extract_ipv6_args(imagepath, result);
else
ret = extract_ipv4_args(imagepath, result);
ret = extract_ipv6_args(imagepath, result);
else
ret = extract_ipv4_args(imagepath, result);
- ret |= extract_netinfo_args(result);
+ extract_netinfo_args(result);
DEBUG_F("ipv6 = <%d>\n", result->is_ipv6);
DEBUG_F("siaddr = <%s>\n", result->siaddr);
DEBUG_F("ipv6 = <%d>\n", result->is_ipv6);
DEBUG_F("siaddr = <%s>\n", result->siaddr);