Source-Changes-HG archive

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

[src/trunk]: src/sbin/gpt use the utility function.



details:   https://anonhg.NetBSD.org/src/rev/38163df6d1bd
branches:  trunk
changeset: 341999:38163df6d1bd
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Dec 02 04:06:10 2015 +0000

description:
use the utility function.

diffstat:

 sbin/gpt/type.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (25 lines):

diff -r 542538e38fdc -r 38163df6d1bd sbin/gpt/type.c
--- a/sbin/gpt/type.c   Wed Dec 02 02:04:06 2015 +0000
+++ b/sbin/gpt/type.c   Wed Dec 02 04:06:10 2015 +0000
@@ -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 @@
        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)



Home | Main Index | Thread Index | Old Index