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

Show the host ip in fastboot #113

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Show the host ip in fastboot #113

wants to merge 1 commit into from

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 [email protected]

@@ -199,7 +231,11 @@ static EFI_STATUS fastboot_tcp_start(start_callback_t start_cb,
if (EFI_ERROR(ret))
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 <[email protected]>
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