summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-12-16 16:44:56 +0000
committeremaste <emaste@FreeBSD.org>2015-12-16 16:44:56 +0000
commitf2aaab3d8382fb869edb45fb3d5c4a3611d4eff3 (patch)
tree3001f667e54d5b3c5910e02feccd8422bf61d98f /usr.bin
parentb58d6015e5637646aebc28b9136494ec224819d2 (diff)
downloadFreeBSD-src-f2aaab3d8382fb869edb45fb3d5c4a3611d4eff3.zip
FreeBSD-src-f2aaab3d8382fb869edb45fb3d5c4a3611d4eff3.tar.gz
MFC r289349: mkimg: support fat16b partitions (MBR type 06h)
Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mkimg/ebr.c4
-rw-r--r--usr.bin/mkimg/mbr.c4
-rw-r--r--usr.bin/mkimg/scheme.c1
-rw-r--r--usr.bin/mkimg/scheme.h1
4 files changed, 10 insertions, 0 deletions
diff --git a/usr.bin/mkimg/ebr.c b/usr.bin/mkimg/ebr.c
index 28931ea..526c494 100644
--- a/usr.bin/mkimg/ebr.c
+++ b/usr.bin/mkimg/ebr.c
@@ -39,11 +39,15 @@ __FBSDID("$FreeBSD$");
#include "mkimg.h"
#include "scheme.h"
+#ifndef DOSPTYP_FAT16B
+#define DOSPTYP_FAT16B 0x06
+#endif
#ifndef DOSPTYP_FAT32
#define DOSPTYP_FAT32 0x0b
#endif
static struct mkimg_alias ebr_aliases[] = {
+ { ALIAS_FAT16B, ALIAS_INT2TYPE(DOSPTYP_FAT16B) },
{ ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) },
{ ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) },
{ ALIAS_NONE, 0 }
diff --git a/usr.bin/mkimg/mbr.c b/usr.bin/mkimg/mbr.c
index 961ca45..20d4d91 100644
--- a/usr.bin/mkimg/mbr.c
+++ b/usr.bin/mkimg/mbr.c
@@ -39,6 +39,9 @@ __FBSDID("$FreeBSD$");
#include "mkimg.h"
#include "scheme.h"
+#ifndef DOSPTYP_FAT16B
+#define DOSPTYP_FAT16B 0x06
+#endif
#ifndef DOSPTYP_FAT32
#define DOSPTYP_FAT32 0x0b
#endif
@@ -49,6 +52,7 @@ __FBSDID("$FreeBSD$");
static struct mkimg_alias mbr_aliases[] = {
{ ALIAS_EBR, ALIAS_INT2TYPE(DOSPTYP_EXT) },
{ ALIAS_EFI, ALIAS_INT2TYPE(DOSPTYP_EFI) },
+ { ALIAS_FAT16B, ALIAS_INT2TYPE(DOSPTYP_FAT16B) },
{ ALIAS_FAT32, ALIAS_INT2TYPE(DOSPTYP_FAT32) },
{ ALIAS_FREEBSD, ALIAS_INT2TYPE(DOSPTYP_386BSD) },
{ ALIAS_NTFS, ALIAS_INT2TYPE(DOSPTYP_NTFS) },
diff --git a/usr.bin/mkimg/scheme.c b/usr.bin/mkimg/scheme.c
index 9bdf8a5..1e64855 100644
--- a/usr.bin/mkimg/scheme.c
+++ b/usr.bin/mkimg/scheme.c
@@ -50,6 +50,7 @@ static struct {
} scheme_alias[] = {
{ "ebr", ALIAS_EBR },
{ "efi", ALIAS_EFI },
+ { "fat16b", ALIAS_FAT16B },
{ "fat32", ALIAS_FAT32 },
{ "freebsd", ALIAS_FREEBSD },
{ "freebsd-boot", ALIAS_FREEBSD_BOOT },
diff --git a/usr.bin/mkimg/scheme.h b/usr.bin/mkimg/scheme.h
index 73b06eb..3ba4243 100644
--- a/usr.bin/mkimg/scheme.h
+++ b/usr.bin/mkimg/scheme.h
@@ -36,6 +36,7 @@ enum alias {
/* start */
ALIAS_EBR,
ALIAS_EFI,
+ ALIAS_FAT16B,
ALIAS_FAT32,
ALIAS_FREEBSD,
ALIAS_FREEBSD_BOOT,
OpenPOWER on IntegriCloud