int ACPI_SYSTEM_XFACE main ( int argc, char *argv[]) { char *Name; UINT32 DecodeType; int j; AcpiOsInitialize (); ACPI_DEBUG_INITIALIZE (); /* For debug version only */ printf (ACPI_COMMON_SIGNON (AH_UTILITY_NAME)); DecodeType = AH_DECODE_DEFAULT; if (argc < 2) { AhDisplayUsage (); return (0); } /* Command line options */ while ((j = AcpiGetopt (argc, argv, AH_SUPPORTED_OPTIONS)) != ACPI_OPT_END) switch (j) { case 'a': DecodeType = AH_DECODE_ASL_AML; break; case 'e': DecodeType = AH_DECODE_EXCEPTION; break; case 'i': DecodeType = AH_DISPLAY_DEVICE_IDS; break; case 'k': DecodeType = AH_DECODE_ASL_KEYWORD; break; case 'm': DecodeType = AH_DECODE_AML; break; case 'o': DecodeType = AH_DECODE_AML_OPCODE; break; case 'p': DecodeType = AH_DECODE_PREDEFINED_NAME; break; case 's': DecodeType = AH_DECODE_ASL; break; case 'u': DecodeType = AH_DISPLAY_UUIDS; break; case 'v': /* -v: (Version): signon already emitted, just exit */ return (0); case 'h': default: AhDisplayUsage (); return (-1); } /* Missing (null) name means "display all" */ Name = argv[AcpiGbl_Optind]; switch (DecodeType) { case AH_DECODE_ASL_AML: AhFindAslAndAmlOperators (Name); break; case AH_DECODE_AML: AhFindAmlOpcode (Name); break; case AH_DECODE_AML_OPCODE: AhDecodeAmlOpcode (Name); break; case AH_DECODE_PREDEFINED_NAME: AhFindPredefinedNames (Name); break; case AH_DECODE_ASL: AhFindAslOperators (Name); break; case AH_DECODE_ASL_KEYWORD: AhFindAslKeywords (Name); break; case AH_DISPLAY_DEVICE_IDS: AhDisplayDeviceIds (Name); break; case AH_DECODE_EXCEPTION: AhDecodeException (Name); break; case AH_DISPLAY_UUIDS: AhDisplayUuids (); break; default: if (!Name) { AhFindAslOperators (Name); break; } if (*Name == '_') { AhFindPredefinedNames (Name); } else { AhFindAslAndAmlOperators (Name); } break; } return (0); }
int ACPI_SYSTEM_XFACE main ( int argc, char *argv[]) { char *Name; UINT32 DecodeType; int j; ACPI_DEBUG_INITIALIZE (); /* For debug version only */ printf (ACPI_COMMON_SIGNON ("ACPI Help Utility")); DecodeType = AH_DECODE_DEFAULT; if (argc < 2) { AhDisplayUsage (); return (0); } /* Command line options */ while ((j = AcpiGetopt (argc, argv, "ehikmops")) != EOF) switch (j) { case 'e': DecodeType = AH_DECODE_EXCEPTION; break; case 'i': DecodeType = AH_DISPLAY_DEVICE_IDS; break; case 'k': DecodeType = AH_DECODE_ASL_KEYWORD; break; case 'm': DecodeType = AH_DECODE_AML; break; case 'o': DecodeType = AH_DECODE_AML_OPCODE; break; case 'p': DecodeType = AH_DECODE_PREDEFINED_NAME; break; case 's': DecodeType = AH_DECODE_ASL; break; case 'h': default: AhDisplayUsage (); return (-1); } /* Missing (null) name means "display all" */ Name = argv[AcpiGbl_Optind]; switch (DecodeType) { case AH_DECODE_AML: AhFindAmlOpcode (Name); break; case AH_DECODE_AML_OPCODE: AhDecodeAmlOpcode (Name); break; case AH_DECODE_PREDEFINED_NAME: AhFindPredefinedNames (Name); break; case AH_DECODE_ASL: AhFindAslOperators (Name); break; case AH_DECODE_ASL_KEYWORD: AhFindAslKeywords (Name); break; case AH_DISPLAY_DEVICE_IDS: AhDisplayDeviceIds (); break; case AH_DECODE_EXCEPTION: AhDecodeException (Name); break; default: if (!Name) { AhFindAslOperators (Name); break; } if (*Name == '_') { AhFindPredefinedNames (Name); } else { AhFindAslOperators (Name); } break; } return (0); }