OSDN Git Service

init: create by-name device links for marked GPT partitions
authorAndrew Boie <andrew.p.boie@intel.com>
Fri, 16 Nov 2012 22:51:19 +0000 (14:51 -0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 16 Jun 2013 06:52:01 +0000 (14:52 +0800)
commit526635e22c24773d64220d6e318b4c4702498c86
tree2df4fb70fc57223d0778b0b0d0e26c77887f50f1
parentf938a7ebb6a7c66f227ed223cb4d7b590a8fff31
init: create by-name device links for marked GPT partitions

Create device node symlinks by name if the uevent for a block
device has a name in it, and the name passed in matches the
prefix for the installation ID. This prevents collisions with
multiple Android installations on the same system. The created
symlinks do not have the prefix in them.

If the installation ID isn't set (through ro.boot.install_id)
this mechanism doesn't do anything. There is a possibility that
specially crafted removable storage could alias internal storage
through this mechanism, so locked-down devices won't want to use
this.

Change-Id: I04782691d4e5ff0db6f68d8d9345a8585cfe5f86
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
init/devices.c