[PATCH] Allow rfddump and rfdformat to work on a test mtdram
Sean Young
sean at mess.org
Sat Nov 27 07:35:50 PST 2021
rfd can be used with mtdram since commit e03a81213a9c ("mtd: rfd_ftl: allow
use of MTD_RAM for testing purposes"), which is in kernel v5.15.
Signed-off-by: Sean Young <sean at mess.org>
---
nor-utils/rfddump.c | 2 +-
nor-utils/rfdformat.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/nor-utils/rfddump.c b/nor-utils/rfddump.c
index 01ab4c2..c85c067 100644
--- a/nor-utils/rfddump.c
+++ b/nor-utils/rfddump.c
@@ -200,7 +200,7 @@ int main(int argc, char *argv[])
return 1;
}
- if (mtd_info.type != MTD_NORFLASH) {
+ if (mtd_info.type != MTD_NORFLASH && mtd_info.type != MTD_RAM) {
fprintf(stderr, "%s: wrong type\n", rfd.mtd_filename);
close(fd);
return 2;
diff --git a/nor-utils/rfdformat.c b/nor-utils/rfdformat.c
index 0a3d9fb..160c081 100644
--- a/nor-utils/rfdformat.c
+++ b/nor-utils/rfdformat.c
@@ -108,7 +108,7 @@ int main(int argc, char *argv[])
return 1;
}
- if (mtd_info.type != MTD_NORFLASH) {
+ if (mtd_info.type != MTD_NORFLASH && mtd_info.type != MTD_RAM) {
fprintf(stderr, "%s: not NOR flash\n", mtd_filename);
close(fd);
return 2;
--
2.33.1
More information about the linux-mtd
mailing list