diff options
author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2017-03-01 15:50:04 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2017-03-02 08:39:58 +0100 |
commit | e0ff988ad865f3370ddeb8e75eefd9ed27d6641b (patch) | |
tree | 59c2471a2a2023a1a2b11dfc76a7dc78b4859677 /drivers | |
parent | 019606ddc30b6795d83f863977c5ad0ef68ee296 (diff) | |
download | barebox-e0ff988ad865f3370ddeb8e75eefd9ed27d6641b.tar.gz barebox-e0ff988ad865f3370ddeb8e75eefd9ed27d6641b.tar.xz |
memcmp: fix comparison on short read
read() might return less than $count bytes which is only an upper limit.
The user is supposed to repeat the command to fill a buffer completely.
So use the convenience wrapper read_full in memcmp.
This fixes memcmp on /dev/nand0 on an Armada XP.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers')
0 files changed, 0 insertions, 0 deletions