Skip to content
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

Conversation

@ceiba1985
Copy link
Contributor

This is a W/A, we currently use the asset field of smbios'
type_chassis struct to pass the host ip to bootloader.

Tracked-On: OAM-96182
Signed-off-by: ji, zhenlong z zhenlong.z.ji@intel.com

return ret;

print_tcpip_information(&station_address);
ret = fastboot_get_host_ip(&station_address2);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check whether it is running on a KVM virtual by calling is_running_on_kvm().
for bare metal, read host ip from smbios is not necessary

* host ip to bootloader.*/
char *get_host_ip(void)
{
static char host_ip[ANDROID_PROP_VALUE_MAX];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why use static? what about define local variable char host_ip[ANDROID_PROP_VALUE_MAX] in fastboot_get_host_ip(), then call get_host_ip(char *host_ip) to get host ip.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be consistent with other functions implemented in vars.c, such as get_device_id, get_property_bootloader etc.

This is a W/A, we currently use the asset field of smbios'
type_chassis struct to pass the host ip to bootloader.

Tracked-On: OAM-96182
Signed-off-by: ji, zhenlong z <zhenlong.z.ji@intel.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants