From nobody@FreeBSD.org  Wed Dec 26 14:05:06 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id AC97D52A
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Dec 2012 14:05:06 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 79CF48FC13
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Dec 2012 14:05:06 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id qBQE56fv089735
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 26 Dec 2012 14:05:06 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id qBQE569R089734;
	Wed, 26 Dec 2012 14:05:06 GMT
	(envelope-from nobody)
Message-Id: <201212261405.qBQE569R089734@red.freebsd.org>
Date: Wed, 26 Dec 2012 14:05:06 GMT
From: "4721@hushmail.com" <4721@hushmail.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [patch] add fat16 support to gpart
X-Send-Pr-Version: www-3.1
X-GNATS-Notify: r4721@tormail.org

>Number:         174714
>Category:       kern
>Synopsis:       [patch] add fat16 support to gpart(8)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    gavin
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec 26 14:10:00 UTC 2012
>Closed-Date:    Sun May 05 19:50:09 UTC 2013
>Last-Modified:  Sun May 05 19:50:09 UTC 2013
>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:
Responsible-Changed-From-To: freebsd-bugs->gavin 
Responsible-Changed-By: gavin 
Responsible-Changed-When: Sat Jan 19 18:13:02 UTC 2013 
Responsible-Changed-Why:  
Grab 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174714 

From: r4721@tormail.org
To: bug-followup@freebsd.org
Cc:  
Subject: Re: bin/174714: [patch] add fat16 support to gpart(8)
Date: Sun, 20 Jan 2013 18:08:26 -0000

 ------=_20130120180826_36147
 Content-Type: text/plain; charset="iso-8859-1"
 Content-Transfer-Encoding: 8bit
 
 updated patch fixes comment.
 ------=_20130120180826_36147
 Content-Type: text/plain; name="gpart.txt"
 Content-Transfer-Encoding: 8bit
 Content-Disposition: attachment; filename="gpart.txt"
 
 Index: sys/sys/diskmbr.h
 ===================================================================
 --- sys/sys/diskmbr.h	(revision 245456)
 +++ 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 245456)
 +++ 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 245456)
 +++ 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 FAT16 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 245456)
 +++ 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 },
 ------=_20130120180826_36147--
 
 
State-Changed-From-To: open->patched 
State-Changed-By: gavin 
State-Changed-When: Thu Mar 7 22:33:21 UTC 2013 
State-Changed-Why:  
Committed to head, MFC in one week. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174714 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/174714: commit references a PR
Date: Thu,  7 Mar 2013 22:32:56 +0000 (UTC)

 Author: gavin
 Date: Thu Mar  7 22:32:41 2013
 New Revision: 247961
 URL: http://svnweb.freebsd.org/changeset/base/247961
 
 Log:
   Support the FAT16 partition type in gpart(8)
   
   PR:		kern/174714
   Submitted by:	4721 at hushmail dot com
   MFC after:	1 week
 
 Modified:
   head/sys/geom/part/g_part.c
   head/sys/geom/part/g_part.h
   head/sys/geom/part/g_part_mbr.c
   head/sys/sys/diskmbr.h
 
 Modified: head/sys/geom/part/g_part.c
 ==============================================================================
 --- head/sys/geom/part/g_part.c	Thu Mar  7 22:16:35 2013	(r247960)
 +++ head/sys/geom/part/g_part.c	Thu Mar  7 22:32:41 2013	(r247961)
 @@ -80,6 +80,7 @@ struct g_part_alias_list {
  	{ "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 },
 
 Modified: head/sys/geom/part/g_part.h
 ==============================================================================
 --- head/sys/geom/part/g_part.h	Thu Mar  7 22:16:35 2013	(r247960)
 +++ head/sys/geom/part/g_part.h	Thu Mar  7 22:32:41 2013	(r247961)
 @@ -68,6 +68,7 @@ enum g_part_alias {
  	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 FAT16 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 */
 
 Modified: head/sys/geom/part/g_part_mbr.c
 ==============================================================================
 --- head/sys/geom/part/g_part_mbr.c	Thu Mar  7 22:16:35 2013	(r247960)
 +++ head/sys/geom/part/g_part_mbr.c	Thu Mar  7 22:32:41 2013	(r247961)
 @@ -118,6 +118,7 @@ static struct g_part_mbr_alias {
  	{ 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 },
 
 Modified: head/sys/sys/diskmbr.h
 ==============================================================================
 --- head/sys/sys/diskmbr.h	Thu Mar  7 22:16:35 2013	(r247960)
 +++ head/sys/sys/diskmbr.h	Thu Mar  7 22:32:41 2013	(r247961)
 @@ -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 */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/174714: commit references a PR
Date: Sun,  5 May 2013 19:25:10 +0000 (UTC)

 Author: gavin
 Date: Sun May  5 19:24:51 2013
 New Revision: 250287
 URL: http://svnweb.freebsd.org/changeset/base/250287
 
 Log:
   Merge r247961 from head:
     Support the FAT16 partition type in gpart(8)
   
   PR:		kern/174714
   Submitted by:	4721 at hushmail dot com
 
 Modified:
   stable/9/sys/geom/part/g_part.c
   stable/9/sys/geom/part/g_part.h
   stable/9/sys/geom/part/g_part_mbr.c
   stable/9/sys/sys/diskmbr.h
 Directory Properties:
   stable/9/sys/   (props changed)
   stable/9/sys/sys/   (props changed)
 
 Modified: stable/9/sys/geom/part/g_part.c
 ==============================================================================
 --- stable/9/sys/geom/part/g_part.c	Sun May  5 19:09:34 2013	(r250286)
 +++ stable/9/sys/geom/part/g_part.c	Sun May  5 19:24:51 2013	(r250287)
 @@ -80,6 +80,7 @@ struct g_part_alias_list {
  	{ "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 },
 
 Modified: stable/9/sys/geom/part/g_part.h
 ==============================================================================
 --- stable/9/sys/geom/part/g_part.h	Sun May  5 19:09:34 2013	(r250286)
 +++ stable/9/sys/geom/part/g_part.h	Sun May  5 19:24:51 2013	(r250287)
 @@ -68,6 +68,7 @@ enum g_part_alias {
  	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 FAT16 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 */
 
 Modified: stable/9/sys/geom/part/g_part_mbr.c
 ==============================================================================
 --- stable/9/sys/geom/part/g_part_mbr.c	Sun May  5 19:09:34 2013	(r250286)
 +++ stable/9/sys/geom/part/g_part_mbr.c	Sun May  5 19:24:51 2013	(r250287)
 @@ -118,6 +118,7 @@ static struct g_part_mbr_alias {
  	{ 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 },
 
 Modified: stable/9/sys/sys/diskmbr.h
 ==============================================================================
 --- stable/9/sys/sys/diskmbr.h	Sun May  5 19:09:34 2013	(r250286)
 +++ stable/9/sys/sys/diskmbr.h	Sun May  5 19:24:51 2013	(r250287)
 @@ -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 */
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: gavin 
State-Changed-When: Sun May 5 19:49:08 UTC 2013 
State-Changed-Why:  
Merged to stable/9, thanks for your submission! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=174714 
>Unformatted:
