From f3ce25c6cab918c191dd3b9735a2efe01c35b1d9 Mon Sep 17 00:00:00 2001 From: Jaime Thomas Date: Tue, 23 Dec 2008 02:37:34 +0000 Subject: [PATCH] Grr, revert the sorting. --- experimental/ecdb/trunk/src/ecdb_drives.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/experimental/ecdb/trunk/src/ecdb_drives.c b/experimental/ecdb/trunk/src/ecdb_drives.c index 029af402..dde6ba95 100644 --- a/experimental/ecdb/trunk/src/ecdb_drives.c +++ b/experimental/ecdb/trunk/src/ecdb_drives.c @@ -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); }