mtd: fix md5sum error checking
authorJohn Crispin <john@openwrt.org>
Thu, 5 Mar 2015 20:25:02 +0000 (20:25 +0000)
committerJohn Crispin <john@openwrt.org>
Thu, 5 Mar 2015 20:25:02 +0000 (20:25 +0000)
commit6cea48afe6b2a6578c9aa20ee45a642cd86d1c66
tree42f329a2e1aae454b5bbcaac2a19954550417343
parentd5f237d9438bf5f609de18f855536e9ca2357ce4
mtd: fix md5sum error checking

In mtd_verify(), the return value of md5sum() has been
interpreted as error if nonzero, while the function
returns number of processed bytes, which caused
mtd_verify() to always fail.

This patch fixes error checking to interpret only
negative values as errors.

Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
SVN-Revision: 44605
package/system/mtd/src/mtd.c