Re: Contribution to dvd+rw-tools
Hello Andy,
Andy Polyakov wrote:
Hi,
<cdrite@lists.debina.org>? It's not first time we're communicating on
the matter of dvd+rw-tools:-)
Ok, so this time I have subscribed to the cdwrite mailing list properly ;-).
I've been working on a simple bash script to manipulate DVD+ drives
and burn DVD+Rs lately. I've discovered and started to use
dvd+rw-tools some time ago, but quickly found out that it lacked two
features I required in my script: the simple possibility to eject
and load the DVD tray (as "dvdrecord" from the 'dvdrtools-0.1.5'
package offers, but
unfortunately, this package is just for DVD- drives and I didn't want
to completely install a second DVD tools package *just* to eject/load
the DVD tray...).
'man eject'? I mean you should have 'eject' command on your system
which can do both eject and load tray [and works with *all* removable
media]. If you don't I'd recommend to install one. There is no point
to introduce a similar command if there is one well established already.
Wow ! I am feeling a little stupid -- I really didn't know about that
utility. I guess that'll simplify things quite a bit for "load" and
"eject" commands then ;-). Thanks for pointing that 'eject' utility out
to me.
I've also done some other minor modifications in
"dvd+rw-mediainfo.cpp": my script required some error checking but
unfortunately "dvd+rw-mediainfo" only returned "1" in ALL error
cases, so I couldn't distinguish between various error causes easily
without parsing the complete output...
If so required, I'd rather follow the growisofs approach and return
errno value decorated with 0x80 if no relevant information was pulled
from the unit. That is if it failed to parse command line, open device
or unit is non-MMC, or no media was in, it would return 0x80|errno,
and "naked" errno otherwise. This way you would know that if exit
value is larger than 128, then user does something wrong or
inappropiate, and if not, then something unexpected is taking place,
which is beyond user control anyway. A.
I'd have to agree with that. Especially about errno, standardization is
never bad AFAIK. However, as I need something quick for my bash script
I'll stick with these custom return values (for now).
Before I forget - I require to check how much used/free storage space
there is on a DVD disc. Is there any utility that already exists and
can report that number (say, in sectors or bytes) simply without the
need to parse complete output from dvd+rw-mediainfo and figure out track
info (etc...)?
Thanks,
--
Jeannot Langlois
B. Sc. Computer Science / B. Sc. Informatique
jeannot12 AT linuxmail DOT org
icq : 1-5-2-6-2-8-9-1
msn : jeannot12 AT hotmail DOT com
------------------------------------------------------------------------------------------------
Looking for a Software Developer in Ottawa, Gatineau, Hull, Sherbrooke
or Quebec city (Canada)?
Look no further.
You've just found what you were looking for.
LINUX... SOFTWARE... PROJECTS...
15 rock-solid years in Computer Science.
Always ready for challenges.
Perseverant.
Team spirit.
Autonomous.
One name: Jeannot Langlois.
------------------------------------------------------------------------------------------------
Vous cherchez un Programmeur-Analyste pour Ottawa, Gatineau, Hull,
Sherbrooke ou la ville de Quebec (Canada)?
Ne cherchez plus.
Vous venez de trouver.
LINUX... LOGICIELS... PROJETS...
15 annees solides en Informatique.
Toujours pret pour les defis.
Perseverant.
Esprit d'equipe.
Autonome.
Un seul nom: Jeannot Langlois.
------------------------------------------------------------------------------------------------
LINUX_LOGO
Reply to: