]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
fix mismerge with trunk (progname)
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 5 Dec 2009 17:59:36 +0000 (18:59 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 5 Dec 2009 17:59:36 +0000 (18:59 +0100)
conf/common.rmk
util/grub-mkpasswd-pbkdf2.c

index 395d6b17b7da3c3417c02184a8be65d95de11963..0c6fb0cae901da94b430232cb1becbad41101ff5 100644 (file)
@@ -650,7 +650,7 @@ password_pbkdf2_mod_CFLAGS = $(COMMON_CFLAGS)
 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
index ad52aae91aabec247016586e84638926dcbc758f..2f7c5efaaa2d0a3956589c4980f7c7a218cea18f 100644 (file)
@@ -19,6 +19,7 @@
 #include <grub/types.h>
 #include <grub/crypto.h>
 #include <grub/util/misc.h>
+#include <grub/i18n.h>
 
 #include <unistd.h>
 #include <stdio.h>
@@ -27,6 +28,7 @@
 #include <getopt.h>
 #include <termios.h>
 
+#include "progname.h"
 
 /* Few functions to make crypto happy.  */
 void *
@@ -120,7 +122,10 @@ main (int argc, char *argv[])
   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)
@@ -149,7 +154,7 @@ main (int argc, char *argv[])
          return 0;
          
        case 'V':
-         printf ("%s (%s) %s\n", progname,
+         printf ("%s (%s) %s\n", program_name,
                  PACKAGE_NAME, PACKAGE_VERSION);
          return 0;