Disable the possibility to use the 'load'

and 'force' flags at once

Signed-off-by: Slawomir Jankowski <slawomir.jankowski@intel.com>
This commit is contained in:
Slawomir Jankowski 2020-05-13 12:06:08 +02:00
parent 69da7f5677
commit 1b7c425fae

View File

@ -294,6 +294,11 @@ int handle_start()
int status;
struct stat device_info;
if (command_args_values.state == CACHE_INIT_LOAD && command_args_values.force) {
cas_printf(LOG_ERR, "Use of 'load' and 'force' simultaneously is forbidden.\n");
return FAILURE;
}
cache_device = open(command_args_values.cache_device, O_RDONLY);
if (cache_device < 0) {