diff options
author | jhb <jhb@FreeBSD.org> | 2008-02-05 23:37:42 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-02-05 23:37:42 +0000 |
commit | 7084a34c3ece56a123e9bfd8622a892e5bd0d2e2 (patch) | |
tree | 03bdf3827070450d5f0e39a924e5f59f9dac479b /sbin/gpt | |
parent | da1547d4605365c2023fc6aea4b256ae5a8e12b1 (diff) | |
download | FreeBSD-src-7084a34c3ece56a123e9bfd8622a892e5bd0d2e2.zip FreeBSD-src-7084a34c3ece56a123e9bfd8622a892e5bd0d2e2.tar.gz |
Add ZFS support.
MFC after: 1 week
PR: bin/119976
Submitted by: Simun Mikecin numisemis of yahoo.com
Diffstat (limited to 'sbin/gpt')
-rw-r--r-- | sbin/gpt/gpt.8 | 2 | ||||
-rw-r--r-- | sbin/gpt/migrate.c | 7 | ||||
-rw-r--r-- | sbin/gpt/show.c | 3 |
3 files changed, 11 insertions, 1 deletions
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"); |