diff --git a/user_channel/channel_mgmt.cpp b/user_channel/channel_mgmt.cpp index 2d492e0..4920f6e 100644 --- a/user_channel/channel_mgmt.cpp +++ b/user_channel/channel_mgmt.cpp @@ -1106,6 +1106,15 @@ int ChannelConfig::readChannelPersistData() log("Error in opening IPMI Channel data file"); return -EIO; } + else if (!std::filesystem::file_size(channelNvDataFilename)) + { + log("NV file (channelNvDataFilename) has a size of zero"); + if (std::filesystem::remove(channelNvDataFilename)) + { + log("NV file (channelNvDataFilename) is deleted"); + } + return -EIO; + } try { // Fill in global structure