From 380867c31cb666ce29ee263ff45f2b522b86e25e Mon Sep 17 00:00:00 2001 From: Isaac Dunham Date: Sat, 21 Sep 2013 20:30:52 -0700 Subject: [PATCH] Add -quiet option to dtlogin. This should shut up the console spamming, for those who use VT1. Default behavior is not changed. --- cde/doc/C/guides/man/man1_dt/login.sgm | 10 +++++++++- cde/programs/dtlogin/dm.c | 2 ++ cde/programs/dtlogin/dm.h | 1 + cde/programs/dtlogin/resource.c | 6 +++++- 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/cde/doc/C/guides/man/man1_dt/login.sgm b/cde/doc/C/guides/man/man1_dt/login.sgm index 3265240c..fe6b2572 100644 --- a/cde/doc/C/guides/man/man1_dt/login.sgm +++ b/cde/doc/C/guides/man/man1_dt/login.sgm @@ -13,7 +13,7 @@ service -dtlogin−configconfiguration_file−daemon−debugdebug_level−errorerror_log_file−nodaemon−resourcesresource_file +dtlogin−configconfiguration_file−daemon−debugdebug_level−errorerror_log_file−quiet−nodaemon−resourcesresource_file −serverserver_entry −udpPortport_number −sessionsession_program @@ -360,6 +360,14 @@ resource. +−quiet + + +Specifies True as the value for the quiet +resource. This prevents dtlogin from writing status messages to tty1. + + + −resources resource_file diff --git a/cde/programs/dtlogin/dm.c b/cde/programs/dtlogin/dm.c index 59b99cff..18f5bd53 100644 --- a/cde/programs/dtlogin/dm.c +++ b/cde/programs/dtlogin/dm.c @@ -1617,6 +1617,8 @@ GettyMessage( struct display *d, int msgnum ) FILE *tf; char buf[128]; + if (quiet) return; + strcpy(buf,"/dev/"); strcat(buf,d->gettyLine); diff --git a/cde/programs/dtlogin/dm.h b/cde/programs/dtlogin/dm.h index 032a21d3..0de79609 100644 --- a/cde/programs/dtlogin/dm.h +++ b/cde/programs/dtlogin/dm.h @@ -495,6 +495,7 @@ extern int debugLevel; extern char *errorLogFile; extern int errorLogSize; extern int daemonMode; +extern int quiet; extern char *pidFile; extern int lockPidFile; extern char *authDir; diff --git a/cde/programs/dtlogin/resource.c b/cde/programs/dtlogin/resource.c index 6820cf4d..2c4e62ff 100644 --- a/cde/programs/dtlogin/resource.c +++ b/cde/programs/dtlogin/resource.c @@ -72,6 +72,7 @@ int debugLevel; char *errorLogFile; int errorLogSize; int daemonMode; +int quiet; char *pidFile; int lockPidFile; char *authDir; @@ -254,6 +255,8 @@ struct dmResources { "50", "daemonMode", "DaemonMode", DM_BOOL, (char **) &daemonMode, "false", +"quiet", "quiet", DM_BOOL, (char **) &quiet, + "false", "pidFile", "PidFile", DM_STRING, &pidFile, "", "lockPidFile", "LockPidFile", DM_BOOL, (char **) &lockPidFile, @@ -499,7 +502,8 @@ XrmOptionDescRec optionTable [] = { {"-debug", "*debugLevel", XrmoptionSepArg, (caddr_t) NULL }, {"-xrm", NULL, XrmoptionResArg, (caddr_t) NULL }, {"-daemon", ".daemonMode", XrmoptionNoArg, "true" }, -{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" } +{"-nodaemon", ".daemonMode", XrmoptionNoArg, "false" }, +{"-quiet", ".quiet", XrmoptionNoArg, "true" } }; static int originalArgc; -- 2.25.1