[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: port of cdrtools
Jacob Meuser wrote:
> > xcdroast does cdrecord -scanbus to detect cd-roms. unfortunately, this
> > doesn't work on openbsd (or other bsd's if i recall correctly).
>
> tmtowtdi, and -scanbus is not totally useless on OpenBSD. cdrchive
> can find CD devices.
Yes, but it needs an ugly hack for that.
I work around the scanbus stuff like that:
devel ~ % cat /usr/local/bin/cdrdao
#! /bin/sh
case "${1}" in
scanbus)
sed ' /^cd. at/!d;
s/^cd. at scsibus\(.\) targ \(.\) lun \(.:\) <\([^<]*\)>.*/\1,\2,\3 \4/
' </var/run/dmesg.boot
exit 0
;;
*)
/usr/local/bin/cdrdao-orig $*
;;
esac
exit 1
devel ~ % cdrdao scanbus
0,0,0: , ATAPI CDROM., 100Y
1,0,0: PLEXTOR, CD-R PX-W1210A, 1.08
devel ~ %
Same for cdrecord with an other output format of course. I know this
is still very ugly but for me it seems much cleaner than patching any
imaginable program using (-)scanbus. It's even faster than really
scanning the bus :)
For those who care...
--
Free your mind and your ass will follow -- http://www.funkaffair.de