mtd: fix erase handling with partition offset on write
authorFelix Fietkau <nbd@nbd.name>
Fri, 20 Apr 2018 08:02:28 +0000 (10:02 +0200)
committerFelix Fietkau <nbd@nbd.name>
Fri, 20 Apr 2018 08:03:38 +0000 (10:03 +0200)
commitd92ec071b211e0ee17496287f62652beb7db543d
tree13f72f2f0d89e53ce1097969727c6464523dfb5b
parentbc43f75defee6786b1d63131f576ef053eae87a6
mtd: fix erase handling with partition offset on write

When a partition offset is given, it is used in an lseek call, which
affects write, but not erase. Add it to the offset for erase calls as
well

Signed-off-by: Felix Fietkau <nbd@nbd.name>
package/system/mtd/src/mtd.c