Subject: bin/3552: 'disklabel' cannot cope with fstypenames containing spaces
To: None <>
From: None <>
List: netbsd-bugs
Date: 04/28/1997 08:23:02
>Number:         3552
>Category:       bin
>Synopsis:       'disklabel' cannot cope with fstypenames containing spaces
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 28 00:35:01 1997
>Originator:     David Brownlee
<a href="">Monochrome</a>
>Release:        1.2
System: NetBSD 1.2D NetBSD 1.2D (_LAPTON_) #3: Sun Apr 27 22:24:02 BST 1997 i386

	Disklabel parses input files by splitting on whitespace. This means
	fstypenames such as 'System V' cannot be parsed (it reports that
	'System' is an unknown filesystem type.

	(I somehow managed to generate disklabels with a 'System V' filesystem
	type by missing out the cpg value, which was more than a littl bizarre.
	I hope to look at this and submit a pr when I have a spare disk to
	disklabel - anyway, that is irrelevant to this pr! :)

	Try to edit a disklabel with a 'System V' filesystem.

	One option is to ensure fstypenames do not contain spaces
	(patch to sys/disklabel.h enclosed). This should not break
	any existing setups as any text representations of disklabels
	containing 'Version 7' or similar cannot be used anyway!

	Another option would be to make disklabel much more intelligent
	when parsing. (Might apply to edlabel as well, though I don't
	_think_ so). This sounds like it could be messy :)

*** sys/disklabel.h	Wed Jan 22 17:46:50 1997
--- sys/	Mon Apr 28 08:11:43 1997
*** 243,253 ****
  static char *fstypenames[] = {
! 	"Version 6",
! 	"Version 7",
! 	"System V",
! 	"Eighth Edition",
--- 243,253 ----
  static char *fstypenames[] = {
! 	"Version-6",
! 	"Version-7",
! 	"System-V",
! 	"Eighth-Edition",