commands: mem: truncate mem device size to fit the loff_t file size
On 64bit arches the file covering the whole address space is larger than
what can be represented in the loff_t type (s64) used for the file size.
Thus the size of this device is interpreted as negative in a lot of
places. Fix this by truncating the size to fit the file size type.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
1 parent b8cfa99 commit 20c12d090a1de80a3c58a232b4074067dcbb61a4
@Lucas Stach Lucas Stach authored on 6 Nov 2018
Sascha Hauer committed on 7 Nov 2018
Showing 1 changed file
View
commands/mem.c