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.
This commit is contained in:
joevt 2023-02-06 06:51:41 -08:00 committed by dingusdev
parent ebac8b92ba
commit 84a694d4c2

View File

@ -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();