From 7084a34c3ece56a123e9bfd8622a892e5bd0d2e2 Mon Sep 17 00:00:00 2001 From: jhb Date: Tue, 5 Feb 2008 23:37:42 +0000 Subject: Add ZFS support. MFC after: 1 week PR: bin/119976 Submitted by: Simun Mikecin numisemis of yahoo.com --- sbin/gpt/gpt.8 | 2 +- sbin/gpt/migrate.c | 7 +++++++ sbin/gpt/show.c | 3 +++ 3 files changed, 11 insertions(+), 1 deletion(-) (limited to 'sbin') diff --git a/sbin/gpt/gpt.8 b/sbin/gpt/gpt.8 index 7e54139..698717e 100644 --- a/sbin/gpt/gpt.8 +++ b/sbin/gpt/gpt.8 @@ -130,7 +130,7 @@ option allows the user to specify the partition type. The type is given as an UUID, but .Nm accepts -.Cm boot , efi , swap , ufs , hfs , linux +.Cm boot , efi , swap , ufs , zfs, hfs , linux and .Cm windows as aliases for the most commonly used partition types. diff --git a/sbin/gpt/migrate.c b/sbin/gpt/migrate.c index 8f3b4ec..798949d 100644 --- a/sbin/gpt/migrate.c +++ b/sbin/gpt/migrate.c @@ -118,6 +118,13 @@ migrate_disklabel(int fd, off_t start, struct gpt_ent *ent) ent->ent_name, 36); break; } + case FS_ZFS: { + uuid_t zfs = GPT_ENT_TYPE_FREEBSD_ZFS; + le_uuid_enc(&ent->ent_type, &zfs); + utf8_to_utf16("FreeBSD ZFS partition", + ent->ent_name, 36); + break; + } default: warnx("%s: warning: unknown FreeBSD partition (%d)", device_name, dl->d_partitions[i].p_fstype); diff --git a/sbin/gpt/show.c b/sbin/gpt/show.c index 5d0ee2e..9531288 100644 --- a/sbin/gpt/show.c +++ b/sbin/gpt/show.c @@ -64,6 +64,7 @@ friendly(uuid_t *t) static uuid_t swap = GPT_ENT_TYPE_FREEBSD_SWAP; static uuid_t ufs = GPT_ENT_TYPE_FREEBSD_UFS; static uuid_t vinum = GPT_ENT_TYPE_FREEBSD_VINUM; + static uuid_t zfs = GPT_ENT_TYPE_FREEBSD_ZFS; static char buf[80]; char *s; @@ -80,6 +81,8 @@ friendly(uuid_t *t) return ("FreeBSD UFS/UFS2"); if (uuid_equal(t, &vinum, NULL)) return ("FreeBSD vinum"); + if (uuid_equal(t, &zfs, NULL)) + return ("FreeBSD ZFS"); if (uuid_equal(t, &freebsd, NULL)) return ("FreeBSD legacy"); -- cgit v1.1