Polished porting hints and self-compliance to newly established specs

This commit is contained in:
Thomas Schmitt 2006-11-16 13:40:21 +00:00
parent 11c9444b6c
commit 06d008d6c6
3 changed files with 20 additions and 12 deletions

View File

@ -1 +1 @@
#define Cdrskin_timestamP "2006.11.16.111656" #define Cdrskin_timestamP "2006.11.16.133951"

View File

@ -20,11 +20,13 @@ and to derive the following system specific files from existing examples:
transport level module sg-*.c. transport level module sg-*.c.
sg-*.c This source module. You will need special system knowledge about sg-*.c This source module. You will need special system knowledge about
how to detect all potentially available drives and how to perform how to detect all potentially available drives, how to open them,
low-level SCSI and drive operations. You will not need to know eventually how to exclusively reserve them, how to perform
about CD burning, MMC or other high level SCSI aspects. SCSI transactions, how to inquire the (pseudo-)SCSI driver.
You will not need to care about CD burning, MMC or other high-level
SCSI aspects.
Said low-level operations are defined by a public function interface, which has Said sg-*.c operations are defined by a public function interface, which has
to be implemented in a way that provides libburn with the desired services: to be implemented in a way that provides libburn with the desired services:
sg_give_next_adr() iterates over the set of potentially useful drive sg_give_next_adr() iterates over the set of potentially useful drive

View File

@ -20,11 +20,13 @@ and to derive the following system specific files from existing examples:
transport level module sg-*.c. transport level module sg-*.c.
sg-*.c This source module. You will need special system knowledge about sg-*.c This source module. You will need special system knowledge about
how to detect all potentially available drives and how to perform how to detect all potentially available drives, how to open them,
low-level SCSI and drive operations. You will not need to know eventually how to exclusively reserve them, how to perform
about CD burning, MMC or other high level SCSI aspects. SCSI transactions, how to inquire the (pseudo-)SCSI driver.
You will not need to care about CD burning, MMC or other high-level
SCSI aspects.
Said low-level operations are defined by a public function interface, which has Said sg-*.c operations are defined by a public function interface, which has
to be implemented in a way that provides libburn with the desired services: to be implemented in a way that provides libburn with the desired services:
sg_give_next_adr() iterates over the set of potentially useful drive sg_give_next_adr() iterates over the set of potentially useful drive
@ -897,17 +899,21 @@ int sg_obtain_scsi_adr(char *path, int *bus_no, int *host_no, int *channel_no,
int sg_is_enumerable_adr(char *adr) int sg_is_enumerable_adr(char *adr)
{ {
char fname[4096]; char fname[4096];
int i, ret = 0, first = 1; int ret = 0, first = 1;
burn_drive_enumerator_t idx;
while (1) { while (1) {
ret= sg_give_next_adr(&i, fname, sizeof(fname), first); ret= sg_give_next_adr(&idx, fname, sizeof(fname), first);
if(ret <= 0) if(ret <= 0)
break; break;
first = 0; first = 0;
if (strcmp(adr, fname) == 0) if (strcmp(adr, fname) == 0) {
sg_give_next_adr(&idx, fname, sizeof(fname), -1);
return 1; return 1;
}
} }
sg_give_next_adr(&idx, fname, sizeof(fname), -1);
return(0); return(0);
} }