Allow 'smart' without a configuration file

This commit is contained in:
Andrea Mazzoleni 2016-01-18 22:36:06 +01:00
parent 9d3773a2d4
commit adbf4f25c2
8 changed files with 32 additions and 9 deletions

View file

@ -984,10 +984,13 @@ void state_device(struct snapraid_state* state, int operation)
tommy_list_insert_tail(&high, &entry->node, entry);
}
if (state->opt.fake_device)
if (state->opt.fake_device) {
ret = devtest(&low, operation);
else
ret = devquery(&high, &low, operation);
} else {
int others = operation == DEVICE_SMART;
ret = devquery(&high, &low, operation, others);
}
if (ret != 0) {
const char* ope = 0;