mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
Output the device path description for EFI network devices.
Lookup the DEVICE_PATH for each EFI network device handle and output the string description using printf with '%S'. To honor the pager, the newline at the end of each line is still output with pager_output(). Sponsored by: Cisco Systems
This commit is contained in:
parent
4e59799e1b
commit
79ad8397ea
1 changed files with 8 additions and 3 deletions
|
|
@ -325,15 +325,20 @@ efinet_dev_init()
|
|||
static void
|
||||
efinet_dev_print(int verbose)
|
||||
{
|
||||
char line[80];
|
||||
CHAR16 *text;
|
||||
EFI_HANDLE h;
|
||||
int unit;
|
||||
|
||||
pager_open();
|
||||
for (unit = 0, h = efi_find_handle(&efinet_dev, 0);
|
||||
h != NULL; h = efi_find_handle(&efinet_dev, ++unit)) {
|
||||
sprintf(line, " %s%d:\n", efinet_dev.dv_name, unit);
|
||||
if (pager_output(line))
|
||||
printf(" %s%d:", efinet_dev.dv_name, unit);
|
||||
text = efi_devpath_name(efi_lookup_devpath(h));
|
||||
if (text != NULL) {
|
||||
printf(" %S", text);
|
||||
efi_free_devpath_name(text);
|
||||
}
|
||||
if (pager_output("\n"))
|
||||
break;
|
||||
}
|
||||
pager_close();
|
||||
|
|
|
|||
Loading…
Reference in a new issue