The feature you are looking for is available since a November 2006:
cdrecord dev=4,0,0 -minfo
Cdrecord-ProDVD-ProBD-Clone 2.01.01a32 (i386-pc-solaris2.11) Copyright (C)
1995-2007 Jörg Schilling
scsidev: '4,0,0'
scsibus: 4 target: 0 lun: 0
Warning: Using USCSI interface.
Using libscg version 'schily-0.9'.
Device type : Removable CD-ROM
Version : 0
Response Format: 2
Capabilities :
Vendor_info : 'MATSHITA'
Identifikation : 'BD-MLT SW-5582 '
Revision : 'BDB2'
Device seems to be: Generic mmc2 DVD-R/DVD-RW/DVD-RAM.
Using generic SCSI-3/mmc-3 BD-R driver (mmc_bdr).
Driver flags : BD DVD MMC-3 SWABAUDIO BURNFREE
Supported modes: PACKET SAO LAYER_JUMP
Mounted media class: BD
Mounted media type: BD-R sequential recording
Disk Is not erasable
data type: standard
disk status: empty
session status: empty
BG format status: none
first track: 1
number of sessions: 1
first track in last sess: 1
last track in last sess: 1
Disk Is unrestricted
Disk type: DVD, HD-DVD or BD
Track Sess Type Start Addr End Addr Size
==============================================
1 1 Blank 0 12219391 12219392
Next writable address: 0
Remaining writable size: 12219392
Just call
cdrecord -minfo | grep "Remaining writable size" | awk '{ print $4 }'
Use a recent free original from:
http://cdrecord.berlios.de/
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily