Getting the free space in a blank cd or dvd?
For various reasons, I'd like to know if there's some way to programmatically determine either whether a blank disc in the drive is a CD or DVD, or, preferably, to determine how much free space there is on the disc without mounting or formatting it. I'm pretty sure this is possible since growisofs will complain about there being only a certain number of blocks available even on unformatted DVDs, but looking at other people's source code gives me a headache.
I've looked through cdrom.h and it doesn't seem as if there's anything I could use in that although I did find out how to make the tray dance a merry little jig. Of course, it's more than likely I missed something.
|