[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Announcing xorriso-0.1.0, an integrated CD/DVD ISO 9660 multi-session tool



Hi,

> Sorry to see that you seem to be from a generation that does no
> longer know the rules from the late 1970s and early 1980s for
> creating OpenSource:

I assume we are of similar age. Although i had
my first encounter with a programmable calculator
only in 1982.


> Make sure that it runs on as many platforms as possible.

In theory it will. In practice there lacks practicing.

The interface between libburn and its operating system
adapter is defined and quite narrow. The function names
are of Linux-centric ancestry, but their behavior is
system independent. From libburn/sg-linux.c :

-----------

sg_give_next_adr()      iterates over the set of potentially useful drive
                        address strings.

scsi_enumerate_drives() brings all available, not-whitelist-banned, and
                        accessible drives into libburn's list of drives.

sg_drive_is_open()      tells wether libburn has the given drive in use.

sg_grab()               opens the drive for SCSI commands and ensures
                        undisturbed access.

sg_release()            closes a drive opened by sg_grab()

sg_issue_command()      sends a SCSI command to the drive, receives reply,
                        and evaluates wether the command succeeded or shall
                        be retried or finally failed.

sg_obtain_scsi_adr()    tries to obtain SCSI address parameters.

burn_os_stdio_capacity()  estimates the emulated media space of stdio-drives.

-----------

The purpose of most calls should be obvious.
Some things need explanation:

The "whitelist" is a set of device paths which may be
empty to aquire all available drives, or may contain
one or more drives to be aquired. Whatever, only drives
from scsi_enumerate_drives() can be aquireed.
(We do quite well in translating other addresses to
list addresses. :))

"SCSI address parameters" are 5-dimensional:
Bus,Host,Channel,Target,Lun
On Linux: Bus from ioctl(SCSI_IOCTL_GET_BUS_NUMBER),
Host,Channel,Target,Lun from ioctl(SCSI_IOCTL_GET_IDLUN).
With xorriso they are only used to identify device equalities
independently of device inode or minor,major number.
cdrskin uses them to deal with the Bus,Lun,Target addresses
of cdrecord tradition.
If an operating system has no use for that concept,
the tuple (-1,-1,-1,-1,-1) indicates incomparable,
hopefully unique devices ... like Linux /dev/hdX.

burn_os_stdio_capacity() for Linux uses statvfs()
or ioctl(BLKGETSIZE) to evaluate the free space in
a filesystem object.

Headers os-*.h  provides some system specific info.
E.g. the buffer size for SCSI transactions or a
list of catchable signals.


This is not a tough challenge for a system programmer
who would be interested to invite the libburnia project.
The first real port with subsequent maintainership would
be allowed to demand nearly any change at our current
system interface. Only constraint: it has to work with
Linux too and it has to make hope for portability.

The reward we can offer is a stable tripod of libraries
and xorriso as novel application.


Have a nice day :)

Thomas


Reply to: