diff options
Diffstat (limited to 'source/common')
| -rw-r--r-- | source/common/adfile.c | 56 | ||||
| -rw-r--r-- | source/common/dmtbinfo2.c | 2 |
2 files changed, 57 insertions, 1 deletions
diff --git a/source/common/adfile.c b/source/common/adfile.c index d05fe40a29cb..5e6dd893dfde 100644 --- a/source/common/adfile.c +++ b/source/common/adfile.c @@ -454,3 +454,59 @@ FlSplitInputPathname ( return (AE_OK); } + + +/******************************************************************************* + * + * FUNCTION: FlGetFileBasename + * + * PARAMETERS: FilePathname - File path to be split + * + * RETURN: The extracted base name of the file, in upper case + * + * DESCRIPTION: Extract the file base name (the file name with no extension) + * from the input pathname. + * + * Note: Any backslashes in the pathname should be previously + * converted to forward slashes before calling this function. + * + ******************************************************************************/ + +char * +FlGetFileBasename ( + char *FilePathname) +{ + char *FileBasename; + char *Substring; + + + /* Backup to last slash or colon */ + + Substring = strrchr (FilePathname, '/'); + if (!Substring) + { + Substring = strrchr (FilePathname, ':'); + } + + /* Extract the full filename (base + extension) */ + + if (Substring) + { + FileBasename = FlStrdup (Substring + 1); + } + else + { + FileBasename = FlStrdup (FilePathname); + } + + /* Remove the filename extension if present */ + + Substring = strchr (FileBasename, '.'); + if (Substring) + { + *Substring = 0; + } + + AcpiUtStrupr (FileBasename); + return (FileBasename); +} diff --git a/source/common/dmtbinfo2.c b/source/common/dmtbinfo2.c index a925ac1f83d5..1efd3fd92a67 100644 --- a/source/common/dmtbinfo2.c +++ b/source/common/dmtbinfo2.c @@ -1063,7 +1063,7 @@ ACPI_DMTABLE_INFO AcpiDmTableInfoNfit7[] = {ACPI_DMT_UINT24, ACPI_NFIT7_OFFSET (Reserved[0]), "Reserved", 0}, {ACPI_DMT_UINT32, ACPI_NFIT7_OFFSET (Capabilities), "Capabilities (decoded below)", DT_FLAG}, {ACPI_DMT_FLAG0, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Cache Flush to NVDIMM", 0}, - {ACPI_DMT_FLAG1, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Flush to MVDIMM", 0}, + {ACPI_DMT_FLAG1, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Flush to NVDIMM", 0}, {ACPI_DMT_FLAG2, ACPI_NFIT7_FLAG_OFFSET (Capabilities,0), "Memory Mirroring", 0}, {ACPI_DMT_UINT32, ACPI_NFIT7_OFFSET (Reserved2), "Reserved", 0}, ACPI_DMT_TERMINATOR |
