diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2021-05-01 15:34:22 +0200 |
---|---|---|
committer | Pali Rohár <pali.rohar@gmail.com> | 2021-05-01 15:34:22 +0200 |
commit | 67427daf172ffbec429830ee97410c53095086d5 (patch) | |
tree | e2c1465b2633627a556968722a74dca995e958c4 /src | |
parent | bf24ca23451a67b2c3c6a82bb245415b1b9aedb0 (diff) | |
download | 0xFFFF-67427daf172ffbec429830ee97410c53095086d5.tar.bz2 |
local: Fix calling nanddump
In last 15 years nanddump changed its command line arguments. Argument -b
(omit bad blocks) was completely removed and argument -o (omit oob data)
changed its meaning to "include" oob data. So for compatibility with all
nanddump versions, do not use argument -b and instead of -o use argument
--omitoob which is present in all nanddump versions and has same meaning
to omit oob data.
This change should fix dumping firmware files on devices with recent
versions of nanddump.
Diffstat (limited to 'src')
-rw-r--r-- | src/local.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/local.c b/src/local.c index 3813910..f9da146 100644 --- a/src/local.c +++ b/src/local.c @@ -227,13 +227,13 @@ static int local_nanddump(const char * file, int mtd, int offset, int length) { return 1; } - size = snprintf(NULL, 0, "nanddump -o -b -s %d -l %d -f %s /dev/mtd%dro", offset, length, file, mtd); + size = snprintf(NULL, 0, "nanddump --omitoob -s %d -l %d -f %s /dev/mtd%d", offset, length, file, mtd); command = malloc(size+1); if ( ! command ) return 1; - snprintf(command, size+1, "nanddump -o -b -s %d -l %d -f %s /dev/mtd%dro", offset, length, file, mtd); + snprintf(command, size+1, "nanddump --omitoob -s %d -l %d -f %s /dev/mtd%d", offset, length, file, mtd); ret = system(command); |