Serial string for GNU/Linux emulation.
authorNIIBE Yutaka <gniibe@fsij.org>
Wed, 4 Oct 2017 09:54:16 +0000 (18:54 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Wed, 4 Oct 2017 09:54:16 +0000 (18:54 +0900)
ChangeLog
src/configure

index 3289621..cef46ae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2017-10-04  NIIBE Yutaka  <gniibe@fsij.org>
 
+       * src/configure (output_vendor_product_serial_strings): Support
+       GNU/Linux emulation.
+
        * polarssl/library/bignum.c (mpi_div_mpi): Fix for 64-bit machine.
 
        * src/main.c (gnuk_malloc, gnuk_free): Fix for 64-bit machine.
index feddae7..90682b1 100755 (executable)
@@ -332,8 +332,13 @@ output_vendor_product_serial_strings () {
   echo "  STRING_DESCRIPTOR,            /* bDescriptorType */"
   echo "  /* Serial number: \"$SERIALNO\" */"
   echo "$SERIALNO" | sed -e "s/\(........\)/\1\\${nl}/g" | sed -n -e "s/\(.\)/'\1', 0, /g" -e "s/^/  /" -e "/^  ./s/ $//p"
-  echo "  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
-  echo "  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
+  if test "$emulation" = "yes"; then
+    echo "  'E', 0, 'M', 0, 'U', 0, 'L', 0,"
+    echo "  'A', 0, 'T', 0, 'E', 0, 'D', 0,"
+  else
+    echo "  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
+    echo "  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,"
+  fi
   echo '};'
   echo
   echo '#ifdef USB_STRINGS_FOR_GNUK'