Subject: CVS commit: src/sys/dev/scsipi
To: None <source-changes@NetBSD.org>
From: Reinoud Zandijk <reinoud@netbsd.org>
List: source-changes
Date: 12/21/2005 13:11:27
Module Name:	src
Committed By:	reinoud
Date:		Wed Dec 21 13:11:27 UTC 2005

Modified Files:
	src/sys/dev/scsipi: cd.c

Log Message:
Improve disc size reporting. The current discsize thats reported is the
current recorded extent and not the complete maximum extent of the disc.

An empty CD/DVD disc is seen as having an invalid length and given 800 Mb
size. This makes it possible to write to a CD-R using `dd' as some tend to
do.

However when an extent is recorded the initial recorded length is seen as
valid and is thus set as absolute upperbound to read and write actions
preventing extention of the disc.

Committed after consultation on tech-kern with a positive advice by Manuel
Bouyer.


To generate a diff of this commit:
cvs rdiff -r1.233 -r1.234 src/sys/dev/scsipi/cd.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.