From: pr.jung Date: Tue, 26 Sep 2017 01:08:02 +0000 (+0900) Subject: block: Do not mount unformatted storage at booting time X-Git-Tag: accepted/tizen/unified/20170928.072235~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=106f32f2838a006ea8ae02bb64ef276b72feecf6;p=platform%2Fcore%2Fsystem%2Fstoraged.git block: Do not mount unformatted storage at booting time Change-Id: I3c7608c4e76cc0fe4fcb0b21cfcc039e02aee34b Signed-off-by: pr.jung (cherry picked from commit 623c073f0783b615750a6d33f0b7ae2e4851e568) --- diff --git a/src/block/block.c b/src/block/block.c index 346812a..7bce7e1 100644 --- a/src/block/block.c +++ b/src/block/block.c @@ -2165,6 +2165,12 @@ static int add_block_device(struct udev_device *dev, const char *devnode, bool i _E("Failed to launch popup"); return 0; } else { // at booting time + if (!bdev->data->fs_type) { + _E("Unformatted Storage"); + free_block_device(bdev); + return -EPERM; + } + if (!strncmp(bdev->data->fs_type, LUKS_NAME, strlen(LUKS_NAME))) { bdev->data->block_type = BLOCK_MMC_EXTENDED_INTERNAL_DEV; ret = change_mount_point(bdev, EXTENDED_SD_PATH);