Print this page
6621176 $SRC/cmd/cmd-crypto/cryptoadm/*.c seem to have syntax errors in the translation notes

@@ -17,15 +17,14 @@
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
 /*
- * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
+ * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
-#pragma ident   "%Z%%M% %I%     %E% SMI"
 
 #include <fcntl.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <strings.h>

@@ -52,11 +51,11 @@
         CRYPTO_START,
         CRYPTO_STOP,
         CRYPTO_HELP };
 
 /*
- * TRANSLATION_NOTE:
+ * TRANSLATION_NOTE
  * Command keywords are not to be translated.
  */
 static char *cmd_table[] = {
         "list",
         "disable",

@@ -81,11 +80,11 @@
         char cp_name[MAXPATHLEN];
         enum provider_type_index cp_type;
 } cryptoadm_provider_t;
 
 /*
- * TRANSLATION_NOTE:
+ * TRANSLATION_NOTE
  * Operand keywords are not to be translated.
  */
 static const char *KN_PROVIDER = "provider=";
 static const char *KN_MECH = "mechanism=";
 static const char *KN_ALL = "all";

@@ -196,11 +195,11 @@
 
 static void
 usage(void)
 {
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Command usage is not to be translated.  Only the word "Usage:"
          * along with localized expressions indicating what kind of value
          * is expected for arguments.
          */
         (void) fprintf(stderr, gettext("Usage:\n"));

@@ -250,11 +249,11 @@
  * Get the provider type.  This function returns
  * - PROV_UEF_LIB if provname contains an absolute path name
  * - PROV_KEF_SOFT if provname is a base name only
  * - PROV_KEF_HARD if provname contains one slash only and the slash is not
  *      the 1st character.
- * - PROV_BADNAME othewise.
+ * - PROV_BADNAME otherwise.
  */
 static int
 get_provider_type(char *provname)
 {
         char *pslash1;

@@ -303,11 +302,11 @@
                     strlen(KN_PROVIDER)) == 0 &&
                     strlen(argv[c]) > strlen(KN_PROVIDER)) {
                         if ((provstr = strdup(argv[c])) == NULL) {
                                 int err = errno;
                                 /*
-                                 * TRANSLATION_NOTE:
+                                 * TRANSLATION_NOTE
                                  * "get_provider" is a function name and should
                                  * not be translated.
                                  */
                                 cryptoerror(LOG_STDERR, "get_provider: %s.",
                                     strerror(err));

@@ -481,11 +480,11 @@
                 }
         }
         if (!found) {
                 if (!quiet)
                         /*
-                         * TRANSLATION_NOTE:
+                         * TRANSLATION_NOTE
                          * "mechanism" could be either a literal keyword
                          * and hence not to be translated, or a descriptive
                          * word and translatable.  A choice was made to
                          * view it as a literal keyword.
                          */

@@ -661,11 +660,11 @@
                                 if (getzoneid() == GLOBAL_ZONEID) {
                                         rc = list_policy_for_soft(
                                             prov->cp_name);
                                 } else {
                                         /*
-                                         * TRANSLATION_NOTE:
+                                         * TRANSLATION_NOTE
                                          * "global" is keyword and not to
                                          * be translated.
                                          */
                                         cryptoerror(LOG_STDERR, gettext(
                                             "policy information for kernel "

@@ -678,11 +677,11 @@
                                 if (getzoneid() == GLOBAL_ZONEID) {
                                         rc = list_policy_for_hard(
                                             prov->cp_name);
                                 } else {
                                         /*
-                                         * TRANSLATION_NOTE:
+                                         * TRANSLATION_NOTE
                                          * "global" is keyword and not to
                                          * be translated.
                                          */
                                         cryptoerror(LOG_STDERR, gettext(
                                             "policy information for kernel "

@@ -776,11 +775,11 @@
                 if (getzoneid() == GLOBAL_ZONEID) {
                         rc = disable_kef_software(prov->cp_name, rndflag,
                             allflag, mecharglist);
                 } else {
                         /*
-                         * TRANSLATION_NOTE:
+                         * TRANSLATION_NOTE
                          * "disable" could be either a literal keyword
                          * and hence not to be translated, or a verb and
                          * translatable.  A choice was made to view it as
                          * a literal keyword.  "global" is keyword and not
                          * to be translated.

@@ -801,11 +800,11 @@
                 if (getzoneid() == GLOBAL_ZONEID) {
                         rc = disable_kef_hardware(prov->cp_name, rndflag,
                             allflag, mecharglist);
                 } else {
                         /*
-                         * TRANSLATION_NOTE:
+                         * TRANSLATION_NOTE
                          * "disable" could be either a literal keyword
                          * and hence not to be translated, or a verb and
                          * translatable.  A choice was made to view it as
                          * a literal keyword.  "global" is keyword and not
                          * to be translated.

@@ -909,11 +908,11 @@
                 if (getzoneid() == GLOBAL_ZONEID) {
                         rc = enable_kef(prov->cp_name, rndflag, allflag,
                             mecharglist);
                 } else {
                         /*
-                         * TRANSLATION_NOTE:
+                         * TRANSLATION_NOTE
                          * "enable" could be either a literal keyword
                          * and hence not to be translated, or a verb and
                          * translatable.  A choice was made to view it as
                          * a literal keyword.  "global" is keyword and not
                          * to be translated.

@@ -960,11 +959,11 @@
 
         prov = get_provider(argc, argv);
         if (prov == NULL ||
             prov->cp_type == PROV_BADNAME || prov->cp_type == PROV_KEF_HARD) {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "install" could be either a literal keyword and hence
                  * not to be translated, or a verb and translatable.  A
                  * choice was made to view it as a literal keyword.
                  */
                 cryptoerror(LOG_STDERR,

@@ -981,11 +980,11 @@
         /* It is the PROV_KEF_SOFT type now  */
 
         /* check if there are mechanism operands */
         if (argc < 4) {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "mechanism" could be either a literal keyword and hence
                  * not to be translated, or a descriptive word and
                  * translatable.  A choice was made to view it as a literal
                  * keyword.
                  */

@@ -1000,11 +999,11 @@
                 goto out;
         }
 
         if (allflag == B_TRUE) {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "all", "mechanism", and "install" are all keywords and
                  * not to be translated.
                  */
                 cryptoerror(LOG_STDERR,
                     gettext("can not use the %1$s keyword for %2$s "

@@ -1015,11 +1014,11 @@
 
         if (getzoneid() == GLOBAL_ZONEID) {
                 rc = install_kef(prov->cp_name, mecharglist);
         } else {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "install" could be either a literal keyword and hence
                  * not to be translated, or a verb and translatable.  A
                  * choice was made to view it as a literal keyword.
                  * "global" is keyword and not to be translated.
                  */

@@ -1050,11 +1049,11 @@
 
         prov = get_provider(argc, argv);
         if (prov == NULL ||
             prov->cp_type == PROV_BADNAME || prov->cp_type == PROV_KEF_HARD) {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "uninstall" could be either a literal keyword and hence
                  * not to be translated, or a verb and translatable.  A
                  * choice was made to view it as a literal keyword.
                  */
                 cryptoerror(LOG_STDERR,

@@ -1068,11 +1067,11 @@
         } else if (prov->cp_type == PROV_KEF_SOFT) {
                 if (getzoneid() == GLOBAL_ZONEID) {
                         rc = uninstall_kef(prov->cp_name);
                 } else {
                         /*
-                         * TRANSLATION_NOTE:
+                         * TRANSLATION_NOTE
                          * "uninstall" could be either a literal keyword and
                          * hence not to be translated, or a verb and
                          * translatable.  A choice was made to view it as a
                          * literal keyword.  "global" is keyword and not to
                          * be translated.

@@ -1120,11 +1119,11 @@
                 goto out;
         }
 
         if (getzoneid() != GLOBAL_ZONEID) {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "unload" could be either a literal keyword and hence
                  * not to be translated, or a verb and translatable.
                  * A choice was made to view it as a literal keyword.
                  * "global" is keyword and not to be translated.
                  */

@@ -1380,11 +1379,11 @@
         int     rc = SUCCESS;
 
         /* get user-level providers */
         (void) printf(gettext("\nUser-level providers:\n"));
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Strictly for appearance's sake, this line should be as long as
          * the length of the translated text above.
          */
         (void) printf(gettext("=====================\n"));
         if (get_pkcs11conf_info(&pliblist) != SUCCESS) {

@@ -1410,11 +1409,11 @@
         free_uentrylist(pliblist);
 
         /* get kernel software providers */
         (void) printf(gettext("\nKernel software providers:\n"));
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Strictly for appearance's sake, this line should be as long as
          * the length of the translated text above.
          */
         (void) printf(gettext("==========================\n"));
         if (getzoneid() == GLOBAL_ZONEID) {

@@ -1485,11 +1484,11 @@
         }
 
         /* Get kernel hardware providers and their mechanism lists */
         (void) printf(gettext("\nKernel hardware providers:\n"));
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Strictly for appearance's sake, this line should be as long as
          * the length of the translated text above.
          */
         (void) printf(gettext("==========================\n"));
         if (get_dev_list(&pdevlist_kernel) != SUCCESS) {

@@ -1540,11 +1539,11 @@
         int     rc = SUCCESS;
 
         /* Get user-level providers */
         (void) printf(gettext("\nUser-level providers:\n"));
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Strictly for appearance's sake, this line should be as long as
          * the length of the translated text above.
          */
         (void) printf(gettext("=====================\n"));
         if (get_pkcs11conf_info(&pliblist) == FAILURE) {

@@ -1567,11 +1566,11 @@
         }
 
         /* kernel software providers */
         (void) printf(gettext("\nKernel software providers:\n"));
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Strictly for appearance's sake, this line should be as long as
          * the length of the translated text above.
          */
         (void) printf(gettext("==========================\n"));
 

@@ -1598,11 +1597,11 @@
                 free_entrylist(psoftlist_conf);
         } else {
                 /* kcf.conf not there in non-global zone, no policy info */
 
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "global" is keyword and not to be translated.
                  */
                 cryptoerror(LOG_STDERR, gettext(
                     "policy information for kernel software providers is "
                     "available in the %s zone only"), "global");

@@ -1609,19 +1608,19 @@
         }
 
         /* Kernel hardware providers */
         (void) printf(gettext("\nKernel hardware providers:\n"));
         /*
-         * TRANSLATION_NOTE:
+         * TRANSLATION_NOTE
          * Strictly for appearance's sake, this line should be as long as
          * the length of the translated text above.
          */
         (void) printf(gettext("==========================\n"));
 
         if (getzoneid() != GLOBAL_ZONEID) {
                 /*
-                 * TRANSLATION_NOTE:
+                 * TRANSLATION_NOTE
                  * "global" is keyword and not to be translated.
                  */
                 cryptoerror(LOG_STDERR, gettext(
                     "policy information for kernel hardware providers is "
                     "available in the %s zone only"), "global");