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

@ -1054,7 +1054,7 @@ static int device_thread(tommy_list* list, void* (*func)(void* arg))
return 0;
}
int devquery(tommy_list* high, tommy_list* low, int operation)
int devquery(tommy_list* high, tommy_list* low, int operation, int others)
{
tommy_node* i;
void* (*func)(void* arg) = 0;
@ -1118,7 +1118,7 @@ int devquery(tommy_list* high, tommy_list* low, int operation)
#if HAVE_LINUX_DEVICE
/* add other devices */
if (operation == DEVICE_SMART) {
if (others) {
if (devscan(low) != 0) {
/* LCOV_EXCL_START */
log_fatal("Failed to list other devices.\n");
@ -1126,6 +1126,8 @@ int devquery(tommy_list* high, tommy_list* low, int operation)
/* LCOV_EXCL_STOP */
}
}
#else
(void)others;
#endif
switch (operation) {