A number of people have complained that "burncd msinfo" returns the wrong
value when there are already multiple sessions on a CD.  This is true,
and is bug bin/27593.

Since I burn a lot of multisession CDs, and have been working out the mkisofs
-C values by hand with the help of "cdcontrol info", I thought now would be a
good time to fix this bug.

Unfortunately, I've found that burncd won't work with SCSI burners, and
the only ATAPI burner I have is at work, and well, it's Christmas and all
that.  So this is completely untested, though I believe it should work.

I hope this can make it into 4.5.


PS How much work would it be to add the CDRIO* ioctls to the SCSI cd driver?

Index: burncd.c
RCS file: /cvs/src/usr.sbin/burncd/burncd.c,v
retrieving revision 1.19
diff -u -r1.19 burncd.c
--- burncd.c    2001/12/24 03:20:10     1.19
+++ burncd.c    2001/12/25 13:45:48
@@ -149,10 +149,14 @@
                if (!strcasecmp(argv[arg], "msinfo")) {
+                       struct ioc_toc_header header;
                        struct ioc_read_toc_single_entry entry;
+                       if (ioctl(fd, CDIOREADTOCHEADER, &header) < 0)
+                               err(EX_IOERR, "ioctl(CDIOREADTOCHEADER)");
                        bzero(&entry, sizeof(struct ioc_read_toc_single_entry));
                        entry.address_format = CD_LBA_FORMAT;
+                       entry.track = header.ending_track;
                        if (ioctl(fd, CDIOREADTOCENTRY, &entry) < 0) 
                                err(EX_IOERR, "ioctl(CDIOREADTOCENTRY)");
                        if (ioctl(fd, CDRIOCNEXTWRITEABLEADDR, &addr) < 0) 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to