Remove redundant err message regarding failed read
Get rid of the extra error message it prints if it cannot find the
desired variable in hnvram. It is especially confusing in the case where
the user wants to write an hnvram variable for the first time. The
output contains the word error even though the write operation was
successful. Per design, the hnvram command tries to read a given
variable first before it tries to write to it.
GSAFSJ1341E0111# hnvram -r EXTRA_KERNEL_OPT
[HMX_NVRAM_GetField] field(17)-EXTRA_KERNEL_OPT error(00000002) :
HMX_NVRAM_Read
Unable to read EXTRA_KERNEL_OPT
GSAFSJ1341E0111#
GSAFSJ1341E0111# hnvram -w EXTRA_KERNEL_OPT=foo
[HMX_NVRAM_GetField] field(17)-EXTRA_KERNEL_OPT error(00000002) :
HMX_NVRAM_Read
GSAFSJ1341E0111#
Change-Id: I1ae14758d2eeaac1f5c71cdd873e2189b52f3fb2
diff --git a/libupgrade/hmx_upgrade_nvram.c b/libupgrade/hmx_upgrade_nvram.c
index c50ac75..caa4233 100644
--- a/libupgrade/hmx_upgrade_nvram.c
+++ b/libupgrade/hmx_upgrade_nvram.c
@@ -814,8 +814,6 @@
if (defaultSize == 0) {
errCode = HMX_NVRAM_Read(partition, szFileName, offset, data, nDataSize, pDataSize);
if (errCode != DRV_OK) {
- DEBUG_ERR("[HMX_NVRAM_GetField] field(%d)-%s error(%08X) : "
- "HMX_NVRAM_Read\n", field, szFileName, errCode);
return errCode;
}
if (field == NVRAM_FIELD_SYSTEM_ID && errCode == 0) {