diff options
author | wtc%google.com <devnull@localhost> | 2008-09-11 17:32:08 +0000 |
---|---|---|
committer | wtc%google.com <devnull@localhost> | 2008-09-11 17:32:08 +0000 |
commit | 520766016de45e3492ab0d8ddacd6b6b17d99cbf (patch) | |
tree | e2517f37b4e711fa860b09b61535f199420c899b | |
parent | 84aecc90275971cf19b2e998f6410a1d9bd16ddb (diff) | |
download | nss-hg-520766016de45e3492ab0d8ddacd6b6b17d99cbf.tar.gz |
Bug 447563: fixed this bug without changing the values of error codes.
Use ADD_MODULE_FAILED_ERR as the surviving error code name. r=emaldona
Modified Files:
error.h pk11.c
-rw-r--r-- | security/nss/cmd/modutil/error.h | 8 | ||||
-rw-r--r-- | security/nss/cmd/modutil/pk11.c | 6 |
2 files changed, 9 insertions, 5 deletions
diff --git a/security/nss/cmd/modutil/error.h b/security/nss/cmd/modutil/error.h index 7b478223a..f8f4a9187 100644 --- a/security/nss/cmd/modutil/error.h +++ b/security/nss/cmd/modutil/error.h @@ -37,6 +37,10 @@ #ifndef MODUTIL_ERROR_H #define MODUTIL_ERROR_H +/* + * The values of these enumerated constants are immutable and must not be + * changed. + */ typedef enum { NO_ERR=0, INVALID_USAGE_ERR, @@ -61,7 +65,7 @@ typedef enum { DIR_NOT_WRITEABLE_ERR, INVALID_CONSTANT_ERR, ADD_MODULE_FAILED_ERR, - ADD_MODULE_FAILED_STATUS_ERR, + UNUSED_ERR, /* reserved for future use */ OUT_OF_MEM_ERR, DELETE_INTERNAL_ERR, DELETE_FAILED_ERR, @@ -114,8 +118,8 @@ static char *errStrings[] = { "ERROR: Directory \"%s\" is not readable.\n", "ERROR: Directory \"%s\" is not writeable.\n", "\"%s\" is not a recognized value.\n", - "ERROR: Failed to add module \"%s\".\n", "ERROR: Failed to add module \"%s\". Probable cause : \"%s\".\n", + "Unused error string", "ERROR: Out of memory.\n", "ERROR: Cannot delete internal module.\n", "ERROR: Failed to delete module \"%s\".\n", diff --git a/security/nss/cmd/modutil/pk11.c b/security/nss/cmd/modutil/pk11.c index 793ac7a93..0e1f21603 100644 --- a/security/nss/cmd/modutil/pk11.c +++ b/security/nss/cmd/modutil/pk11.c @@ -297,14 +297,14 @@ AddModule(char *moduleName, char *libFile, char *cipherString, copied = PR_GetErrorText(errtxt); } if (copied && errtxt) { - PR_fprintf(PR_STDERR, errStrings[ADD_MODULE_FAILED_STATUS_ERR], + PR_fprintf(PR_STDERR, errStrings[ADD_MODULE_FAILED_ERR], moduleName, errtxt); PR_Free(errtxt); } else { - PR_fprintf(PR_STDERR, errStrings[ADD_MODULE_FAILED_STATUS_ERR], + PR_fprintf(PR_STDERR, errStrings[ADD_MODULE_FAILED_ERR], moduleName, SECU_Strerror(PORT_GetError())); } - return ADD_MODULE_FAILED_STATUS_ERR; + return ADD_MODULE_FAILED_ERR; } else { PR_fprintf(PR_STDOUT, msgStrings[ADD_MODULE_SUCCESS_MSG], moduleName); return SUCCESS; |