Subject: CVS commit: src/sys/arch/arm/arm
To: None <source-changes@NetBSD.org>
From: Chris Gilbert <chris@netbsd.org>
List: source-changes
Date: 09/26/2004 11:57:53
Module Name: src
Committed By: chris
Date: Sun Sep 26 11:57:53 UTC 2004
Modified Files:
src/sys/arch/arm/arm: disksubr.c
Log Message:
Fix for cd disklabel issues on arm machines.
Because we no longer return an error message when no disklabel was found
the scsipi/cd.c code took the label we generated. The problem is that the
readdisklabel code was clearing the partition information, which included
the default partition information setup by the cd.c code. Previously when
no disklabel was found we returned an error, which caused the cd.c code to
generate a new default label which included an a partition.
According to the man page for readdisklabel:
Unspecified fields in lp should be set to zero
Therefore we have no reason to clear the partition info, as it's already
clear or contains useful default partition info.
This means if we don't find a label on disk, the default label is left as
is. I would expect the driver to have setup a much more sensible default
label than we could fake at this level.
Also don't hard code the number of partitions to the maximum. This better
matches other platforms (i386)
To generate a diff of this commit:
cvs rdiff -r1.11 -r1.12 src/sys/arch/arm/arm/disksubr.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.