]> www.infradead.org Git - mtd-utils.git/commit
mtd-utils: nandtest: handle large nand devices
authorChristian Wendt he/him <cw@brainaid.de>
Wed, 23 Aug 2023 11:09:28 +0000 (13:09 +0200)
committerDavid Oberhollenzer <david.oberhollenzer@sigma-star.at>
Wed, 23 Aug 2023 11:09:28 +0000 (13:09 +0200)
commit4c98b0f7091a37dd79b45b6ee0af96971d454d27
tree8ba55a81ad5b7ca45c0b6c581f655245fb49d0bd
parent730148bc94411f13a0171204e872b0760fbde185
mtd-utils: nandtest: handle large nand devices

Running nandtest on devices with sizes of 4Gb or more does not work, as
the size returned in mtd_info_user is reported as 0 for 4Gb devices for
example.

The patch uses sysfs to figure out the size of the nand device (as
recommended in a comment in include/mtd/mtd-abi.h) and changes sizes
and offsets to 64 bit values.

[From: Christian Wendt <cw@brainaid.de>]
Reviewed-by: Zhihao Cheng <chengzhihao1@huawei.com>
Signed-off-by: David Oberhollenzer <david.oberhollenzer@sigma-star.at>
nand-utils/nandtest.c