"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libburn/sg-netbsd.c" between
xorriso-1.5.2.tar.gz and xorriso-1.5.4.tar.gz

About: GNU xorriso creates, loads, manipulates and writes ISO 9660 filesystem images with Rock Ridge extensions. It is suitable for incremental data backup and for production of bootable ISO 9660 images. GNU xorriso is a statical compilation of the libraries libburn, libisofs, libisoburn, and libjte.

sg-netbsd.c  (xorriso-1.5.2):sg-netbsd.c  (xorriso-1.5.4)
skipping to change at line 53 skipping to change at line 53
sg_id_string() returns an id string of the SCSI transport adapter. sg_id_string() returns an id string of the SCSI transport adapter.
It may be called before initialization but then may It may be called before initialization but then may
return only a preliminary id. return only a preliminary id.
sg_initialize() performs global initialization of the SCSI transport sg_initialize() performs global initialization of the SCSI transport
adapter and eventually needed operating system adapter and eventually needed operating system
facilities. Checks for compatibility of supporting facilities. Checks for compatibility of supporting
software components. software components.
sg_shutdown() performs global finalizations and releases golbally sg_shutdown() performs global finalizations and releases globally
acquired resources. acquired resources.
sg_give_next_adr() iterates over the set of potentially useful drive sg_give_next_adr() iterates over the set of potentially useful drive
address strings. address strings.
scsi_enumerate_drives() brings all available, not-whitelist-banned, and scsi_enumerate_drives() brings all available, not-whitelist-banned, and
accessible drives into libburn's list of drives. accessible drives into libburn's list of drives.
sg_dispose_drive() finalizes adapter specifics of struct burn_drive sg_dispose_drive() finalizes adapter specifics of struct burn_drive
on destruction. Releases resources which were acquired on destruction. Releases resources which were acquired
underneath scsi_enumerate_drives(). underneath scsi_enumerate_drives().
sg_drive_is_open() tells wether libburn has the given drive in use. sg_drive_is_open() tells whether libburn has the given drive in use.
sg_grab() opens the drive for SCSI commands and ensures sg_grab() opens the drive for SCSI commands and ensures
undisturbed access. undisturbed access.
sg_release() closes a drive opened by sg_grab() sg_release() closes a drive opened by sg_grab()
sg_issue_command() sends a SCSI command to the drive, receives reply, sg_issue_command() sends a SCSI command to the drive, receives reply,
and evaluates wether the command succeeded or shall and evaluates whether the command succeeded or shall
be retried or finally failed. be retried or finally failed.
sg_obtain_scsi_adr() tries to obtain SCSI address parameters. sg_obtain_scsi_adr() tries to obtain SCSI address parameters.
burn_os_is_2k_seekrw() tells whether the given path leads to a file object burn_os_is_2k_seekrw() tells whether the given path leads to a file object
that can be used in 2 kB granularity by lseek(2), that can be used in 2 kB granularity by lseek(2),
read(2), and possibly write(2) if not read-only.. read(2), and possibly write(2) if not read-only..
E.g. a USB stick or a hard disk. E.g. a USB stick or a hard disk.
burn_os_stdio_capacity() estimates the emulated media space of stdio-drives. burn_os_stdio_capacity() estimates the emulated media space of stdio-drives.
skipping to change at line 503 skipping to change at line 503
(Note: this is not physical tray locking.) (Note: this is not physical tray locking.)
*/ */
int sg_release(struct burn_drive *d) int sg_release(struct burn_drive *d)
{ {
if (d->fd < 0) if (d->fd < 0)
return 0; return 0;
sg_close_drive(d); sg_close_drive(d);
return 0; return 0;
} }
/** Sends a SCSI command to the drive, receives reply and evaluates wether /** Sends a SCSI command to the drive, receives reply and evaluates whether
the command succeeded or shall be retried or finally failed. the command succeeded or shall be retried or finally failed.
Returned SCSI errors shall not lead to a return value indicating failure. Returned SCSI errors shall not lead to a return value indicating failure.
The callers get notified by c->error. An SCSI failure which leads not to The callers get notified by c->error. An SCSI failure which leads not to
a retry shall be notified via scsi_notify_error(). a retry shall be notified via scsi_notify_error().
The Libburn_log_sg_commandS facility might be of help when problems with The Libburn_log_sg_commandS facility might be of help when problems with
a drive have to be examined. It shall stay disabled for normal use. a drive have to be examined. It shall stay disabled for normal use.
@return: 1 success , <=0 failure @return: 1 success , <=0 failure
*/ */
int sg_issue_command(struct burn_drive *d, struct command *c) int sg_issue_command(struct burn_drive *d, struct command *c)
{ {
skipping to change at line 697 skipping to change at line 697
#endif /* ! __OpenBSD__ */ #endif /* ! __OpenBSD__ */
ret = 1; ret = 1;
ex:; ex:;
if (fd != -1) if (fd != -1)
close(fd); close(fd);
return (0); return (0);
} }
/** Tells wether a text is a persistent address as listed by the enumeration /** Tells whether a text is a persistent address as listed by the enumeration
functions. functions.
*/ */
int sg_is_enumerable_adr(char* adr) int sg_is_enumerable_adr(char* adr)
{ {
burn_drive_enumerator_t idx; burn_drive_enumerator_t idx;
int initialize = 1, ret; int initialize = 1, ret;
char buf[64]; char buf[64];
while(1) { while(1) {
ret = sg_give_next_adr(&idx, buf, sizeof(buf), initialize); ret = sg_give_next_adr(&idx, buf, sizeof(buf), initialize);
 End of changes. 5 change blocks. 
5 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)