diff options
author | Alexander Schmidt <alexs@linux.vnet.ibm.com> | 2007-07-10 17:53:54 +0200 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2007-07-10 21:00:43 +0300 |
commit | 0d62e6a7338d8f25727f56ca14236954fc8f2cef (patch) | |
tree | 767442d91fe044f6671cf618b3f08165f171fef0 /ubi-utils/src/pfiflash.h | |
parent | 8496f75b4897056a1423e30a41649dbc11b421d4 (diff) |
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 <alexs@linux.vnet.ibm.com>
Diffstat (limited to 'ubi-utils/src/pfiflash.h')
-rw-r--r-- | ubi-utils/src/pfiflash.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ubi-utils/src/pfiflash.h b/ubi-utils/src/pfiflash.h index a063e7f..039705d 100644 --- a/ubi-utils/src/pfiflash.h +++ b/ubi-utils/src/pfiflash.h @@ -48,12 +48,13 @@ typedef enum pdd_handling_t * @brief Flashes a PFI file to UBI Device 0. * @param complete [0|1] Do a complete system update. * @param seqnum Index in a redundant group. + * @param compare [0|1] Compare contents. * @param pdd_handling The PDD handling algorithm. * @param rawdev Device to use for raw flashing * @param err_buf An error buffer. * @param err_buf_size Size of the error buffer. */ -int pfiflash_with_raw(FILE* pfi, int complete, int seqnum, +int pfiflash_with_options(FILE* pfi, int complete, int seqnum, int compare, pdd_handling_t pdd_handling, const char* rawdev, char *err_buf, size_t err_buf_size); |