From a9ddc71cf44cc99898f13a788230a7f50977d628 Mon Sep 17 00:00:00 2001 From: setje Date: Fri, 4 May 2007 14:25:21 -0700 Subject: 6490981 netstrategy continues to report empty strings for dhcp'd interfaces even after a driver is added --- usr/src/uts/common/syscall/systeminfo.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'usr/src/uts/common/syscall/systeminfo.c') diff --git a/usr/src/uts/common/syscall/systeminfo.c b/usr/src/uts/common/syscall/systeminfo.c index 6d7d5ae40f..dd3dade3c5 100644 --- a/usr/src/uts/common/syscall/systeminfo.c +++ b/usr/src/uts/common/syscall/systeminfo.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -146,11 +146,21 @@ systeminfo(int command, char *buf, long count) tmp = ""; strcnt = 0; } else { + /* + * If the interface didn't have a name (bindable + * driver) to begin with, it might have one now. + * So, re-run strplumb_get_netdev_path() to see + * if one can be established at this time. + */ + if (netdev_path == NULL || netdev_path[0] == '\0') { + netdev_path = strplumb_get_netdev_path(); + } /* * If the interface name has not yet been resolved * (first IFNAMSIZ bytes of dhcack[]) and a valid * netdev_path[] was stashed by loadrootmodules in - * swapgeneric.c, resolve the interface name now. + * swapgeneric.c, or established above, resolve + * the interface name now. */ if (dhcack[0] == '\0' && netdev_path != NULL && netdev_path[0] != '\0') { -- cgit v1.2.3