mirror of
https://github.com/acpica/acpica/
synced 2025-01-13 12:59:18 +03:00
Implemented quiet mode to stop excess output.
This commit is contained in:
parent
4e5756416b
commit
05d312d1e6
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: acpisrc.h - Include file for AcpiSrc utility
|
||||
* $Revision: 1.42 $
|
||||
* $Revision: 1.43 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -205,6 +205,7 @@ extern char *Gbl_FileBuffer;
|
||||
extern UINT32 Gbl_FileSize;
|
||||
extern UINT32 Gbl_FileType;
|
||||
extern BOOLEAN Gbl_VerboseMode;
|
||||
extern BOOLEAN Gbl_QuietMode;
|
||||
extern BOOLEAN Gbl_BatchMode;
|
||||
extern BOOLEAN Gbl_MadeChanges;
|
||||
extern BOOLEAN Gbl_Overwrite;
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asconvrt - Source conversion code
|
||||
* $Revision: 1.63 $
|
||||
* $Revision: 1.64 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -170,6 +170,10 @@ AsPrint (
|
||||
char *Filename)
|
||||
{
|
||||
|
||||
if (Gbl_QuietMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
printf ("-- %4u %28.28s : %s\n", Count, Message, Filename);
|
||||
}
|
||||
@ -281,7 +285,11 @@ AsCheckForBraces (
|
||||
(NextIf && (NextBrace > NextIf)))
|
||||
{
|
||||
Gbl_MissingBraces++;
|
||||
printf ("Missing braces for <if>, line %d: %s\n", TotalLines, Filename);
|
||||
|
||||
if (!Gbl_QuietMode)
|
||||
{
|
||||
printf ("Missing braces for <if>, line %d: %s\n", TotalLines, Filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!(strncmp (" else if", SubBuffer, 8)))
|
||||
@ -296,7 +304,11 @@ AsCheckForBraces (
|
||||
(NextIf && (NextBrace > NextIf)))
|
||||
{
|
||||
Gbl_MissingBraces++;
|
||||
printf ("Missing braces for <if>, line %d: %s\n", TotalLines, Filename);
|
||||
|
||||
if (!Gbl_QuietMode)
|
||||
{
|
||||
printf ("Missing braces for <if>, line %d: %s\n", TotalLines, Filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (!(strncmp (" else", SubBuffer, 5)))
|
||||
@ -311,7 +323,11 @@ AsCheckForBraces (
|
||||
(NextIf && (NextBrace > NextIf)))
|
||||
{
|
||||
Gbl_MissingBraces++;
|
||||
printf ("Missing braces for <else>, line %d: %s\n", TotalLines, Filename);
|
||||
|
||||
if (!Gbl_QuietMode)
|
||||
{
|
||||
printf ("Missing braces for <else>, line %d: %s\n", TotalLines, Filename);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
/******************************************************************************
|
||||
*
|
||||
* Module Name: asmain - Main module for the acpi source processor utility
|
||||
* $Revision: 1.101 $
|
||||
* $Revision: 1.102 $
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
@ -138,6 +138,7 @@ char *Gbl_FileBuffer;
|
||||
UINT32 Gbl_FileSize;
|
||||
UINT32 Gbl_FileType;
|
||||
BOOLEAN Gbl_VerboseMode = FALSE;
|
||||
BOOLEAN Gbl_QuietMode = FALSE;
|
||||
BOOLEAN Gbl_BatchMode = FALSE;
|
||||
BOOLEAN Gbl_DebugStatementsMode = FALSE;
|
||||
BOOLEAN Gbl_MadeChanges = FALSE;
|
||||
@ -237,6 +238,11 @@ void
|
||||
AsDisplayStats (void)
|
||||
{
|
||||
|
||||
if (Gbl_QuietMode)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
printf ("\nAcpiSrc statistics:\n\n");
|
||||
printf ("%6d Files processed\n", Gbl_Files);
|
||||
printf ("%6d Tabs found\n", Gbl_Tabs);
|
||||
@ -312,7 +318,7 @@ main (
|
||||
|
||||
/* Command line options */
|
||||
|
||||
while ((j = AcpiGetopt (argc, argv, "lcsuvyd")) != EOF) switch(j)
|
||||
while ((j = AcpiGetopt (argc, argv, "cdlqsuvy")) != EOF) switch(j)
|
||||
{
|
||||
case 'l':
|
||||
/* Linux code generation */
|
||||
@ -360,6 +366,12 @@ main (
|
||||
Gbl_DebugStatementsMode = TRUE;
|
||||
break;
|
||||
|
||||
case 'q':
|
||||
/* Quiet mode */
|
||||
|
||||
Gbl_QuietMode = TRUE;
|
||||
break;
|
||||
|
||||
default:
|
||||
AsDisplayUsage ();
|
||||
return -1;
|
||||
|
Loading…
Reference in New Issue
Block a user