if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_INT))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_INT64))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_UINT))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_UINT64))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_UINT64_WITH_1_USER_DATA))
+ return -EINVAL;
+
ret = update_resource_attr_with_1_user_data(resource, attr_id, user_data1, 1);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_UINT64_WITH_2_USER_DATA))
+ return -EINVAL;
+
ret = update_resource_attr_with_2_user_data(resource, attr_id, user_data1, user_data2, 1, 1);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_DOUBLE))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_STRING))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_ARRAY))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;
if (!is_valid_resource(resource, INSTANCE_TYPE_NORMAL))
return -EINVAL;
+ if (!check_attr_validate(resource, attr_id, SYSCOMMON_RESMAN_DATA_TYPE_PTR))
+ return -EINVAL;
+
ret = update_resource_attr(resource, attr_id);
if (ret < 0)
return ret;