efinet_dev_print should honor verbose option.

lsdev should display detailed information about net devices only with -v
switch. This will make EFI and BIOS version of the loader to have the
same behavior.

Reviewed by:	bapt, imp
Approved by:	imp (mentor)
Differential Revision:	https://reviews.freebsd.org/D8415
This commit is contained in:
Toomas Soome 2016-11-02 06:37:35 +00:00
parent 2a5a7ca81d
commit e9915a079c

View File

@ -357,10 +357,12 @@ efinet_dev_print(int verbose)
for (unit = 0, h = efi_find_handle(&efinet_dev, 0);
h != NULL; h = efi_find_handle(&efinet_dev, ++unit)) {
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 (verbose) {
text = efi_devpath_name(efi_lookup_devpath(h));
if (text != NULL) {
printf(" %S", text);
efi_free_devpath_name(text);
}
}
if (pager_output("\n"))
break;