From owner-freebsd-current Tue Dec 25 5:58:45 2001 Delivered-To: freebsd-current@freebsd.org Received: from mongrel.pacific.net.au (mongrel.pacific.net.au [61.8.0.107]) by hub.freebsd.org (Postfix) with ESMTP id AA93D37B41C; Tue, 25 Dec 2001 05:58:40 -0800 (PST) Received: from dungeon.home (ppp166.dyn248.pacific.net.au [203.143.248.166]) by mongrel.pacific.net.au (8.9.3/8.9.3/Debian 8.9.3-21) with ESMTP id AAA02283; Wed, 26 Dec 2001 00:53:04 +1100 X-Authentication-Warning: mongrel.pacific.net.au: Host ppp166.dyn248.pacific.net.au [203.143.248.166] claimed to be dungeon.home Received: from dungeon.home (localhost [127.0.0.1]) by dungeon.home (8.11.3/8.11.1) with ESMTP id fBPE2OI11645; Wed, 26 Dec 2001 00:02:24 +1000 (EST) (envelope-from mckay) Message-Id: <200112251402.fBPE2OI11645@dungeon.home> To: sos@freebsd.org Cc: freebsd-current@freebsd.org Subject: Fix for broken "burncd msinfo" PR#27593 Date: Wed, 26 Dec 2001 00:02:23 +1000 From: Stephen McKay Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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