Fix doxygen doc for libcryptsetup.h.
[platform/upstream/cryptsetup.git] / lib / utils_fips.c
index 0c56c59..a4df016 100644 (file)
@@ -5,7 +5,8 @@
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
  *
  * This program is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -18,7 +19,9 @@
  */
 
 #include <stdlib.h>
+#include <unistd.h>
 #include "libcryptsetup.h"
+#include "nls.h"
 #include "utils_fips.h"
 #include "config.h"
 
@@ -41,16 +44,16 @@ static void crypt_fips_verify(struct crypt_device *cd,
                return;
 
        if (!FIPSCHECK_verify(name, function)) {
-               crypt_log(cd, CRYPT_LOG_ERROR, "FIPS checksum verification failed.\n");
-               exit(EXIT_FAILURE);
+               crypt_log(cd, CRYPT_LOG_ERROR, _("FIPS checksum verification failed.\n"));
+               _exit(EXIT_FAILURE);
        }
 
-       crypt_log(cd, CRYPT_LOG_VERBOSE, "Running in FIPS mode.\n");
+       crypt_log(cd, CRYPT_LOG_VERBOSE, _("Running in FIPS mode.\n"));
 }
 
 void crypt_fips_libcryptsetup_check(struct crypt_device *cd)
 {
-       crypt_fips_verify(cd, "libcryptsetup.so", "crypt_init");
+       crypt_fips_verify(cd, LIBCRYPTSETUP_VERSION_FIPS, "crypt_init");
 }
 
 void crypt_fips_self_check(struct crypt_device *cd)