Re: Fix for broken burncd msinfo PR#27593

2001-12-26 Thread David Wolfskill

Date: Wed, 26 Dec 2001 00:02:23 +1000
From: Stephen McKay [EMAIL PROTECTED]

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.

OK; I corresponded with Stephen, and since I have an ATAPI CD burner, I
tested it (under -CURRENT).  The patch works as advertised, as far as I
can tell:  I was able to make a multi-session CD following Stephen's
suggestions, and using output from cdcontrol info as a reference, the
output from burncd msinfo is broken (in that it always returns 0 for
the first LBA of the last track) without Stephen's patch, but with the
patch applied, the LBAs reported by burncd msinfo agree with those
reported by cdcontrol info.

I hope this can make it into 4.5.

Likewise -- though my perceived need for it is less than Stephen's, it
would be a Good Thing to have this (apparently easily-fixed bug) fixed.

Cheers,
david
-- 
David H. Wolfskill  [EMAIL PROTECTED]
I believe it would be irresponsible (and thus, unethical) for me to advise,
recommend, or support the use of any product that is or depends on any
Microsoft product for any purpose other than personal amusement.

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



Fix for broken burncd msinfo PR#27593

2001-12-25 Thread Stephen McKay

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.c2001/12/24 03:20:10 1.19
+++ burncd.c2001/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 [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message