summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/initpkg/init.d/devlinks22
-rw-r--r--usr/src/cmd/svc/milestone/devices-local15
-rw-r--r--usr/src/cmd/syseventd/svc-syseventd12
-rw-r--r--usr/src/cmd/who/who.c22
4 files changed, 28 insertions, 43 deletions
diff --git a/usr/src/cmd/initpkg/init.d/devlinks b/usr/src/cmd/initpkg/init.d/devlinks
index 6794b2f6d3..00d2f9e775 100644
--- a/usr/src/cmd/initpkg/init.d/devlinks
+++ b/usr/src/cmd/initpkg/init.d/devlinks
@@ -3,9 +3,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.
@@ -24,9 +23,8 @@
# Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T.
# All rights reserved.
#
-#
-# Copyright (c) 1991-93, 1997 by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
#
#ident "%Z%%M% %I% %E% SMI"
@@ -44,15 +42,3 @@ if [ -n "$_INIT_RECONFIG" ]; then
/usr/ucb/ucblinks >/dev/null 2>&1
fi
fi
-
-# Establish the default framebuffer name.
-
-fbdev=`/usr/sbin/prtconf -F 2>/dev/null`
-
-if [ $? -eq 0 ]; then
- set -- /devices$fbdev*
- if [ -c $1 ]; then
- rm -f /dev/fb
- ln -s $1 /dev/fb
- fi
-fi
diff --git a/usr/src/cmd/svc/milestone/devices-local b/usr/src/cmd/svc/milestone/devices-local
index 767b8fa81f..c98adc149f 100644
--- a/usr/src/cmd/svc/milestone/devices-local
+++ b/usr/src/cmd/svc/milestone/devices-local
@@ -66,9 +66,18 @@ fbdev=`/usr/sbin/prtconf -F 2>/dev/null`
if [ $? -eq 0 ]; then
set -- /devices$fbdev*
if [ -c $1 ]; then
- rm -f /dev/fb
- ln -s $1 /dev/fb
- fi
+ if [ -h /dev/fb ]; then
+ fblink=`ls -l /dev/fb | /usr/bin/awk '{ print $11 }'`
+
+ if [ "$1" != "$fblink" ]; then
+ rm -f /dev/fb
+ ln -s $1 /dev/fb
+ fi
+ else
+ rm -f /dev/fb
+ ln -s $1 /dev/fb
+ fi
+ fi
fi
# Create any zvol devices
diff --git a/usr/src/cmd/syseventd/svc-syseventd b/usr/src/cmd/syseventd/svc-syseventd
index db33bf2666..a896b0731b 100644
--- a/usr/src/cmd/syseventd/svc-syseventd
+++ b/usr/src/cmd/syseventd/svc-syseventd
@@ -32,18 +32,6 @@ case "$1" in
if /usr/lib/sysevent/syseventd >/dev/msglog 2>&1; then :; else
exit
fi
-
- # Establish the default framebuffer name.
-
- fbdev=`/usr/sbin/prtconf -F 2>/dev/null`
-
- if [ $? -eq 0 ]; then
- set -- /devices$fbdev*
- if [ -c $1 ]; then
- rm -f /dev/fb
- ln -s $1 /dev/fb
- fi
- fi
;;
#
diff --git a/usr/src/cmd/who/who.c b/usr/src/cmd/who/who.c
index 07533927be..bb125b27cb 100644
--- a/usr/src/cmd/who/who.c
+++ b/usr/src/cmd/who/who.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.
@@ -24,7 +23,7 @@
/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
@@ -569,16 +568,19 @@ dump()
(void) printf("%-*s %c %-12s %s", NMAX, user, w, device, time_buf);
if (!terse) {
- (void) strcpy(path, "/dev/");
- (void) strncpy(path + 5, utmpp->ut_line,
- sizeof (utmpp->ut_line));
- path[5 + sizeof (utmpp->ut_line)] = '\0';
-
/*
* Stat device for idle time
* (Don't complain if you can't)
*/
- if ((rc = stat(path, stbufp)) != -1) {
+ rc = -1;
+ if (utmpp->ut_type == USER_PROCESS) {
+ (void) strcpy(path, "/dev/");
+ (void) strncpy(path + 5, utmpp->ut_line,
+ sizeof (utmpp->ut_line));
+ path[5 + sizeof (utmpp->ut_line)] = '\0';
+ rc = stat(path, stbufp);
+ }
+ if (rc != -1) {
idle = timnow - stbufp->st_mtime;
hr = idle/3600;
min = (unsigned)(idle/60)%60;