mirror of
https://github.com/amadvance/snapraid.git
synced 2026-10-26 10:51:54 -04:00
Remove device sorting to keep the original order
This commit is contained in:
parent
1796d1cd01
commit
fca475f136
1 changed files with 0 additions and 25 deletions
|
|
@ -734,22 +734,6 @@ static int devdown(dev_t device)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Compare two device entries.
|
||||
*/
|
||||
static int devcompare(const void* void_a, const void* void_b)
|
||||
{
|
||||
const devinfo_t* a = void_a;
|
||||
const devinfo_t* b = void_b;
|
||||
|
||||
if (a->device < b->device)
|
||||
return -1;
|
||||
if (a->device > b->device)
|
||||
return 1;
|
||||
|
||||
return strcmp(a->mount, b->mount);
|
||||
}
|
||||
|
||||
/**
|
||||
* Spin up a device.
|
||||
*
|
||||
|
|
@ -979,15 +963,6 @@ int devquery(tommy_list* high, tommy_list* low, int operation)
|
|||
}
|
||||
}
|
||||
|
||||
/* sort the high */
|
||||
tommy_list_sort(low, devcompare);
|
||||
|
||||
/* removes duplicates */
|
||||
for (i = tommy_list_head(low); i != 0; i = i->next) {
|
||||
while (i->next != 0 && devcompare(i->data, i->next->data) == 0)
|
||||
free(tommy_list_remove_existing(low, i->next));
|
||||
}
|
||||
|
||||
#if HAVE_LINUX_DEVICE
|
||||
/* add other devices */
|
||||
if (operation == DEVICE_SMART) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue