summaryrefslogtreecommitdiff
path: root/usr/src/cmd/rpcsvc/rstat_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/cmd/rpcsvc/rstat_proc.c')
-rw-r--r--usr/src/cmd/rpcsvc/rstat_proc.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/usr/src/cmd/rpcsvc/rstat_proc.c b/usr/src/cmd/rpcsvc/rstat_proc.c
index c2a93dd933..6e347cbf07 100644
--- a/usr/src/cmd/rpcsvc/rstat_proc.c
+++ b/usr/src/cmd/rpcsvc/rstat_proc.c
@@ -2,9 +2,8 @@
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
@@ -20,7 +19,7 @@
* CDDL HEADER END
*/
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -975,9 +974,15 @@ init_net(void)
/*
* We found a device of interest.
* Now, let's see if there's a kstat for it.
+ * First we try to query the "link" kstats in case
+ * the link is renamed. If that fails, fallback
+ * to legacy ktats for those non-GLDv3 links.
*/
- if ((ksp = kstat_lookup(kc, NULL, -1, namebuf)) == NULL)
+ if (((ksp = kstat_lookup(kc, "link", 0, namebuf))
+ == NULL) && ((ksp = kstat_lookup(kc, NULL, -1,
+ namebuf)) == NULL)) {
continue;
+ }
if (ksp->ks_type != KSTAT_TYPE_NAMED)
continue;
if (kstat_read(kc, ksp, NULL) == -1)