diff options
author | jhb <jhb@FreeBSD.org> | 2016-05-26 21:48:39 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-05-26 21:48:39 +0000 |
commit | ce3ee3e041dc9262dc470b5a194ddf02578fa906 (patch) | |
tree | 602a7ef62336a2b557630f921d5d212d65c84c3a /sys/boot/efi | |
parent | 4c4391fff9f948ab892c9e98e562e5efce65d264 (diff) | |
download | FreeBSD-src-ce3ee3e041dc9262dc470b5a194ddf02578fa906.zip FreeBSD-src-ce3ee3e041dc9262dc470b5a194ddf02578fa906.tar.gz |
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
Diffstat (limited to 'sys/boot/efi')
-rw-r--r-- | sys/boot/efi/libefi/efinet.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/boot/efi/libefi/efinet.c b/sys/boot/efi/libefi/efinet.c index 4d367b5..6f3f5a0 100644 --- a/sys/boot/efi/libefi/efinet.c +++ b/sys/boot/efi/libefi/efinet.c @@ -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(); |