summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/gpt/add.c4
-rw-r--r--sbin/gpt/gpt.86
-rw-r--r--sbin/gpt/show.c3
3 files changed, 10 insertions, 3 deletions
diff --git a/sbin/gpt/add.c b/sbin/gpt/add.c
index f0ce9a87a61d..5f322cfa9ca1 100644
--- a/sbin/gpt/add.c
+++ b/sbin/gpt/add.c
@@ -174,6 +174,10 @@ cmd_add(int argc, char *argv[])
} else if (strcmp(optarg, "ufs") == 0) {
uuid_t ufs = GPT_ENT_TYPE_FREEBSD_UFS;
type = ufs;
+ } else if ((strcmp(optarg, "linux") == 0)
+ || (strcmp(optarg, "windows") == 0)) {
+ uuid_t ext = GPT_ENT_TYPE_MS_BASIC_DATA;
+ type = ext ;
} else
usage_add();
}
diff --git a/sbin/gpt/gpt.8 b/sbin/gpt/gpt.8
index 9d08c7e0b8ff..af247bf3cab6 100644
--- a/sbin/gpt/gpt.8
+++ b/sbin/gpt/gpt.8
@@ -123,10 +123,10 @@ option allows the user to specify the partition type.
The type is given as an UUID, but
.Nm
has created
-.Cm efi , swap
+.Cm efi , swap, ufs, linux
and
-.Cm ufs
-as aliases for the three most commonly used partition types.
+.Cm windows
+as aliases for some most commonly used partition types.
.\" ==== create ====
.It Xo
.Nm
diff --git a/sbin/gpt/show.c b/sbin/gpt/show.c
index 6acfbe00d11a..117cd9bca168 100644
--- a/sbin/gpt/show.c
+++ b/sbin/gpt/show.c
@@ -57,6 +57,7 @@ friendly(uuid_t *t)
uuid_t swap = GPT_ENT_TYPE_FREEBSD_SWAP;
uuid_t ufs = GPT_ENT_TYPE_FREEBSD_UFS;
uuid_t vinum = GPT_ENT_TYPE_FREEBSD_VINUM;
+ uuid_t ext = GPT_ENT_TYPE_MS_BASIC_DATA;
static char buf[80];
char *s;
@@ -70,6 +71,8 @@ friendly(uuid_t *t)
return "FreeBSD ufs partition";
else if (memcmp(t, &vinum, sizeof(uuid_t)) == 0)
return "FreeBSD vinum partition";
+ else if (memcmp(t, &ext, sizeof(uuid_t)) == 0)
+ return "Linux/Windows";
uuid_to_string(t, &s, NULL);
strlcpy(buf, s, sizeof buf);
free(s);