OSDN Git Service
(root)
/
android-x86
/
bootable-newinstaller.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7fb3c26
)
init: skip to mount unknown type partitions
author
Chih-Wei Huang
<cwhuang@linux.org.tw>
Fri, 6 Oct 2017 10:04:20 +0000
(18:04 +0800)
committer
Chih-Wei Huang
<cwhuang@linux.org.tw>
Thu, 26 Oct 2017 06:54:14 +0000
(14:54 +0800)
Trying to mount an unknown type partition may cause kernel panic.
initrd/init
patch
|
blob
|
history
diff --git
a/initrd/init
b/initrd/init
index
6a30441
..
fdcea52
100755
(executable)
--- a/
initrd/init
+++ b/
initrd/init
@@
-3,7
+3,7
@@
# By Chih-Wei Huang <cwhuang@linux.org.tw>
# and Thorsten Glaser <tg@mirbsd.org>
#
-# Last updated 2017/
07/17
+# Last updated 2017/
10/06
#
# License: GNU Public License
# We explicitely grant the right to use the scripts
@@
-75,6
+75,7
@@
check_root()
blk=`basename $1`
[ ! -e /dev/block/$blk ] && ln $1 /dev/block
dev=/dev/block/$blk
+ blkid $dev | grep -q TYPE || return 1
else
dev=$1
fi