ACK: [PATCH 3/4] lib: fwts_acpi_tables: only attempt to open a dumpfile if name is defined
ivanhu
ivan.hu at canonical.com
Fri May 8 03:47:05 UTC 2015
On 2015年04月23日 19:57, Colin King wrote:
> From: Colin Ian King <colin.king at canonical.com>
>
> fwts_acpi_load_tables_from_acpidump should only attempt to open an ACPI
> dumpfile if the fw->acpi_table_acpidump_file is actually defined
>
> Signed-off-by: Colin Ian King <colin.king at canonical.com>
> ---
> src/lib/src/fwts_acpi_tables.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/lib/src/fwts_acpi_tables.c b/src/lib/src/fwts_acpi_tables.c
> index 24a724e..81fb096 100644
> --- a/src/lib/src/fwts_acpi_tables.c
> +++ b/src/lib/src/fwts_acpi_tables.c
> @@ -618,6 +618,9 @@ static int fwts_acpi_load_tables_from_acpidump(fwts_framework *fw)
> {
> FILE *fp;
>
> + if (!fw->acpi_table_acpidump_file)
> + return FWTS_ERROR;
> +
> if ((fp = fopen(fw->acpi_table_acpidump_file, "r")) == NULL) {
> fwts_log_error(fw, "Cannot open '%s' to read ACPI tables.",
> fw->acpi_table_acpidump_file);
Acked-by: Ivan Hu<ivan.hu at canonical.com>
More information about the fwts-devel
mailing list