Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/arm Use xlat_mbr_fstype().
details: https://anonhg.NetBSD.org/src/rev/24c8b2e58b7b
branches: trunk
changeset: 771729:24c8b2e58b7b
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Fri Dec 02 00:25:37 2011 +0000
description:
Use xlat_mbr_fstype().
diffstat:
sys/arch/arm/arm/disksubr_mbr.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
diffs (55 lines):
diff -r 18c4b0dbe591 -r 24c8b2e58b7b sys/arch/arm/arm/disksubr_mbr.c
--- a/sys/arch/arm/arm/disksubr_mbr.c Thu Dec 01 23:14:06 2011 +0000
+++ b/sys/arch/arm/arm/disksubr_mbr.c Fri Dec 02 00:25:37 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disksubr_mbr.c,v 1.12 2009/03/15 22:23:16 cegger Exp $ */
+/* $NetBSD: disksubr_mbr.c,v 1.13 2011/12/02 00:25:37 jakllsch Exp $ */
/*
* Copyright (c) 1998 Christopher G. Demetriou. All rights reserved.
@@ -68,7 +68,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.12 2009/03/15 22:23:16 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disksubr_mbr.c,v 1.13 2011/12/02 00:25:37 jakllsch Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -80,13 +80,6 @@
#define MBRSIGOFS 0x1fe
static char mbrsig[2] = {0x55, 0xaa};
-int fat_types[] = {
- MBR_PTYPE_FAT12, MBR_PTYPE_FAT16S,
- MBR_PTYPE_FAT16B, MBR_PTYPE_FAT32,
- MBR_PTYPE_FAT32L, MBR_PTYPE_FAT16L,
- -1
-};
-
int
mbr_label_read(dev_t dev,
void (*strat)(struct buf *),
@@ -97,7 +90,7 @@
{
struct mbr_partition *mbrp;
struct partition *pp;
- int cyl, mbrpartoff, i, *ip;
+ int cyl, mbrpartoff, i;
struct buf *bp;
int rv = 1;
@@ -160,12 +153,7 @@
pp = &lp->d_partitions['e' - 'a' + i];
pp->p_offset = mbrp->mbrp_start;
pp->p_size = mbrp->mbrp_size;
- for (ip = fat_types; *ip != -1; ip++) {
- if (mbrp->mbrp_type == *ip)
- pp->p_fstype = FS_MSDOS;
- }
- if (mbrp->mbrp_type == MBR_PTYPE_LNXEXT2)
- pp->p_fstype = FS_EX2FS;
+ pp->p_fstype = xlat_mbr_fstype(mbrp->mbrp_type);
/* is this ours? */
if (mbrp == ourmbrp) {
Home |
Main Index |
Thread Index |
Old Index