Check block module enabled before sending GetMmcPrimary dbus method
[platform/core/system/libstorage.git] / src / storage-inhouse.c
index d5ed6b5..2023a56 100755 (executable)
@@ -149,6 +149,9 @@ API int storage_get_primary_sdcard(int *storage_id, char **path)
        if (!storage_id || !path)
                return STORAGE_ERROR_INVALID_PARAMETER;
 
+       if (!storage_ext_is_supported())
+               return STORAGE_ERROR_NO_DEVICE;
+
        result = dbus_method_call_sync(STORAGE_EXT_BUS_NAME,
                        STORAGE_EXT_PATH_MANAGER,
                        STORAGE_EXT_IFACE_MANAGER,