Disabled inner burn_drive_info_free like in cdrskin, polished a bit
This commit is contained in:
parent
b02ee9a380
commit
131e7a2484
@ -89,12 +89,12 @@ int burn_app_aquire_by_adr(char *drive_adr)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("Aquiring drive '%s' ... ",drive_adr);
|
printf("Aquiring drive '%s' ...\n",drive_adr);
|
||||||
ret = burn_drive_scan_and_grab(&drives,drive_adr,1);
|
ret = burn_drive_scan_and_grab(&drives,drive_adr,1);
|
||||||
if (ret <= 0)
|
if (ret <= 0)
|
||||||
printf("Failed\n");
|
printf("Failed\n");
|
||||||
else
|
else
|
||||||
printf("Done\n");
|
printf("done\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,7 +111,7 @@ int burn_app_aquire_by_driveno(int driveno)
|
|||||||
char adr[BURN_DRIVE_ADR_LEN];
|
char adr[BURN_DRIVE_ADR_LEN];
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
printf("Scanning for devices ... ");
|
printf("Scanning for devices ...\n");
|
||||||
while (!burn_drive_scan(&drives, &n_drives)) ;
|
while (!burn_drive_scan(&drives, &n_drives)) ;
|
||||||
if (n_drives <= 0) {
|
if (n_drives <= 0) {
|
||||||
printf("Failed (no drives found)\n");
|
printf("Failed (no drives found)\n");
|
||||||
@ -155,10 +155,15 @@ int burn_app_aquire_by_driveno(int driveno)
|
|||||||
}
|
}
|
||||||
printf("Detected '%s' as persistent address of drive number %d\n",
|
printf("Detected '%s' as persistent address of drive number %d\n",
|
||||||
adr,driveno);
|
adr,driveno);
|
||||||
|
|
||||||
|
/* In cdrskin this causes a delayed sigsegv. I understand we risk only
|
||||||
|
a small memory leak by not doing:
|
||||||
|
|
||||||
burn_drive_info_free(drives);
|
burn_drive_info_free(drives);
|
||||||
|
*/
|
||||||
burn_finish();
|
burn_finish();
|
||||||
printf(
|
printf(
|
||||||
"Re-Initializing library to release any unintended drives ... ");
|
"Re-Initializing library to release any unintended drives ...\n");
|
||||||
if (burn_initialize())
|
if (burn_initialize())
|
||||||
printf("done\n");
|
printf("done\n");
|
||||||
else {
|
else {
|
||||||
@ -301,6 +306,7 @@ void parse_args(int argc, char **argv, char **drive_adr, int *driveno,
|
|||||||
++i;
|
++i;
|
||||||
if (i >= argc) {
|
if (i >= argc) {
|
||||||
printf("--drive requires an argument\n");
|
printf("--drive requires an argument\n");
|
||||||
|
exit(3);
|
||||||
} else if (isdigit(argv[i][0])) {
|
} else if (isdigit(argv[i][0])) {
|
||||||
*drive_adr = no_drive_adr;
|
*drive_adr = no_drive_adr;
|
||||||
*driveno = atoi(argv[i]);
|
*driveno = atoi(argv[i]);
|
||||||
@ -314,9 +320,10 @@ void parse_args(int argc, char **argv, char **drive_adr, int *driveno,
|
|||||||
|
|
||||||
} else if (!strcmp(argv[i], "--stdin_size")) {
|
} else if (!strcmp(argv[i], "--stdin_size")) {
|
||||||
++i;
|
++i;
|
||||||
if (i >= argc)
|
if (i >= argc) {
|
||||||
printf("--stdin_size requires an argument\n");
|
printf("--stdin_size requires an argument\n");
|
||||||
else
|
exit(3);
|
||||||
|
} else
|
||||||
*size = atoi(argv[i]);
|
*size = atoi(argv[i]);
|
||||||
} else if (!strcmp(argv[i], "--verbose")) {
|
} else if (!strcmp(argv[i], "--verbose")) {
|
||||||
++i;
|
++i;
|
||||||
@ -346,7 +353,7 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
parse_args(argc, argv, &drive_adr, &driveno, &iso, &stdin_size);
|
parse_args(argc, argv, &drive_adr, &driveno, &iso, &stdin_size);
|
||||||
|
|
||||||
printf("Initializing library ... ");
|
printf("Initializing library ...\n");
|
||||||
if (burn_initialize())
|
if (burn_initialize())
|
||||||
printf("done\n");
|
printf("done\n");
|
||||||
else {
|
else {
|
||||||
|
Loading…
Reference in New Issue
Block a user