forked from enlightenment/efl
eeze test - warn - fix ecore event callback prototypes
This commit is contained in:
parent
95a538d1f8
commit
64190277ea
|
@ -29,24 +29,24 @@ static const Ecore_Getopt opts =
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
static Eina_Bool
|
||||||
_unmount_cb(void *data, int type, Eeze_Event_Disk_Unmount *e)
|
_unmount_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *info)
|
||||||
{
|
{
|
||||||
(void)data;
|
Eeze_Event_Disk_Unmount *e = info;
|
||||||
(void)type;
|
|
||||||
printf("Success!\n");
|
printf("Success!\n");
|
||||||
eeze_disk_free(e->disk);
|
eeze_disk_free(e->disk);
|
||||||
ecore_main_loop_quit();
|
ecore_main_loop_quit();
|
||||||
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
static Eina_Bool
|
||||||
_error_cb(void *data, int type, Eeze_Event_Disk_Error *de)
|
_error_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void *info)
|
||||||
{
|
{
|
||||||
(void)data;
|
Eeze_Event_Disk_Error *de = info;
|
||||||
(void)type;
|
|
||||||
printf("Could not unmount disk with /dev/ path: %s!\n", eeze_disk_devpath_get(de->disk));
|
printf("Could not unmount disk with /dev/ path: %s!\n", eeze_disk_devpath_get(de->disk));
|
||||||
eeze_disk_free(de->disk);
|
eeze_disk_free(de->disk);
|
||||||
ecore_main_loop_quit();
|
ecore_main_loop_quit();
|
||||||
|
return EINA_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -104,8 +104,8 @@ main(int argc, char *argv[])
|
||||||
printf("[%s] is already unmounted!", dev);
|
printf("[%s] is already unmounted!", dev);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
ecore_event_handler_add(EEZE_EVENT_DISK_UNMOUNT, (Ecore_Event_Handler_Cb)_unmount_cb, NULL);
|
ecore_event_handler_add(EEZE_EVENT_DISK_UNMOUNT, _unmount_cb, NULL);
|
||||||
ecore_event_handler_add(EEZE_EVENT_DISK_ERROR, (Ecore_Event_Handler_Cb)_error_cb, NULL);
|
ecore_event_handler_add(EEZE_EVENT_DISK_ERROR, _error_cb, NULL);
|
||||||
if (!eeze_disk_unmount(disk))
|
if (!eeze_disk_unmount(disk))
|
||||||
{
|
{
|
||||||
printf("unmount operation could not be started!\n");
|
printf("unmount operation could not be started!\n");
|
||||||
|
|
Loading…
Reference in New Issue