Clean up exiting
This commit is contained in:
parent
2d78868112
commit
f6a9daca9c
@ -13,6 +13,7 @@ main(int argc, char **argv)
|
||||
{
|
||||
Ecdb_Project *proj;
|
||||
int i;
|
||||
int ret = 0;
|
||||
|
||||
if (!ecore_init())
|
||||
{
|
||||
@ -23,13 +24,15 @@ main(int argc, char **argv)
|
||||
if (!ecore_file_init())
|
||||
{
|
||||
printf("Cannot initialize Ecore_File!\n");
|
||||
return 1;
|
||||
ret = 1;
|
||||
goto SHUTDOWN;
|
||||
}
|
||||
|
||||
if (!ecdb_setup())
|
||||
{
|
||||
printf("Setup failed\n");
|
||||
return 1;
|
||||
ret = 1;
|
||||
goto SHUTDOWN;
|
||||
}
|
||||
|
||||
ecdb_print_drive_info();
|
||||
@ -47,24 +50,32 @@ main(int argc, char **argv)
|
||||
proj->publisher_id = proj->data_preparer_id = proj->system_id =
|
||||
proj->application_id = proj->copywrite_id = proj->abstract_id =
|
||||
proj->biblio_id = "ecdb";
|
||||
ecdb_aquire_drive(proj, 0);
|
||||
|
||||
if (ecdb_aquire_drive(proj, 0))
|
||||
{
|
||||
printf("Couldn't grab drive!\n");
|
||||
ret = 1;
|
||||
goto SHUTDOWN;
|
||||
}
|
||||
|
||||
if (ecdb_burn_project(proj))
|
||||
{
|
||||
printf("Burn was unsuccessful\n");
|
||||
burn_finish();
|
||||
ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, NULL, NULL, NULL);
|
||||
return 1;
|
||||
ret = 1;
|
||||
goto SHUTDOWN;
|
||||
}
|
||||
|
||||
ecore_main_loop_begin();
|
||||
|
||||
/* End testing */
|
||||
|
||||
SHUTDOWN:
|
||||
burn_finish();
|
||||
ecore_shutdown();
|
||||
ecore_file_shutdown();
|
||||
ecore_event_add(ECORE_EVENT_SIGNAL_EXIT, NULL, NULL, NULL);
|
||||
printf("Program Done\n");
|
||||
return 0;
|
||||
return ret;
|
||||
};
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user