Ecore_List -> Eina_List
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
/* vim: set sw=3 ts=3 sts=3 expandtab: */
|
||||
#include "ecdb.h"
|
||||
|
||||
void ecdb_drive_info_free_cb(void *data);
|
||||
|
||||
int
|
||||
ecdb_aquire_drive_info(void)
|
||||
{
|
||||
@@ -14,12 +12,9 @@ ecdb_aquire_drive_info(void)
|
||||
ret = 0;
|
||||
if (em->drives)
|
||||
{
|
||||
ecore_list_destroy(em->drives);
|
||||
ecdb_drive_info_list_free(em->drives);
|
||||
}
|
||||
|
||||
em->drives = ecore_list_new();
|
||||
ecore_list_free_cb_set(em->drives, ecdb_drive_info_free_cb);
|
||||
|
||||
while (!ret)
|
||||
{
|
||||
ret = burn_drive_scan(&drives_current, &drive_num);
|
||||
@@ -76,7 +71,7 @@ ecdb_aquire_drive_info(void)
|
||||
}
|
||||
|
||||
burn_drive_free_speedlist(&speeds);
|
||||
ecore_list_append(em->drives, drive);
|
||||
em->drives = eina_list_append(em->drives, drive);
|
||||
}
|
||||
|
||||
burn_drive_info_free(drives_current);
|
||||
@@ -85,30 +80,35 @@ ecdb_aquire_drive_info(void)
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_drive_info_free_cb(void *data)
|
||||
ecdb_drive_info_list_free(Eina_List *list)
|
||||
{
|
||||
Ecdb_Drive_Info *info;
|
||||
Eina_List *l;
|
||||
|
||||
info = data;
|
||||
EINA_LIST_FOREACH(list, l, info)
|
||||
{
|
||||
FREE(info->read_speeds);
|
||||
FREE(info->write_speeds);
|
||||
FREE(info->vendor);
|
||||
FREE(info->product);
|
||||
FREE(info->revision);
|
||||
FREE(info->location);
|
||||
FREE(info->profile_name);
|
||||
FREE(info);
|
||||
}
|
||||
|
||||
FREE(info->read_speeds);
|
||||
FREE(info->write_speeds);
|
||||
FREE(info->vendor);
|
||||
FREE(info->product);
|
||||
FREE(info->revision);
|
||||
FREE(info->location);
|
||||
FREE(info->profile_name);
|
||||
FREE(info);
|
||||
list = eina_list_free(list);
|
||||
}
|
||||
|
||||
void
|
||||
ecdb_print_drive_info(void)
|
||||
{
|
||||
Eina_List *l;
|
||||
Ecdb_Drive_Info *drive;
|
||||
int j, i, h;
|
||||
|
||||
ecore_list_first_goto(em->drives);
|
||||
while ((drive = ecore_list_next(em->drives)))
|
||||
em->drives = eina_list_nth_list(em->drives, 0);
|
||||
EINA_LIST_FOREACH(em->drives, l, drive)
|
||||
{
|
||||
printf("Vendor: %s, Product: %s, Revision: %s, "
|
||||
"Location: %s\n",
|
||||
@@ -153,7 +153,7 @@ ecdb_aquire_drive(Ecdb_Project *proj, unsigned int idx)
|
||||
Ecdb_Drive_Info *info;
|
||||
char adr[BURN_DRIVE_ADR_LEN];
|
||||
|
||||
info = ecore_list_index_goto(em->drives, idx);
|
||||
info = eina_list_nth(em->drives, idx);
|
||||
if (burn_drive_convert_fs_adr(info->location, adr) <= 0)
|
||||
{
|
||||
printf("Error: Address doesn't provide cd burner!\n");
|
||||
|
Reference in New Issue
Block a user