From: nico Date: Thu, 27 May 2010 14:19:44 +0000 (+0000) Subject: [backfire] merge r21511 - fix a preinit hang in jffs2_ready() when no rootfs_data... X-Git-Url: http://git.ozo.com/?p=openwrt-10.03%2F.git;a=commitdiff_plain;h=4296e8d4454c3f29724491a8b3b52101b92d9d73 [backfire] merge r21511 - fix a preinit hang in jffs2_ready() when no rootfs_data partition is found (closes: #7362) git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@21582 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/base-files/files/lib/functions/boot.sh b/package/base-files/files/lib/functions/boot.sh index e6f6633ad..f93eec99a 100644 --- a/package/base-files/files/lib/functions/boot.sh +++ b/package/base-files/files/lib/functions/boot.sh @@ -32,6 +32,7 @@ find_mtd_part() { jffs2_ready () { mtdpart="$(find_mtd_part rootfs_data)" + [ -z "$mtdpart" ] && return 1 magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"') [ "$magic" != "deadc0de" ] }