Fix for mounting the extended internal storage (/dev/mapper/extendedsd) 04/156204/1
authorHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 17 Oct 2017 11:09:08 +0000 (20:09 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 17 Oct 2017 11:44:43 +0000 (11:44 +0000)
Change-Id: Icac79f0f46d8f2baf76d0052aaac0a905e2d7985
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
(cherry picked from commit e56b76a6d8ffbcbadc8fc60c698fee413d548e4c)

src/block/block.c

index 36f3929..23e450d 100644 (file)
@@ -2191,8 +2191,6 @@ static int add_block_device(struct udev_device *dev, const char *devnode, bool m
                free_block_device(bdev);
                return -EPERM;
        } else if (!strncmp(bdev->data->fs_type, LUKS_NAME, strlen(LUKS_NAME))) {
-               bdev->data->block_type = BLOCK_EXTENDEDSD_DEV;
-               ret = change_mount_point(bdev, EXTENDED_SD_PATH);
                if (ret < 0) {
                        ret = -EPERM;
                        free_block_device(bdev);
@@ -2207,9 +2205,8 @@ static int add_block_device(struct udev_device *dev, const char *devnode, bool m
 
                ode_luks_set_event_cb(CALLBACK)
                */
-
                return 0;
-       } else if (!strncmp(bdev->data->fs_type, EXT4_NAME, strlen(EXT4_NAME))) {
+       } else if (mapper && !strncmp(bdev->data->fs_type, EXT4_NAME, strlen(EXT4_NAME))) {
                bdev->data->block_type = BLOCK_EXTENDEDSD_DEV;
                ret = change_mount_point(bdev, EXTENDED_SD_PATH);
                if (ret < 0) {