vdo_write_stats(vdo, result_buffer, maxlen);
result = 1;
} else {
- result = vdo_map_to_system_error(process_vdo_message(vdo, argc, argv));
+ result = vdo_status_to_errno(process_vdo_message(vdo, argc, argv));
}
uds_unregister_thread_device_id();
if (result != VDO_SUCCESS) {
release_instance(instance);
free_device_config(config);
- return vdo_map_to_system_error(result);
+ return vdo_status_to_errno(result);
}
return VDO_SUCCESS;
if (result != VDO_SUCCESS) {
if (result == VDO_PARAMETER_MISMATCH) {
/*
- * If we don't trap this case, vdo_map_to_system_error() will remap
+ * If we don't trap this case, vdo_status_to_errno() will remap
* it to -EIO, which is misleading and ahistorical.
*/
result = -EINVAL;
result = prepare_to_modify(ti, config, vdo);
if (result != VDO_SUCCESS) {
free_device_config(config);
- return vdo_map_to_system_error(result);
+ return vdo_status_to_errno(result);
}
set_device_config(ti, vdo, config);
if ((result == VDO_PARAMETER_MISMATCH) || (result == VDO_INVALID_ADMIN_STATE))
result = -EINVAL;
uds_unregister_thread_device_id();
- return vdo_map_to_system_error(result);
+ return vdo_status_to_errno(result);
}
static void vdo_resume(struct dm_target *ti)
}
/**
- * vdo_map_to_system_error() - Given an error code, return a value we can return to the OS.
+ * vdo_status_to_errno() - Given an error code, return a value we can return to the OS.
* @error: The error code to convert.
*
* The input error code may be a system-generated value (such as -EIO), an errno macro used in our
*
* Return: A system error code value.
*/
-int vdo_map_to_system_error(int error)
+int vdo_status_to_errno(int error)
{
char error_name[UDS_MAX_ERROR_NAME_SIZE];
char error_message[UDS_MAX_ERROR_MESSAGE_SIZE];