I'm creating a front end for cdrecord for use in an embedded system and there are a couple of things that have eluded me so far.
I am allowing the user to create multisession disks. Is there a way to see how much space is free on the disk, or at least to check if I am trying to add a session that is too big to fit in the remaining space? Cdrecord seems to output a multitude of size information, some in bytes, some in sectors and some in blocks.
Is there any way to see if a disk is closed? When I used a closed disk, cdrecord is happy to create a new session and add it to the disk, but the disk then appears blank. The table of contents shows it has 2 tracks on it. I've just noticed that cdrecord -toc gives the mode of each track. Closed tracks have mode: 1 and unclosed tracks have mode: 2 . Is this what I need?
Thanks in advance if you can help,