Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2012 14:05:06 GMT
From:      "4721@hushmail.com" <4721@hushmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/174714: [patch] add fat16 support to gpart
Message-ID:  <201212261405.qBQE569R089734@red.freebsd.org>
Resent-Message-ID: <201212261410.qBQEA0I0060882@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         174714
>Category:       bin
>Synopsis:       [patch] add fat16 support to gpart
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 26 14:10:00 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     4721@hushmail.com
>Release:        
>Organization:
>Environment:
>Description:
i use fat16 with some embedded systems and i was updating some scripts i use to generate things for them to use gpart instead of fdisk and found gpart could not add fat16 slice type (#6). this patch adds support for fat16 slice type.
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

Index: sys/sys/diskmbr.h
===================================================================
--- sys/sys/diskmbr.h	(revision 244180)
+++ sys/sys/diskmbr.h	(working copy)
@@ -45,6 +45,7 @@
 #define	DOSMAGIC	0xAA55
 
 #define	DOSPTYP_EXT	0x05	/* DOS extended partition */
+#define	DOSPTYP_FAT16	0x06	/* FAT16 partition */
 #define	DOSPTYP_NTFS	0x07	/* NTFS partition */
 #define	DOSPTYP_FAT32	0x0b	/* FAT32 partition */
 #define	DOSPTYP_EXTLBA	0x0f	/* DOS extended partition */
Index: sys/geom/part/g_part.c
===================================================================
--- sys/geom/part/g_part.c	(revision 244180)
+++ sys/geom/part/g_part.c	(working copy)
@@ -80,6 +80,7 @@
 	{ "bios-boot", G_PART_ALIAS_BIOS_BOOT },
 	{ "ebr", G_PART_ALIAS_EBR },
 	{ "efi", G_PART_ALIAS_EFI },
+	{ "fat16", G_PART_ALIAS_MS_FAT16 },
 	{ "fat32", G_PART_ALIAS_MS_FAT32 },
 	{ "freebsd", G_PART_ALIAS_FREEBSD },
 	{ "freebsd-boot", G_PART_ALIAS_FREEBSD_BOOT },
Index: sys/geom/part/g_part.h
===================================================================
--- sys/geom/part/g_part.h	(revision 244180)
+++ sys/geom/part/g_part.h	(working copy)
@@ -68,6 +68,7 @@
 	G_PART_ALIAS_NETBSD_SWAP,	/* A NetBSD swap partition entry. */
 	G_PART_ALIAS_NETBSD_LFS,	/* A NetBSD LFS partition entry. */
 	G_PART_ALIAS_EBR,		/* A EBR partition entry. */
+	G_PART_ALIAS_MS_FAT16,		/* A Microsoft FAT32 partition entry. */
 	G_PART_ALIAS_MS_FAT32,		/* A Microsoft FAT32 partition entry. */
 	G_PART_ALIAS_BIOS_BOOT,		/* A GRUB 2 boot partition entry. */
 	G_PART_ALIAS_VMFS,		/* A VMware VMFS partition entry */
Index: sys/geom/part/g_part_mbr.c
===================================================================
--- sys/geom/part/g_part_mbr.c	(revision 244180)
+++ sys/geom/part/g_part_mbr.c	(working copy)
@@ -118,6 +118,7 @@
 	{ DOSPTYP_386BSD,	G_PART_ALIAS_FREEBSD },
 	{ DOSPTYP_EXT,		G_PART_ALIAS_EBR },
 	{ DOSPTYP_NTFS,		G_PART_ALIAS_MS_NTFS },
+	{ DOSPTYP_FAT16,	G_PART_ALIAS_MS_FAT16 },
 	{ DOSPTYP_FAT32,	G_PART_ALIAS_MS_FAT32 },
 	{ DOSPTYP_EXTLBA,	G_PART_ALIAS_EBR },
 	{ DOSPTYP_LDM,		G_PART_ALIAS_MS_LDM_DATA },


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201212261405.qBQE569R089734>