Made use of libburn device address translation (/dev/sr0, /dev/cdrom, ...)
This commit is contained in:
parent
56ab215db0
commit
11f16316b1
@ -107,12 +107,21 @@ int libburner_aquire_drive(char *drive_adr, int *driveno)
|
|||||||
int libburner_aquire_by_adr(char *drive_adr)
|
int libburner_aquire_by_adr(char *drive_adr)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
char libburn_drive_adr[BURN_DRIVE_ADR_LEN];
|
||||||
|
|
||||||
printf("Aquiring drive '%s' ...\n",drive_adr);
|
/* This tries to resolve links or alternative device files */
|
||||||
ret = burn_drive_scan_and_grab(&drive_list,drive_adr,1);
|
ret = burn_drive_convert_fs_adr(drive_adr, libburn_drive_adr);
|
||||||
|
if (ret<=0) {
|
||||||
|
fprintf(stderr,"Address does not lead to a CD burner: '%s'\n",
|
||||||
|
drive_adr);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf("Aquiring drive '%s' ...\n",libburn_drive_adr);
|
||||||
|
ret = burn_drive_scan_and_grab(&drive_list,libburn_drive_adr,1);
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
fprintf(stderr,"FAILURE with persistent drive address '%s'\n",
|
fprintf(stderr,"FAILURE with persistent drive address '%s'\n",
|
||||||
drive_adr);
|
libburn_drive_adr);
|
||||||
} else {
|
} else {
|
||||||
printf("Done\n");
|
printf("Done\n");
|
||||||
drive_is_grabbed = 1;
|
drive_is_grabbed = 1;
|
||||||
|
@ -105,11 +105,20 @@ int telltoc_aquire_by_adr(char *drive_adr)
|
|||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
fprintf(stderr,"Aquiring drive '%s' ...\n",drive_adr);
|
char libburn_drive_adr[BURN_DRIVE_ADR_LEN];
|
||||||
ret = burn_drive_scan_and_grab(&drive_list,drive_adr,1);
|
|
||||||
|
/* This tries to resolve links or alternative device files */
|
||||||
|
ret = burn_drive_convert_fs_adr(drive_adr, libburn_drive_adr);
|
||||||
|
if (ret<=0) {
|
||||||
|
fprintf(stderr,"Address does not lead to a CD burner: '%s'\n",
|
||||||
|
drive_adr);
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
fprintf(stderr,"Aquiring drive '%s' ...\n",libburn_drive_adr);
|
||||||
|
ret = burn_drive_scan_and_grab(&drive_list,libburn_drive_adr,1);
|
||||||
if (ret <= 0) {
|
if (ret <= 0) {
|
||||||
fprintf(stderr,"FAILURE with persistent drive address '%s'\n",
|
fprintf(stderr,"FAILURE with persistent drive address '%s'\n",
|
||||||
drive_adr);
|
libburn_drive_adr);
|
||||||
} else {
|
} else {
|
||||||
fprintf(stderr,"Done\n");
|
fprintf(stderr,"Done\n");
|
||||||
drive_is_grabbed = 1;
|
drive_is_grabbed = 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user