From owner-svn-src-all@freebsd.org Thu May 26 21:48:40 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 791CFB4C70B; Thu, 26 May 2016 21:48:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49C851D86; Thu, 26 May 2016 21:48:40 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4QLmdWb036119; Thu, 26 May 2016 21:48:39 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4QLmdoY036118; Thu, 26 May 2016 21:48:39 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201605262148.u4QLmdoY036118@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 26 May 2016 21:48:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300782 - head/sys/boot/efi/libefi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 May 2016 21:48:40 -0000 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();