OSSP CVS Repository

ossp - Difference in ossp-pkg/uuid/uuid_cli.c versions 1.17 and 1.18
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [History

ossp-pkg/uuid/uuid_cli.c 1.17 -> 1.18

--- uuid_cli.c   2004/12/31 19:20:34     1.17
+++ uuid_cli.c   2005/01/23 11:28:51     1.18
@@ -62,7 +62,7 @@
         vfprintf(stderr, str, ap);
         fprintf(stderr, "\n");
     }
-    fprintf(stderr, "usage: uuid [-v version] [-m] [-n count] [-1] [-r] [-o filename] [namespace-name]\n");
+    fprintf(stderr, "usage: uuid [-v version] [-m] [-n count] [-1] [-r] [-o filename] [namespace name]\n");
     fprintf(stderr, "usage: uuid -d [-r] [-o filename] [uuid]\n");
     va_end(ap);
     exit(1);
@@ -130,6 +130,7 @@
                     case 1: version = UUID_MAKE_V1; break;;
                     case 3: version = UUID_MAKE_V3; break;;
                     case 4: version = UUID_MAKE_V4; break;;
+                    case 5: version = UUID_MAKE_V5; break;;
                     default:
                         usage("invalid version on option 'v'");
                         break;
@@ -188,7 +189,8 @@
         /* encoding */
         if (   (version == UUID_MAKE_V1 && argc != 0)
             || (version == UUID_MAKE_V3 && argc != 2)
-            || (version == UUID_MAKE_V4 && argc != 0))
+            || (version == UUID_MAKE_V4 && argc != 0)
+            || (version == UUID_MAKE_V5 && argc != 2))
             usage("invalid number of arguments");
         if ((rc = uuid_create(&uuid)) != UUID_RC_OK)
             error(1, "uuid_create: %s", uuid_error(rc));
@@ -204,7 +206,7 @@
                 if ((rc = uuid_load(uuid, "nil")) != UUID_RC_OK)
                     error(1, "uuid_load: %s", uuid_error(rc));
             }
-            if (version == UUID_MAKE_V3) {
+            if (version == UUID_MAKE_V3 || version == UUID_MAKE_V5) {
                 if ((rc = uuid_create(&uuid_ns)) != UUID_RC_OK)
                     error(1, "uuid_create: %s", uuid_error(rc));
                 if ((rc = uuid_load(uuid_ns, argv[0])) != UUID_RC_OK) {

CVSTrac 2.0.1