When converting a disklabel partition type integer to a wedge partition

type string, use the strings defined in DKW_PTYPE_* in <sys/disk.h>, not
the strings defined in FSTYPE_DEFN in <sys/disklabel.h>.

This corrects a problem introduced in revision 1.21 dated 2014-08-18.
That change was intended to add additional case to the list, but it
accidentally also changed from the strings in the DKW_PTYPE_* macros to
the strings in the FSTYPE_DEFN macro.  Many of the strings are the same,
but there are differences such as "RAID" versus "raidframe" and "MSDOS"
versus "FAT".

XXX: There seems to be no good reason for the differences in string
names for partition types.  One or both of the lists should probably be
edited to align them.
This commit is contained in:
apb 2014-08-30 09:35:10 +00:00
parent c26d630ad3
commit bb7c004bd3
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: dkwedge_bsdlabel.c,v 1.21 2014/08/18 14:18:59 apb Exp $ */
/* $NetBSD: dkwedge_bsdlabel.c,v 1.22 2014/08/30 09:35:10 apb Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@ -79,7 +79,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: dkwedge_bsdlabel.c,v 1.21 2014/08/18 14:18:59 apb Exp $");
__KERNEL_RCSID(0, "$NetBSD: dkwedge_bsdlabel.c,v 1.22 2014/08/30 09:35:10 apb Exp $");
#include <sys/param.h>
#ifdef _KERNEL
@ -150,7 +150,7 @@ bsdlabel_fstype_to_str(uint8_t fstype)
*/
switch (fstype) {
#define FSTYPE_TO_STR_CASE(tag, number, name, fsck, mount) \
case __CONCAT(FS_,tag): str = name; break;
case __CONCAT(FS_,tag): str = __CONCAT(DKW_PTYPE_,tag); break;
FSTYPE_DEFN(FSTYPE_TO_STR_CASE)
#undef FSTYPE_TO_STR_CASE
default: str = NULL; break;