password_pbkdf2_mod_LDFLAGS = $(COMMON_LDFLAGS)
bin_UTILITIES += grub-mkpasswd-pbkdf2
-grub_mkpasswd_pbkdf2_SOURCES = util/grub-mkpasswd-pbkdf2.c lib/crypto.c lib/libgcrypt-grub/cipher/sha512.c lib/pbkdf2.c util/misc.c kern/err.c
+grub_mkpasswd_pbkdf2_SOURCES = gnulib/progname.c util/grub-mkpasswd-pbkdf2.c lib/crypto.c lib/libgcrypt-grub/cipher/sha512.c lib/pbkdf2.c util/misc.c kern/err.c
grub_mkpasswd_pbkdf2_CFLAGS += -Wno-missing-field-initializers -Wno-error -I$(srcdir)/lib/libgcrypt_wrap
include $(srcdir)/conf/gcry.mk
#include <grub/types.h>
#include <grub/crypto.h>
#include <grub/util/misc.h>
+#include <grub/i18n.h>
#include <unistd.h>
#include <stdio.h>
#include <getopt.h>
#include <termios.h>
+#include "progname.h"
/* Few functions to make crypto happy. */
void *
struct termios s, t;
int tty_changed;
- progname = "grub-mkpasswd-pbkdf2";
+ set_program_name (argv[0]);
+ setlocale (LC_ALL, "");
+ bindtextdomain (PACKAGE, LOCALEDIR);
+ textdomain (PACKAGE);
/* Check for options. */
while (1)
return 0;
case 'V':
- printf ("%s (%s) %s\n", progname,
+ printf ("%s (%s) %s\n", program_name,
PACKAGE_NAME, PACKAGE_VERSION);
return 0;