Date: Wed, 26 Dec 2001 00:02:23 +1000 From: Stephen McKay <mckay@thehub.com.au> To: sos@freebsd.org Cc: freebsd-current@freebsd.org Subject: Fix for broken "burncd msinfo" PR#27593 Message-ID: <200112251402.fBPE2OI11645@dungeon.home>
next in thread | raw e-mail | index | archive | help
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. Stephen. 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 @@ break; } 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 majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200112251402.fBPE2OI11645>