Subject: Re: Old bug, who'll fix it?
To: None <waldi@moacs.indiv.nl.net>
From: Leo Weppelman <leo@wau.mis.ah.nl>
List: port-atari
Date: 11/27/1995 12:41:00
> Hi port-atari gurus,
I'm opting ;-)
> 
> I suppose this is not an Atari specific bug, which should be send-pr'ed, right?
Yes, that's right. Atari specific bugs can be done through send-pr too ;-)
> 
> $ disklabel cd0a
> # /dev/rcd0a:
> type: SCSI
> disk: SCSI CD-ROM
> label: fictitious
> flags: removable
> bytes/sector: 2048
> sectors/track: 100
> tracks/cylinder: 1
> sectors/cylinder: 100
> cylinders: 2950
> rpm: 300
> interleave: 1
> trackskew: 0
> cylinderskew: 0
> headswitch: 0		# milliseconds
> track-to-track seek: 0	# milliseconds
> drivedata: 0 
> 
> 3 partitions:
> #        size   offset    fstype   [fsize bsize   cpg]
>   a:  1179604        0   ISO9660                    	# (Cyl.    0 - 11796*)
>   c:  1179604        0   ISO9660                    	# (Cyl.    0 - 11796*)
> disklabel: boot block size 0
> disklabel: super block size 0
> disklabel: partition a: partition extends past end of unit
> disklabel: partition c: partition extends past end of unit
> 
> 
> Now why does this give me the impression that someone still believes
> that DEV_BSIZE is not a bug, but a feature. :-)
I think the bug is caused by the code in sys/scsi/cd.c, I saw a line
calculating the number of cylinders that says:
	lp->d_ncylinders = (cd->params.disksize / 100) + 1;
given that the number of sectors/cylinders is fixed at 100 (can also be
deduced from the above statement), this will nearly always give you an
invalid label.
I'm not sure what the 'correct' solution is here. You could say, the number
of sectors/cylinder & sectors/track is fixed to 1. In this case this would
yield 294901 cylinders.

Leo.