diff options
| author | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2001-06-07 13:53:23 +0000 |
|---|---|---|
| committer | Yaroslav Tykhiy <ytykhiy@gmail.com> | 2001-06-07 13:53:23 +0000 |
| commit | db563f3175083780fd6036ba923054faf130629a (patch) | |
| tree | 2f1a1801cbb6414b53d0de6e676c6c7cd924bb72 /libexec/getty | |
| parent | 334b4431faa2afff081de94ecef1ae341a6f9585 (diff) | |
Notes
Diffstat (limited to 'libexec/getty')
| -rw-r--r-- | libexec/getty/gettytab.5 | 9 | ||||
| -rw-r--r-- | libexec/getty/gettytab.h | 1 | ||||
| -rw-r--r-- | libexec/getty/init.c | 2 | ||||
| -rw-r--r-- | libexec/getty/main.c | 2 |
4 files changed, 9 insertions, 5 deletions
diff --git a/libexec/getty/gettytab.5 b/libexec/getty/gettytab.5 index e6e32e9d80ff..91209af4ac9a 100644 --- a/libexec/getty/gettytab.5 +++ b/libexec/getty/gettytab.5 @@ -93,6 +93,7 @@ after login prompt .It "ct num 10 chat timeout for ac/ic scripts" .It "dc num 0 chat debug bitmask" .It "de num 0 delay secs and flush input before writing first prompt" +.It "df str %+ the" Xr strftime 3 "format used for \&%d in the banner message" .It "ds str" Ta So Li ^Y Sc Ta .No "delayed suspend character" .It "dx bool false set" @@ -282,11 +283,11 @@ is running. .Pp .Bl -tag -offset indent -width \&%xxxxxxxxxxxxxx .It \&%d -The current date and time in the locale's representation as of the +The current date and time formatted according to the .Em \&Lo -string -(the \&%+ format of -.Xr strftime 3 ) . +and +.Em \&df +strings. .It \&%h The hostname of the machine, which is normally obtained from the system using diff --git a/libexec/getty/gettytab.h b/libexec/getty/gettytab.h index 9e46b0da53a6..b8b03655e29e 100644 --- a/libexec/getty/gettytab.h +++ b/libexec/getty/gettytab.h @@ -91,6 +91,7 @@ struct gettyflags { #define IC gettystrs[27].value #define AC gettystrs[28].value #define AL gettystrs[29].value +#define DF gettystrs[30].value /* * Numeric definitions. diff --git a/libexec/getty/init.c b/libexec/getty/init.c index d8c70e064e8d..dae64b274207 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -52,6 +52,7 @@ static const char rcsid[] = static char loginmsg[] = "login: "; static char nullstr[] = ""; static char loginprg[] = _PATH_LOGIN; +static char datefmt[] = "%+"; struct gettystrs gettystrs[] = { { "nx" }, /* next table */ @@ -84,6 +85,7 @@ struct gettystrs gettystrs[] = { { "ic" }, /* modem init-chat */ { "ac" }, /* modem answer-chat */ { "al" }, /* user to auto-login */ + { "df", datefmt}, /* format for strftime() */ { 0 } }; diff --git a/libexec/getty/main.c b/libexec/getty/main.c index d81256119ab7..0687f0990368 100644 --- a/libexec/getty/main.c +++ b/libexec/getty/main.c @@ -770,7 +770,7 @@ putf(cp) (void)time(&t); if (Lo) (void)setlocale(LC_TIME, Lo); - (void)strftime(db, sizeof(db), "%+", localtime(&t)); + (void)strftime(db, sizeof(db), DF, localtime(&t)); puts(db); break; |
