}
goto out;
}
+
+ if (pdata.op == BLOCK_DEV_MOUNT && (pdata.result == 0)) {
+ /* Create file for block device /run/external-storage/id */
+ create_file(pdata.bdev->data->id, pdata.bdev->data->mount_point, pdata.bdev->data->block_type == BLOCK_EXTENDEDSD_DEV);
+ }
+
if (pdata.op == BLOCK_DEV_MOUNT &&
pdata.bdev->data->state == BLOCK_MOUNT &&
pdata.bdev->data->block_type == BLOCK_MMC_DEV &&
if (ret != 0)
_E("Failed to popup: %d", ret);
}
+
if (pdata.op == BLOCK_DEV_UNMOUNT) {
/* Remove file for block device /run/xxxxxx/id */
remove_file(pdata.bdev->data->id, pdata.bdev->data->block_type == BLOCK_EXTENDEDSD_DEV);
return 0;
}
- /* Create file for block device /run/external-storage/id */
- create_file(bdev->data->id, bdev->data->mount_point, bdev->data->block_type == BLOCK_EXTENDEDSD_DEV);
ret = add_operation(bdev, BLOCK_DEV_MOUNT, NULL, NULL);
if (ret < 0) {
_E("Failed to add operation(mount, %s).", devnode);
ret = -EPERM;
goto out;
}
-
- /* Create /run/external-storage/id file */
- create_file(bdev->data->id, bdev->data->mount_point, false);
- } else {
- /* Create file for block device /run/external-storage/id */
- create_file(bdev->data->id, bdev->data->mount_point, false);
}
ret = add_operation(bdev, BLOCK_DEV_MOUNT, invocation, NULL);