mirror of
https://github.com/amadvance/snapraid.git
synced 2026-12-03 13:20:28 -05:00
Allow 'smart' without a configuration file
This commit is contained in:
parent
9d3773a2d4
commit
adbf4f25c2
8 changed files with 32 additions and 9 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue