Merge pull request #1156 from kmajzero/master
Fix mising casadm error message
This commit is contained in:
		| @@ -636,6 +636,9 @@ int set_device_path(char *dest_path, size_t dest_len, const char *src_path, size | |||||||
| 			cas_printf(LOG_ERR, "Internal error copying device path\n"); | 			cas_printf(LOG_ERR, "Internal error copying device path\n"); | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
|  | 	cas_printf(LOG_ERR, "Please use correct by-id path to the device %s.\n", | ||||||
|  | 		   src_path); | ||||||
|  |  | ||||||
| 	return FAILURE; | 	return FAILURE; | ||||||
| } | } | ||||||
|  |  | ||||||
| @@ -993,8 +996,6 @@ int start_cache(uint16_t cache_id, unsigned int cache_init, | |||||||
| 	cmd.init_cache = cache_init; | 	cmd.init_cache = cache_init; | ||||||
| 	if (set_device_path(cmd.cache_path_name, sizeof(cmd.cache_path_name), | 	if (set_device_path(cmd.cache_path_name, sizeof(cmd.cache_path_name), | ||||||
| 			    cache_device, MAX_STR_LEN) != SUCCESS) { | 			    cache_device, MAX_STR_LEN) != SUCCESS) { | ||||||
| 		cas_printf(LOG_ERR, "Please use correct by-id path to the device " |  | ||||||
| 			   "%s.\n", cache_device); |  | ||||||
| 		close(fd); | 		close(fd); | ||||||
| 		return FAILURE; | 		return FAILURE; | ||||||
| 	} | 	} | ||||||
| @@ -1696,11 +1697,8 @@ int add_core(unsigned int cache_id, unsigned int core_id, const char *core_devic | |||||||
|  |  | ||||||
| 	memset(&cmd, 0, sizeof(cmd)); | 	memset(&cmd, 0, sizeof(cmd)); | ||||||
| 	if (set_device_path(cmd.core_path_name, sizeof(cmd.core_path_name), | 	if (set_device_path(cmd.core_path_name, sizeof(cmd.core_path_name), | ||||||
| 			    core_device, MAX_STR_LEN) != SUCCESS) { | 			    core_device, MAX_STR_LEN) != SUCCESS) | ||||||
| 		cas_printf(LOG_ERR, "Please use correct by-id path to the device " |  | ||||||
| 			   "%s.\n", core_device); |  | ||||||
| 		return FAILURE; | 		return FAILURE; | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	user_core_path = core_device; | 	user_core_path = core_device; | ||||||
| 	user_core_path_size = strnlen_s(core_device, MAX_STR_LEN); | 	user_core_path_size = strnlen_s(core_device, MAX_STR_LEN); | ||||||
| @@ -1901,8 +1899,6 @@ int core_pool_remove(const char *core_device) | |||||||
|  |  | ||||||
| 	if (set_device_path(cmd.core_path_name, sizeof(cmd.core_path_name), | 	if (set_device_path(cmd.core_path_name, sizeof(cmd.core_path_name), | ||||||
| 			    core_device, MAX_STR_LEN) != SUCCESS) { | 			    core_device, MAX_STR_LEN) != SUCCESS) { | ||||||
| 		cas_printf(LOG_ERR, "Please use correct by-id path to the device " |  | ||||||
| 			   "%s.\n", core_device); |  | ||||||
| 		close(fd); | 		close(fd); | ||||||
| 		return FAILURE; | 		return FAILURE; | ||||||
| 	} | 	} | ||||||
| @@ -2873,11 +2869,8 @@ int check_cache_device(const char *device_path) | |||||||
| 	int result; | 	int result; | ||||||
|  |  | ||||||
| 	if (set_device_path(cmd_info.path_name, sizeof(cmd_info.path_name), | 	if (set_device_path(cmd_info.path_name, sizeof(cmd_info.path_name), | ||||||
| 			    device_path, MAX_STR_LEN) != SUCCESS) { | 			    device_path, MAX_STR_LEN) != SUCCESS) | ||||||
| 		cas_printf(LOG_ERR, "Please use correct by-id path to the device " |  | ||||||
| 			   "%s.\n", device_path); |  | ||||||
| 		return FAILURE; | 		return FAILURE; | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	result = _check_cache_device(device_path, &cmd_info); | 	result = _check_cache_device(device_path, &cmd_info); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Robert Baldyga
					Robert Baldyga