svn commit: r234925 - in stable/8/sys: geom/part sys
Dmitry Morozovsky
marck at FreeBSD.org
Wed May 2 11:38:59 UTC 2012
Author: marck (doc committer)
Date: Wed May 2 11:38:58 2012
New Revision: 234925
URL: http://svn.freebsd.org/changeset/base/234925
Log:
MFC (with appropriate changes to gpt ikernel structures) r234417:
VMware environments are not unusual now. Add VMware partitions recognition
(both MBR for ESXi <= 4.1 and GPT for ESXi 5) to g_part.
Reviewed by: ae
Approved by: ae
Modified:
stable/8/sys/geom/part/g_part.c
stable/8/sys/geom/part/g_part.h
stable/8/sys/geom/part/g_part_gpt.c
stable/8/sys/geom/part/g_part_mbr.c
stable/8/sys/sys/diskmbr.h
stable/8/sys/sys/gpt.h
Directory Properties:
stable/8/sys/ (props changed)
Modified: stable/8/sys/geom/part/g_part.c
==============================================================================
--- stable/8/sys/geom/part/g_part.c Wed May 2 10:15:42 2012 (r234924)
+++ stable/8/sys/geom/part/g_part.c Wed May 2 11:38:58 2012 (r234925)
@@ -103,6 +103,9 @@ struct g_part_alias_list {
{ "netbsd-lfs", G_PART_ALIAS_NETBSD_LFS },
{ "netbsd-raid", G_PART_ALIAS_NETBSD_RAID },
{ "netbsd-swap", G_PART_ALIAS_NETBSD_SWAP },
+ { "vmware-vmfs", G_PART_ALIAS_VMFS },
+ { "vmware-vmkdiag", G_PART_ALIAS_VMKDIAG },
+ { "vmware-reserved", G_PART_ALIAS_VMRESERVED },
};
SYSCTL_DECL(_kern_geom);
Modified: stable/8/sys/geom/part/g_part.h
==============================================================================
--- stable/8/sys/geom/part/g_part.h Wed May 2 10:15:42 2012 (r234924)
+++ stable/8/sys/geom/part/g_part.h Wed May 2 11:38:58 2012 (r234925)
@@ -69,6 +69,9 @@ enum g_part_alias {
G_PART_ALIAS_EBR, /* A EBR 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 */
+ G_PART_ALIAS_VMKDIAG, /* A VMware vmkDiagnostic partition entry */
+ G_PART_ALIAS_VMRESERVED, /* A VMware reserved partition entry */
/* Keep the following last */
G_PART_ALIAS_COUNT
};
Modified: stable/8/sys/geom/part/g_part_gpt.c
==============================================================================
--- stable/8/sys/geom/part/g_part_gpt.c Wed May 2 10:15:42 2012 (r234924)
+++ stable/8/sys/geom/part/g_part_gpt.c Wed May 2 11:38:58 2012 (r234925)
@@ -159,6 +159,9 @@ static struct uuid gpt_uuid_linux_data =
static struct uuid gpt_uuid_linux_lvm = GPT_ENT_TYPE_LINUX_LVM;
static struct uuid gpt_uuid_linux_raid = GPT_ENT_TYPE_LINUX_RAID;
static struct uuid gpt_uuid_linux_swap = GPT_ENT_TYPE_LINUX_SWAP;
+static struct uuid gpt_uuid_vmfs = GPT_ENT_TYPE_VMFS;
+static struct uuid gpt_uuid_vmkdiag = GPT_ENT_TYPE_VMKDIAG;
+static struct uuid gpt_uuid_vmreserved = GPT_ENT_TYPE_VMRESERVED;
static struct uuid gpt_uuid_ms_basic_data = GPT_ENT_TYPE_MS_BASIC_DATA;
static struct uuid gpt_uuid_ms_reserved = GPT_ENT_TYPE_MS_RESERVED;
static struct uuid gpt_uuid_ms_ldm_data = GPT_ENT_TYPE_MS_LDM_DATA;
@@ -195,6 +198,9 @@ static struct g_part_uuid_alias {
{ &gpt_uuid_linux_lvm, G_PART_ALIAS_LINUX_LVM },
{ &gpt_uuid_linux_raid, G_PART_ALIAS_LINUX_RAID },
{ &gpt_uuid_linux_swap, G_PART_ALIAS_LINUX_SWAP },
+ { &gpt_uuid_vmfs, G_PART_ALIAS_VMFS },
+ { &gpt_uuid_vmkdiag, G_PART_ALIAS_VMKDIAG },
+ { &gpt_uuid_vmreserved, G_PART_ALIAS_VMRESERVED },
{ &gpt_uuid_mbr, G_PART_ALIAS_MBR },
{ &gpt_uuid_ms_basic_data, G_PART_ALIAS_MS_BASIC_DATA },
{ &gpt_uuid_ms_ldm_data, G_PART_ALIAS_MS_LDM_DATA },
Modified: stable/8/sys/geom/part/g_part_mbr.c
==============================================================================
--- stable/8/sys/geom/part/g_part_mbr.c Wed May 2 10:15:42 2012 (r234924)
+++ stable/8/sys/geom/part/g_part_mbr.c Wed May 2 11:38:58 2012 (r234925)
@@ -121,6 +121,8 @@ static struct g_part_mbr_alias {
{ DOSPTYP_LINUX, G_PART_ALIAS_LINUX_DATA },
{ DOSPTYP_LINLVM, G_PART_ALIAS_LINUX_LVM },
{ DOSPTYP_LINRAID, G_PART_ALIAS_LINUX_RAID },
+ { DOSPTYP_VMFS, G_PART_ALIAS_VMFS },
+ { DOSPTYP_VMKDIAG, G_PART_ALIAS_VMKDIAG },
};
static int
Modified: stable/8/sys/sys/diskmbr.h
==============================================================================
--- stable/8/sys/sys/diskmbr.h Wed May 2 10:15:42 2012 (r234924)
+++ stable/8/sys/sys/diskmbr.h Wed May 2 11:38:58 2012 (r234925)
@@ -54,6 +54,8 @@
#define DOSPTYP_LINUX 0x83 /* Linux partition */
#define DOSPTYP_LINLVM 0x8e /* Linux LVM partition */
#define DOSPTYP_PMBR 0xee /* GPT Protective MBR */
+#define DOSPTYP_VMFS 0xfb /* VMware VMFS partition */
+#define DOSPTYP_VMKDIAG 0xfc /* VMware vmkDiagnostic partition */
#define DOSPTYP_LINRAID 0xfd /* Linux raid partition */
struct dos_partition {
Modified: stable/8/sys/sys/gpt.h
==============================================================================
--- stable/8/sys/sys/gpt.h Wed May 2 10:15:42 2012 (r234924)
+++ stable/8/sys/sys/gpt.h Wed May 2 11:38:58 2012 (r234925)
@@ -120,6 +120,13 @@ struct gpt_ent {
#define GPT_ENT_TYPE_LINUX_LVM \
{0xe6d6d379,0xf507,0x44c2,0xa2,0x3c,{0x23,0x8f,0x2a,0x3d,0xf9,0x28}}
+#define GPT_ENT_TYPE_VMFS \
+ {0xaa31e02a,0x400f,0x11db,0x95,0x90,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
+#define GPT_ENT_TYPE_VMKDIAG \
+ {0x9d275380,0x40ad,0x11db,0xbf,0x97,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
+#define GPT_ENT_TYPE_VMRESERVED \
+ {0x9198effc,0x31c0,0x11db,0x8f,0x78,{0x00,0x0c,0x29,0x11,0xd1,0xb8}}
+
#define GPT_ENT_TYPE_APPLE_BOOT \
{0x426F6F74,0x0000,0x11aa,0xaa,0x11,{0x00,0x30,0x65,0x43,0xec,0xac}}
#define GPT_ENT_TYPE_APPLE_HFS \
More information about the svn-src-all
mailing list