FreeBSD Bugzilla – Attachment 132705 Details for
Bug 177047
[patch] Adding date to wall(1) output message can be useful
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
file.diff
file.diff (text/plain), 1.20 KB, created by
Ivan Ivanyuk
on 2013-03-17 09:40:00 UTC
(
hide
)
Description:
file.diff
Filename:
MIME Type:
Creator:
Ivan Ivanyuk
Created:
2013-03-17 09:40:00 UTC
Size:
1.20 KB
patch
obsolete
>--- /usr/src/usr.bin/wall/wall.c 2012-03-03 08:15:13.000000000 +0200 >+++ /home/zxadmin/wall/wall.c 2013-03-17 11:00:40.000000000 +0200 >@@ -204,7 +204,7 @@ > time_t now; > FILE *fp; > int fd; >- char *p, hostname[MAXHOSTNAMELEN], lbuf[256], tmpname[64]; >+ char *p, hostname[MAXHOSTNAMELEN], lbuf[256], tmpname[64], datestr[20]; > const char *tty; > const char *whom; > gid_t egid; >@@ -224,6 +224,7 @@ > (void)gethostname(hostname, sizeof(hostname)); > (void)time(&now); > lt = localtime(&now); >+ (void)strftime(datestr, sizeof datestr, "%b %d %H:%M %Z", lt); > > /* > * all this stuff is to blank out a square for the message; >@@ -238,8 +239,7 @@ > whom, hostname); > (void)fprintf(fp, "%-79.79s\007\007\r\n", lbuf); > (void)snprintf(lbuf, sizeof(lbuf), >- " (%s) at %d:%02d %s...", tty, >- lt->tm_hour, lt->tm_min, lt->tm_zone); >+ " (%s) at %s...", tty, datestr); > (void)fprintf(fp, "%-79.79s\r\n", lbuf); > } > (void)fprintf(fp, "%79s\r\n", " ");
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 177047
: 132705 |
172788