diff options
author | arun <arun@FreeBSD.org> | 2004-07-01 22:27:12 +0000 |
---|---|---|
committer | arun <arun@FreeBSD.org> | 2004-07-01 22:27:12 +0000 |
commit | dce79fc81ac3882c972f3ab2981f80969d2f30d5 (patch) | |
tree | 4bbb20bf83b5f389f20f9302507a4a97ab825527 /sbin/gpt | |
parent | 29f2bc7642fb3ea48c4e7a9318b21ca5d774e4fb (diff) | |
download | FreeBSD-src-dce79fc81ac3882c972f3ab2981f80969d2f30d5.zip FreeBSD-src-dce79fc81ac3882c972f3ab2981f80969d2f30d5.tar.gz |
Added the ability to create and display Linux/Windows GPT partitions to gpt(8).
Diffstat (limited to 'sbin/gpt')
-rw-r--r-- | sbin/gpt/add.c | 4 | ||||
-rw-r--r-- | sbin/gpt/gpt.8 | 6 | ||||
-rw-r--r-- | sbin/gpt/show.c | 3 |
3 files changed, 10 insertions, 3 deletions
diff --git a/sbin/gpt/add.c b/sbin/gpt/add.c index f0ce9a8..5f322cf 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 9d08c7e..af247bf 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 6acfbe0..117cd9b 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); |