From de527645fec564fdb04246a218da2b9f170c1822 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Nov 2014 23:17:55 +0100 Subject: mk-flash-layout: fix hard-coded mtd device number Commit 778b5d4 ("mk-flash-layout: correctly detect JFFS2 on NAND devices") left some debugging code consisting in hardcoding the device it to mtd4. --- scripts/mk-flash-layout | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/mk-flash-layout b/scripts/mk-flash-layout index 46d50b6..c49b040 100644 --- a/scripts/mk-flash-layout +++ b/scripts/mk-flash-layout @@ -197,7 +197,7 @@ get_image_type() { # anywhere on the OOB data, or truncated to magic only on the # last two bytes for small OOB blocks. if [ -z "$vol" -a "$REPLY" = "empty" ]; then - set -- $(nanddump --oob -p --bb=padbad -l 1 /dev/mtd4 2>/dev/null |grep OOB|cut -f2 -d:) + set -- $(nanddump --oob -p --bb=padbad -l 1 $dev 2>/dev/null |grep OOB|cut -f2 -d:) if [ -n "$*" ]; then set -- " $* " if [ -z "${1##* 85 19 03 20 *}" -o -z "${1##* 19 85 20 03 *}" -o -z "${1##* 19 85 }" -o -z "${1##* 85 19 } " ]; then -- 1.7.12.1