diff options
Diffstat (limited to 'source/tools')
| -rw-r--r-- | source/tools/acpibin/abcompare.c | 9 | ||||
| -rw-r--r-- | source/tools/acpibin/abmain.c | 17 | ||||
| -rw-r--r-- | source/tools/acpibin/acpibin.h | 2 | ||||
| -rw-r--r-- | source/tools/acpinames/anstubs.c | 3 | ||||
| -rw-r--r-- | source/tools/acpixtract/acpixtract.c | 6 | ||||
| -rw-r--r-- | source/tools/acpixtract/axutils.c | 6 | 
6 files changed, 32 insertions, 11 deletions
diff --git a/source/tools/acpibin/abcompare.c b/source/tools/acpibin/abcompare.c index e21e29d852f4d..3d99c602ba49b 100644 --- a/source/tools/acpibin/abcompare.c +++ b/source/tools/acpibin/abcompare.c @@ -414,6 +414,7 @@ AbCompareAmlFiles (      {          /* Display header information */ +        printf ("Comparing %s to %s\n", File1Path, File2Path);          AbPrintHeadersInfo (&Header1, &Header2);      } @@ -425,6 +426,12 @@ AbCompareAmlFiles (      /* Do the byte-by-byte compare */ +    printf ("Compare offset: %u\n", AbGbl_CompareOffset); +    if (AbGbl_CompareOffset) +    { +        fseek (File2, AbGbl_CompareOffset, SEEK_CUR); +    } +      Actual1 = fread (&Char1, 1, 1, File1);      Actual2 = fread (&Char2, 1, 1, File2);      Offset = sizeof (ACPI_TABLE_HEADER); @@ -436,7 +443,7 @@ AbCompareAmlFiles (              printf ("Error - Byte mismatch at offset %8.4X: 0x%2.2X 0x%2.2X\n",                  Offset, Char1, Char2);              Mismatches++; -            if (Mismatches > 100) +            if ((Mismatches > 100) && (!AbGbl_DisplayAllMiscompares))              {                  printf ("100 Mismatches: Too many mismatches\n");                  goto Exit2; diff --git a/source/tools/acpibin/abmain.c b/source/tools/acpibin/abmain.c index 5334bc002a3ae..ccc355c56c56c 100644 --- a/source/tools/acpibin/abmain.c +++ b/source/tools/acpibin/abmain.c @@ -52,7 +52,7 @@ AbDisplayUsage (  #define AB_UTILITY_NAME             "ACPI Binary Table Dump Utility" -#define AB_SUPPORTED_OPTIONS        "c:d:h:s:tv" +#define AB_SUPPORTED_OPTIONS        "a:c:d:h:o:s:tv"  /****************************************************************************** @@ -75,9 +75,11 @@ AbDisplayUsage (      ACPI_USAGE_HEADER ("acpibin [options]"); -    ACPI_OPTION ("-c <File1> <File2>",      "Compare two binary AML files"); +    ACPI_OPTION ("-a <File1> <File2>",      "Compare two binary AML files, dump all mismatches"); +    ACPI_OPTION ("-c <File1> <File2>",      "Compare two binary AML files, dump first 100 mismatches");      ACPI_OPTION ("-d <In> <Out>",           "Dump AML binary to text file");      ACPI_OPTION ("-e <Sig> <In> <Out>",     "Extract binary AML table from acpidump file"); +    ACPI_OPTION ("-o <Value>",              "Start comparison at this offset into second file");      ACPI_OPTION ("-h <File>",               "Display table header for binary AML file");      ACPI_OPTION ("-s <File>",               "Update checksum for binary AML file");      ACPI_OPTION ("-t",                      "Terse mode"); @@ -120,6 +122,12 @@ main (      while ((j = AcpiGetopt (argc, argv, AB_SUPPORTED_OPTIONS)) != ACPI_OPT_END) switch(j)      { +    case 'a':   /* Compare Files, display all differences */ + +        AbGbl_DisplayAllMiscompares = TRUE; + +        /* Fallthrough */ +      case 'c':   /* Compare Files */          if (argc < 4) @@ -153,6 +161,11 @@ main (          AbDisplayHeader (AcpiGbl_Optarg);          return (0); +    case 'o': + +        AbGbl_CompareOffset = atoi (AcpiGbl_Optarg); +        continue; +      case 's':   /* Compute/update checksum */          if (argc < 3) diff --git a/source/tools/acpibin/acpibin.h b/source/tools/acpibin/acpibin.h index 679f1a5538bc0..dd5940f8c1fd3 100644 --- a/source/tools/acpibin/acpibin.h +++ b/source/tools/acpibin/acpibin.h @@ -63,6 +63,8 @@  /* Globals */  EXTERN BOOLEAN              INIT_GLOBAL (Gbl_TerseMode, FALSE); +EXTERN BOOLEAN              INIT_GLOBAL (AbGbl_DisplayAllMiscompares, FALSE); +EXTERN UINT32               INIT_GLOBAL (AbGbl_CompareOffset, 0);  /* Prototypes */ diff --git a/source/tools/acpinames/anstubs.c b/source/tools/acpinames/anstubs.c index 78984ce011576..ab4df3cc77f38 100644 --- a/source/tools/acpinames/anstubs.c +++ b/source/tools/acpinames/anstubs.c @@ -112,8 +112,7 @@ AcpiEvInitializeOpRegions (  ACPI_STATUS  AcpiEvInitializeRegion ( -    ACPI_OPERAND_OBJECT     *RegionObj, -    BOOLEAN                 AcpiNsLocked) +    ACPI_OPERAND_OBJECT     *RegionObj)  {      return (AE_OK);  } diff --git a/source/tools/acpixtract/acpixtract.c b/source/tools/acpixtract/acpixtract.c index 1573ceeff065f..01c748cdb7b5d 100644 --- a/source/tools/acpixtract/acpixtract.c +++ b/source/tools/acpixtract/acpixtract.c @@ -87,7 +87,7 @@ AxExtractTables (      /* Open input in text mode, output is in binary mode */ -    InputFile = fopen (InputPathname, "rt"); +    InputFile = fopen (InputPathname, "r");      if (!InputFile)      {          printf ("Could not open input file %s\n", InputPathname); @@ -286,7 +286,7 @@ AxExtractToMultiAmlFile (      /* Open the input file in text mode */ -    InputFile = fopen (InputPathname, "rt"); +    InputFile = fopen (InputPathname, "r");      if (!InputFile)      {          printf ("Could not open input file %s\n", InputPathname); @@ -417,7 +417,7 @@ AxListTables (      /* Open input in text mode, output is in binary mode */ -    InputFile = fopen (InputPathname, "rt"); +    InputFile = fopen (InputPathname, "r");      if (!InputFile)      {          printf ("Could not open input file %s\n", InputPathname); diff --git a/source/tools/acpixtract/axutils.c b/source/tools/acpixtract/axutils.c index 6af8cdc29a3c9..68e51daa2dda2 100644 --- a/source/tools/acpixtract/axutils.c +++ b/source/tools/acpixtract/axutils.c @@ -100,9 +100,9 @@ AxIsEmptyLine (          Buffer++;      } -    /* If end-of-line, this line is empty */ +    /* Line is empty when a Unix or DOS-style line terminator is found. */ -    if (*Buffer == '\n') +    if ((*Buffer == '\r') || (*Buffer == '\n'))      {          return (1);      } @@ -262,7 +262,7 @@ AxCountTableInstances (      unsigned int            Instances = 0; -    InputFile = fopen (InputPathname, "rt"); +    InputFile = fopen (InputPathname, "r");      if (!InputFile)      {          printf ("Could not open input file %s\n", InputPathname);  | 
