--- old/usr/src/cmd/cmd-crypto/cryptoadm/adm_metaslot.c	Mon Jun 30 15:20:55 2008
+++ new/usr/src/cmd/cmd-crypto/cryptoadm/adm_metaslot.c	Mon Jun 30 15:20:55 2008
@@ -2,9 +2,8 @@
  * CDDL HEADER START
  *
  * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License").  You may not use this file except in compliance
- * with the License.
+ * Common Development and Distribution License (the "License").
+ * You may not use this file except in compliance with the License.
  *
  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
  * or http://www.opensolaris.org/os/licensing.
@@ -20,11 +19,11 @@
  * CDDL HEADER END
  */
 /*
- * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident	"@(#)adm_metaslot.c	1.3	05/06/08 SMI"
+#pragma ident	"@(#)adm_metaslot.c	1.4	08/06/27 SMI"
 
 /*
  * Administration for metaslot
@@ -169,7 +168,7 @@
 	/*
 	 * We know for sure that metaslot is slot 0 in the framework,
 	 * so, we will do a C_GetSlotInfo() trying to see if it works.
-	 * If it failes with CKR_SLOT_ID_INVALID, we know that metaslot
+	 * If it fails with CKR_SLOT_ID_INVALID, we know that metaslot
 	 * is not really enabled.
 	 */
 	rv = funcs->C_GetSlotInfo(METASLOT_ID, &slot_info);
@@ -284,11 +283,18 @@
 	}
 
 	for (i = 0; i < mech_count; i++) {
-		(void) printf("%-29s", pkcs11_mech2str(pmech_list[i]));
+		CK_MECHANISM_TYPE	mech = pmech_list[i];
+
+		if (mech > CKM_VENDOR_DEFINED) {
+			(void) printf("%#lx", mech);
+		} else {
+			(void) printf("%-29s", pkcs11_mech2str(mech));
+		}
+
 		if (verbose) {
 			CK_MECHANISM_INFO mech_info;
 			rv = funcs->C_GetMechanismInfo(METASLOT_ID,
-			    pmech_list[i], &mech_info);
+			    mech, &mech_info);
 			if (rv != CKR_OK) {
 				cryptodebug("C_GetMechanismInfo failed with "
 				    "error code 0x%x\n", rv);
