Blob Blame History Raw
diff -Nurp athcool-0.3.11.orig/athcool.8 athcool-0.3.11/athcool.8
--- athcool-0.3.11.orig/athcool.8	2004-07-28 04:48:04.000000000 +0200
+++ athcool-0.3.11/athcool.8	2005-11-11 13:56:05.000000000 +0100
@@ -22,6 +22,9 @@ Query power-saving mode.
 .TP
 \fBlist\fR
 List supported chipsets.
+.TP
+\fBquiet\fR
+Suppress warnings.
 
 .SH WARNINGS
 athcool only sets/unsets the "Disconnect enable when STPGNT detected"
diff -Nurp athcool-0.3.11.orig/athcool.c athcool-0.3.11/athcool.c
--- athcool-0.3.11.orig/athcool.c	2005-02-10 06:58:12.000000000 +0100
+++ athcool-0.3.11/athcool.c	2005-11-11 13:52:00.000000000 +0100
@@ -112,6 +112,7 @@ static void usage( const char *package )
   printf( "\toff\t Disable power-saving mode\n" );
   printf( "\tstat\t Query power-saving mode\n" );
   printf( "\tlist\t List supported chipsets\n" );
+  printf( "\tquiet\t Suppress warnings\n" );
   printf( "\tfixup\t fixup some problems for specific hardwares (EXPERIMENTAL)\n" );
   printf( "\t\t (it may cause system locks or instability)\n\n" );
 
@@ -429,6 +430,7 @@ int main ( int argc, char *argv[] )
   int	mode = ATHLONPM_USAGE;
   int	force_id = -1;
   int   fixup = FALSE;
+  int   quiet = FALSE;
   int	result, c;
 
   /* read optarg */
@@ -443,6 +445,8 @@ int main ( int argc, char *argv[] )
       mode = ATHLONPM_STAT;
     } else if ( strcmp( argv[c], "list" ) == 0 ) {
       mode = ATHLONPM_LIST;
+    } else if ( strcmp( argv[c], "quiet" ) == 0 ) {
+      quiet = TRUE;
 #ifdef ENABLE_FORCEID
     } else if ( strcmp( argv[c], "force" ) == 0 ) {
       c++;
@@ -451,7 +455,8 @@ int main ( int argc, char *argv[] )
     }
   }
 
-  print_title();
+  if (!quiet)
+    print_title();
 
   switch (mode) {
   case ATHLONPM_USAGE:
@@ -464,7 +469,8 @@ int main ( int argc, char *argv[] )
 
   if (fixup) { mode |= ATHLONPM_FIXUP; }
 
-  print_warnings();
+  if (!quiet)
+    print_warnings();
 
   if ( iopl( 3 ) < 0 ) {
     printf( "%s : must run as root. exit\n", argv[0] );