Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/gpt Convert FreeBSD numeric FS_<type>s to labels by req...



details:   https://anonhg.NetBSD.org/src/rev/2dc683b019ec
branches:  trunk
changeset: 790670:2dc683b019ec
user:      jnemeth <jnemeth%NetBSD.org@localhost>
date:      Sat Oct 19 09:31:24 2013 +0000

description:
Convert FreeBSD numeric FS_<type>s to labels by request.

diffstat:

 sbin/gpt/migrate.c |  10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diffs (40 lines):

diff -r 4f1f44d0f060 -r 2dc683b019ec sbin/gpt/migrate.c
--- a/sbin/gpt/migrate.c        Sat Oct 19 08:13:21 2013 +0000
+++ b/sbin/gpt/migrate.c        Sat Oct 19 09:31:24 2013 +0000
@@ -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 @@
 #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 @@
                            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",



Home | Main Index | Thread Index | Old Index