Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F142735760
D34524.id103754.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
706 B
Referenced Files
None
Subscribers
None
D34524.id103754.diff
View Options
Index: who/who.c
===================================================================
--- who/who.c
+++ who/who.c
@@ -216,6 +216,8 @@
struct stat sb;
char ttybuf[MAXPATHLEN];
+ if (line == NULL)
+ return (0);
(void)snprintf(ttybuf, sizeof(ttybuf), "%s%s", _PATH_DEV, line);
if (stat(ttybuf, &sb) == 0) {
return (0);
@@ -229,10 +231,11 @@
struct utmpx *utx;
while ((utx = getutxent()) != NULL) {
- if (((aflag || !bflag) && utx->ut_type == USER_PROCESS) ||
- (bflag && utx->ut_type == BOOT_TIME))
+ if ((aflag || !bflag) && utx->ut_type == USER_PROCESS) {
if (ttystat(utx->ut_line) == 0)
row(utx);
+ } else if (bflag && utx->ut_type == BOOT_TIME)
+ row(utx);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 23, 9:42 PM (17 h, 54 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27889853
Default Alt Text
D34524.id103754.diff (706 B)
Attached To
Mode
D34524: usr.bin/who.c: Fix boot time checking
Attached
Detach File
Event Timeline
Log In to Comment