Enable SD card format

When an SD card has no MBR it cannot be formatted
and then mounted by Android. This is because
the device node was incremented by one by mistake
when building the device path

Change-Id: I8533c6028151fe28246e74f89a294c1e58e79438
Signed-off-by: Bogdan George Stefan <bogdan.g.stefan@intel.com>
Merge "Enable SD card format"
Fix Vold to properly handle full-disk file systems

(full-disk: no partitions)

In Android, Vold recognizes a USB drive having a full-disk file system
and mounts it properly, but when the drive is removed from system Vold
won't unmount the device. This is because Vold only unmounts partitions.
For a FAT32 USB drive (with partitions), kernel will create two devices:
sda (disk device) and sda1 (partition device). When the drive is removed,
Vold will receive two netlink events: one for partition remove (sda1)
and one for disk remove (sda). The unmount occurs only when partition
remove event is received.
For a full-disk FS USB drive, kernel will only create one device: sda
(disk device). When the drive is removed, Vold will only receive one
netlink event for disk remove (sda) and it won't unmount the device.

This patch will verify if there is a currently mounted device when disk
remove event is received and will perform unmount, to properly unmount
the device.

Change-Id: I4866ab2482fddfb40a8fc73083f31df846bbb24f
Signed-off-by: Robert Chiras <robert.chiras@intel.com>
Merge "Fix Vold to properly handle full-disk file systems"