Re: [opensuse-programming] Writing to a CD using C
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Arani Bhattacharya wrote:
On Fri, Mar 5, 2010 at 4:01 PM, G T Smith <grahamsmith@gandalfsemporium.homelinux.com> wrote: 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.
- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Thanks for your help. I have gone through the ISO 9660 standard. About writing to a writable area, could you please show me some resource (such as URL or book) where I may learn more from it? Most of the resources that I have seen (such as tldp) are quite dated.
CDs are an old technology (c.1982) ... the standards used have not changed much in last decade or so ... http://www.usbyte.com/common/compact_disk.htm and http://fy.chalmers.se/~appro/linux/DVD+RW/tools/ might be a useful starting points. There are differences between DVD and CD structures, the former tend to use a simplified variant of the latter... BTW Please respond to the list. Many people will ignore off list responses ... and others may be in a position to respond quicker.. - -- ============================================================================== 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/ iEYEARECAAYFAkuSJD0ACgkQasN0sSnLmgJ/6gCg9mW//Vz4QLoaUCXUE+49OnQM krsAmwcau2SpL7PYdAM2kKricf/eZkM9 =UhCo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
On Sat, Mar 6, 2010 at 3:15 PM, G T Smith <grahamsmith@gandalfsemporium.homelinux.com> wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Arani Bhattacharya wrote:
On Fri, Mar 5, 2010 at 4:01 PM, G T Smith <grahamsmith@gandalfsemporium.homelinux.com> wrote: 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.
- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Thanks for your help. I have gone through the ISO 9660 standard. About writing to a writable area, could you please show me some resource (such as URL or book) where I may learn more from it? Most of the resources that I have seen (such as tldp) are quite dated.
CDs are an old technology (c.1982) ... the standards used have not changed much in last decade or so ...
http://www.usbyte.com/common/compact_disk.htm
and
http://fy.chalmers.se/~appro/linux/DVD+RW/tools/
might be a useful starting points. There are differences between DVD and CD structures, the former tend to use a simplified variant of the latter...
BTW Please respond to the list. Many people will ignore off list responses ... and others may be in a position to respond quicker..
- -- ============================================================================== 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/
iEYEARECAAYFAkuSJD0ACgkQasN0sSnLmgJ/6gCg9mW//Vz4QLoaUCXUE+49OnQM krsAmwcau2SpL7PYdAM2kKricf/eZkM9 =UhCo -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
Thanks for your help. Yes, I have gone through the above resources. I have also tried to go through the ISO 9660 standard. I think it will be an interesting thing to do. -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org
participants (2)
-
Arani Bhattacharya
-
G T Smith