From 84a694d4c2877e2c07ca29c8e3ca3a029fedfbc9 Mon Sep 17 00:00:00 2001 From: joevt Date: Mon, 6 Feb 2023 06:51:41 -0800 Subject: [PATCH] nvram: Output nvram file name in error message. So that you don't see identical messages "Could not restore NVRAM content from the given file." Instead, one will mention nvram.bin and the other will mention pram.bin. --- devices/common/nvram.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/devices/common/nvram.cpp b/devices/common/nvram.cpp index 3910762..455ef0c 100644 --- a/devices/common/nvram.cpp +++ b/devices/common/nvram.cpp @@ -73,7 +73,8 @@ void NVram::init() { !f.read((char*)&data_size, sizeof(data_size)) || memcmp(sig, NVRAM_FILE_ID, sizeof(NVRAM_FILE_ID)) || data_size != this->ram_size || !f.read((char*)this->storage.get(), this->ram_size)) { - LOG_F(WARNING, "Could not restore NVRAM content from the given file."); + LOG_F(WARNING, "Could not restore NVRAM content from the given file \"%s\".", this->file_name.c_str()); + memset(this->storage.get(), 0, this->ram_size); } f.close();