Add -quiet option to dtlogin.
authorIsaac Dunham <ibid.ag@gmail.com>
Sun, 22 Sep 2013 03:30:52 +0000 (20:30 -0700)
committerJon Trulson <jon@radscan.com>
Wed, 25 Sep 2013 00:08:56 +0000 (18:08 -0600)
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
cde/programs/dtlogin/dm.c
cde/programs/dtlogin/dm.h
cde/programs/dtlogin/resource.c

index 3265240c5241b2cf3a95331aaf4960fb031a0fd7..fe6b2572bfc8bd30a114d72faeeddc8e0d4d166f 100644 (file)
@@ -13,7 +13,7 @@
 service </refpurpose></refnamediv>
 <refsynopsisdiv>
 <cmdsynopsis>
-<command>dtlogin</command><arg choice="opt">&minus;config<replaceable>configuration_file</replaceable></arg><arg choice="opt">&minus;daemon</arg><arg choice="opt">&minus;debug<replaceable>debug_level</replaceable></arg><arg choice="opt">&minus;error<replaceable>error_log_file</replaceable></arg><arg choice="opt">&minus;nodaemon</arg><arg choice="opt">&minus;resources<replaceable>resource_file</replaceable></arg>
+<command>dtlogin</command><arg choice="opt">&minus;config<replaceable>configuration_file</replaceable></arg><arg choice="opt">&minus;daemon</arg><arg choice="opt">&minus;debug<replaceable>debug_level</replaceable></arg><arg choice="opt">&minus;error<replaceable>error_log_file</replaceable></arg><arg choice="opt">&minus;quiet</arg><arg choice="opt">&minus;nodaemon</arg><arg choice="opt">&minus;resources<replaceable>resource_file</replaceable></arg>
 <arg choice="opt">&minus;server<replaceable>server_entry</replaceable></arg>
 <arg choice="opt">&minus;udpPort<replaceable>port_number</replaceable></arg>
 <arg choice="opt">&minus;session<replaceable>session_program</replaceable></arg>
@@ -360,6 +360,14 @@ resource.
 </para>
 </listitem>
 </varlistentry>
+<varlistentry><term>&minus;quiet</term>
+<listitem>
+<!-- ex-TP-->
+<para>Specifies True as the value for the <literal>quiet</literal>
+resource. This prevents dtlogin from writing status messages to tty1.
+</para>
+</listitem>
+</varlistentry>
 <varlistentry><term>&minus;resources resource_file</term>
 <listitem>
 <!-- ex-TP-->
index 59b99cff5251ba1157c899ea06be298482aa6974..18f5bd531386009b3c4f58f08bc9f74b118d2e50 100644 (file)
@@ -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);
     
index 032a21d3d96d555f08a93fd29bad74e49df445d1..0de79609a0ec60198ddc0ce6b173ec66988f7da2 100644 (file)
@@ -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;
index 6820cf4d061033e8f40ec277d0c78555e0e2996b..2c4e62ffa023e88f3e81b0094fd20095d4731078 100644 (file)
@@ -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;