Module Name: src
Committed By: christos
Date: Wed Dec 2 04:06:10 UTC 2015
Modified Files:
src/sbin/gpt: type.c
Log Message:
use the utility function.
To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/gpt/type.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/type.c
diff -u src/sbin/gpt/type.c:1.10 src/sbin/gpt/type.c:1.11
--- src/sbin/gpt/type.c:1.10 Tue Dec 1 14:25:24 2015
+++ src/sbin/gpt/type.c Tue Dec 1 23:06:10 2015
@@ -33,7 +33,7 @@
__FBSDID("$FreeBSD: src/sbin/gpt/remove.c,v 1.10 2006/10/04 18:20:25 marcel Exp $");
#endif
#ifdef __RCSID
-__RCSID("$NetBSD: type.c,v 1.10 2015/12/01 19:25:24 christos Exp $");
+__RCSID("$NetBSD: type.c,v 1.11 2015/12/02 04:06:10 christos Exp $");
#endif
#include <sys/types.h>
@@ -86,10 +86,8 @@ cmd_type(gpt_t gpt, int argc, char *argv
while ((ch = getopt(argc, argv, GPT_FIND "T:")) != -1) {
switch(ch) {
case 'T':
- if (!gpt_uuid_is_nil(newtype))
- return usage();
- if (gpt_uuid_parse(optarg, newtype) != 0)
- return usage();
+ if (gpt_uuid_get(gpt, &newtype) == -1)
+ return -1;
break;
default:
if (gpt_add_find(gpt, &find, ch) == -1)