Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sbin/gpt/gpt_uuid.c,v rcsdiff: /ftp/cvs/cvsroot/src/sbin/gpt/gpt_uuid.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.15 retrieving revision 1.15.10.2 diff -u -p -r1.15 -r1.15.10.2 --- src/sbin/gpt/gpt_uuid.c 2017/02/16 22:40:19 1.15 +++ src/sbin/gpt/gpt_uuid.c 2018/12/26 14:01:28 1.15.10.2 @@ -1,4 +1,4 @@ -/* $NetBSD: gpt_uuid.c,v 1.15 2017/02/16 22:40:19 christos Exp $ */ +/* $NetBSD: gpt_uuid.c,v 1.15.10.2 2018/12/26 14:01:28 pgoyette Exp $ */ /*- * Copyright (c) 2014 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include #ifdef __RCSID -__RCSID("$NetBSD: gpt_uuid.c,v 1.15 2017/02/16 22:40:19 christos Exp $"); +__RCSID("$NetBSD: gpt_uuid.c,v 1.15.10.2 2018/12/26 14:01:28 pgoyette Exp $"); #endif #include @@ -87,6 +87,9 @@ static const struct { { GPT_ENT_TYPE_NETBSD_RAIDFRAME, "raid", "NetBSD RAIDFrame component" }, { GPT_ENT_TYPE_NETBSD_SWAP, "swap", "NetBSD swap" }, + { GPT_ENT_TYPE_VMWARE_VMKCORE, "vmcore", "VMware VMkernel core dump" }, + { GPT_ENT_TYPE_VMWARE_VMFS, "vmfs", "VMware VMFS" }, + { GPT_ENT_TYPE_VMWARE_RESERVED, "vmresered", "VMware reserved" }, }; static void @@ -231,6 +234,23 @@ gpt_uuid_parse(const char *s, gpt_uuid_t return 0; } +size_t +gpt_uuid_query( + void (*func)(const char *uuid, const char *short_name, const char *desc)) +{ + size_t i; + char buf[64]; + + if (func != NULL) { + for (i = 0; i < __arraycount(gpt_nv); i++) { + gpt_uuid_numeric(buf, sizeof(buf), &gpt_nv[i].u); + (*func)(buf, gpt_nv[i].n, gpt_nv[i].d); + } + } + return __arraycount(gpt_nv); +} + +#ifndef GPT_UUID_QUERY_ONLY void gpt_uuid_help(const char *prefix) { @@ -320,3 +340,4 @@ gpt_uuid_generate(gpt_t gpt, gpt_uuid_t gpt_dce_to_uuid(&u, t); return 0; } +#endif