[opensuse-programming] Writing to a CD using C
I want to write an existing ISO file to a CD using C. I am using an array of 256 bytes to read characters from the ISO file and trying to write it to the block file /dev/sr0. But I am getting the error message "No disk space present", even though I have checked that the CD is a blank one. Can anybody suggest why this is not working? I would be grateful if somebody could offer some advice on this matter. Thanks for reading this!. Arani -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Arani Bhattacharya wrote:
I want to write an existing ISO file to a CD using C. I am using an array of 256 bytes to read characters from the ISO file and trying to write it to the block file /dev/sr0. But I am getting the error message "No disk space present", even though I have checked that the CD is a blank one. Can anybody suggest why this is not working?
I would be grateful if somebody could offer some advice on this matter.
AFAIK, you need to use a special IO interface or library for burning a CD. Look up existing applications for burning CDs, there are various tools out there. I'm sure I've come across a library for that kind of thing in the past. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Per Jessen wrote:
Arani Bhattacharya wrote:
I want to write an existing ISO file to a CD using C. I am using an array of 256 bytes to read characters from the ISO file and trying to write it to the block file /dev/sr0. But I am getting the error message "No disk space present", even though I have checked that the CD is a blank one. Can anybody suggest why this is not working?
I would be grateful if somebody could offer some advice on this matter.
AFAIK, you need to use a special IO interface or library for burning a CD. Look up existing applications for burning CDs, there are various tools out there. I'm sure I've come across a library for that kind of thing in the past.
/Per Jessen, Zürich
Yes, plus a little research in CD colour book formats, CD/DVD layouts, and the ISO 9660 standard. There is a bit more to an ISO image than raw data, and IIRC there are restrictions on what you can write where on a CD/DVD, and your image has to be written to a writable area if you do not want to increase your coaster collection. - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/ iEYEARECAAYFAkuQ3ZQACgkQasN0sSnLmgIksACfT3jCXQfwU/JFlx6H3m6nU6oA mXUAn1j4u6fUt03JT3Yyopbuoc9HSCSH =5/Ir -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Hello, On Thu, 04 Mar 2010, Arani Bhattacharya wrote:
I want to write an existing ISO file to a CD using C. I am using an array of 256 bytes to read characters from the ISO file and trying to write it to the block file /dev/sr0. But I am getting the error message "No disk space present", even though I have checked that the CD is a blank one. Can anybody suggest why this is not working?
I would be grateful if somebody could offer some advice on this matter.
Have a closer look at cdrecord/cdrtools/wodim sources, parts of it are libraries that you could reuse, esp. libscg might come in handy. Also, look at the growisofs source. -dnh -- Stef, XP is like democracy and governments. It's the worst Windows version out there, except for all the others. -- A.J. (userfriendly, id=20070928) -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (4)
-
Arani Bhattacharya
-
David Haller
-
G T Smith
-
Per Jessen