Date: Thu, 26 May 2016 21:48:39 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300782 - head/sys/boot/efi/libefi Message-ID: <201605262148.u4QLmdoY036118@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Thu May 26 21:48:39 2016 New Revision: 300782 URL: https://svnweb.freebsd.org/changeset/base/300782 Log: 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 Modified: head/sys/boot/efi/libefi/efinet.c Modified: head/sys/boot/efi/libefi/efinet.c ============================================================================== --- head/sys/boot/efi/libefi/efinet.c Thu May 26 21:44:52 2016 (r300781) +++ head/sys/boot/efi/libefi/efinet.c Thu May 26 21:48:39 2016 (r300782) @@ -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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605262148.u4QLmdoY036118>