Grr, revert the sorting.
This commit is contained in:
parent
8f7bd3e2d9
commit
ba80149a2e
@ -1,20 +1,13 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
int
|
||||
_drive_speed_sort(int *s1, int *s2)
|
||||
{
|
||||
return (*s1 > *s2) ? 0 : 1;
|
||||
}
|
||||
|
||||
int
|
||||
ecdb_aquire_drive_info(void)
|
||||
{
|
||||
int ret, i, *s;
|
||||
int ret, i;
|
||||
unsigned int drive_num;
|
||||
struct burn_drive_info *drives_current;
|
||||
struct burn_speed_descriptor *speeds;
|
||||
Ecore_List *sort;
|
||||
|
||||
ret = 0;
|
||||
if (em->drives)
|
||||
@ -68,24 +61,14 @@ ecdb_aquire_drive_info(void)
|
||||
|
||||
drive->read_speeds[0] = i + 1;
|
||||
drive->write_speeds[0] = i + 1;
|
||||
sort = ecore_list_new();
|
||||
|
||||
for (ret = 1; ret <= i; ret++)
|
||||
{
|
||||
ecore_list_append(sort, &speeds->write_speed);
|
||||
drive->write_speeds[ret] = speeds->write_speed;
|
||||
drive->read_speeds[ret] = speeds->read_speed;
|
||||
speeds = speeds->prev;
|
||||
}
|
||||
|
||||
ecore_list_sort(sort, ECORE_COMPARE_CB(_drive_speed_sort),
|
||||
ECORE_SORT_MIN);
|
||||
ecore_list_first_goto(sort);
|
||||
for (ret = 1; ret <= i; ret++)
|
||||
{
|
||||
s = ecore_list_next(sort);
|
||||
drive->write_speeds[ret] = *s;
|
||||
drive->read_speeds[ret] = *s;
|
||||
}
|
||||
ecore_list_destroy(sort);
|
||||
burn_drive_free_speedlist(&speeds);
|
||||
em->drives = eina_list_append(em->drives, drive);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user