Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160494807
D34524.id103733.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
697 B
Referenced Files
None
Subscribers
None
D34524.id103733.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);
+ if (bflag && utx->ut_type == BOOT_TIME)
+ row(utx);
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 26, 2:36 AM (9 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34337649
Default Alt Text
D34524.id103733.diff (697 B)
Attached To
Mode
D34524: usr.bin/who.c: Fix boot time checking
Attached
Detach File
Event Timeline
Log In to Comment