From 0d62e6a7338d8f25727f56ca14236954fc8f2cef Mon Sep 17 00:00:00 2001 From: Alexander Schmidt Date: Tue, 10 Jul 2007 17:53:54 +0200 Subject: UBI-utils: add compare feature This is a new feature for pfiflash, called "--compare". It allows the user to simulate a pfiflash session without actually changing the flash content. If the flash content is equal to the data in the pfif file, pfiflash returns zero. A positive value is returned when the flash content differs from the pfi file, which indicates that an update is necessary. This feature is useful when a controller mounts an NFS share during boot and has to determine if a pfi file stored on this share contains a code update. Modified PDD values are also registered by the compare feature. Signed-off-by: Alexander Schmidt --- ubi-utils/src/pfiflash_error.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ubi-utils/src/pfiflash_error.h') diff --git a/ubi-utils/src/pfiflash_error.h b/ubi-utils/src/pfiflash_error.h index c06232a..0f27f4a 100644 --- a/ubi-utils/src/pfiflash_error.h +++ b/ubi-utils/src/pfiflash_error.h @@ -42,7 +42,9 @@ enum pfiflash_err { PFIFLASH_ERR_MTD_OPEN, PFIFLASH_ERR_MTD_CLOSE, PFIFLASH_ERR_CRC_CHECK, - PFIFLASH_ERR_MTD_ERASE + PFIFLASH_ERR_MTD_ERASE, + PFIFLASH_ERR_COMPARE, + PFIFLASH_CMP_DIFF }; const char *const PFIFLASH_ERRSTR[] = { @@ -65,7 +67,9 @@ const char *const PFIFLASH_ERRSTR[] = { "couldn't open MTD device %s", "couldn't close MTD device %s", "CRC check failed: given=0x%08x, calculated=0x%08x", - "couldn't erase raw mtd region" + "couldn't erase raw mtd region", + "couldn't compare volumes", + "on-flash data differ from pfi data, update is neccessary" }; #endif /* __PFIFLASH_ERROR_H__ */ -- cgit v1.2.3