Module Name: src Committed By: jnemeth Date: Sat Oct 19 09:31:24 UTC 2013
Modified Files: src/sbin/gpt: migrate.c Log Message: Convert FreeBSD numeric FS_<type>s to labels by request. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sbin/gpt/migrate.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/gpt/migrate.c diff -u src/sbin/gpt/migrate.c:1.9 src/sbin/gpt/migrate.c:1.10 --- src/sbin/gpt/migrate.c:1.9 Sat Oct 19 08:13:21 2013 +++ src/sbin/gpt/migrate.c Sat Oct 19 09:31:24 2013 @@ -29,7 +29,7 @@ __FBSDID("$FreeBSD: src/sbin/gpt/migrate.c,v 1.16 2005/09/01 02:42:52 marcel Exp $"); #endif #ifdef __RCSID -__RCSID("$NetBSD: migrate.c,v 1.9 2013/10/19 08:13:21 jnemeth Exp $"); +__RCSID("$NetBSD: migrate.c,v 1.10 2013/10/19 09:31:24 jnemeth Exp $"); #endif #include <sys/types.h> @@ -58,6 +58,10 @@ __RCSID("$NetBSD: migrate.c,v 1.9 2013/1 #define LABELSECTOR 1 #endif +/* FreeBSD filesystem types that don't match corresponding NetBSD types */ +#define FREEBSD_FS_VINUM 14 +#define FREEBSD_FS_ZFS 27 + static int force; static int slice; @@ -120,14 +124,14 @@ migrate_disklabel(int fd, off_t start, s ent->ent_name, 36); break; } - case 14: { /* Vinum */ + case FREEBSD_FS_VINUM: { static const uuid_t vinum = GPT_ENT_TYPE_FREEBSD_VINUM; le_uuid_enc(ent->ent_type, &vinum); utf8_to_utf16((const uint8_t *)"FreeBSD vinum partition", ent->ent_name, 36); break; } - case 27: { /* ZFS */ + case FREEBSD_FS_ZFS: { static const uuid_t zfs = GPT_ENT_TYPE_FREEBSD_ZFS; le_uuid_enc(ent->ent_type, &zfs); utf8_to_utf16((const uint8_t *)"FreeBSD ZFS partition",