* util/import_gcry.py: Automatically fix camellia.c and camellia.h.

This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-10-23 23:40:53 +02:00
parent e084ba1895
commit 534d769e57
2 changed files with 18 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2011-10-23 Vladimir Serbinenko <phcoder@gmail.com>
* util/import_gcry.py: Automatically fix camellia.c and camellia.h.
2011-10-23 Vladimir Serbinenko <phcoder@gmail.com> 2011-10-23 Vladimir Serbinenko <phcoder@gmail.com>
* util/import_gcry.py: Accept space between # and include. * util/import_gcry.py: Accept space between # and include.

View file

@ -104,6 +104,20 @@ for cipher_file in cipher_files:
fw.write ("/* This file was automatically imported with \n") fw.write ("/* This file was automatically imported with \n")
fw.write (" import_gcry.py. Please don't modify it */\n") fw.write (" import_gcry.py. Please don't modify it */\n")
fw.write ("#include <grub/dl.h>\n") fw.write ("#include <grub/dl.h>\n")
if cipher_file == "camellia.c":
fw.write ("#include \"camellia.h\"\n")
if cipher_file == "camellia.h":
fw.write ("#include <grub/misc.h>\n")
fw.write ("void camellia_setup128(const unsigned char *key, grub_uint32_t *subkey);\n")
fw.write ("void camellia_setup192(const unsigned char *key, grub_uint32_t *subkey);\n")
fw.write ("void camellia_setup256(const unsigned char *key, grub_uint32_t *subkey);\n")
fw.write ("void camellia_encrypt128(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
fw.write ("void camellia_encrypt192(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
fw.write ("void camellia_encrypt256(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
fw.write ("void camellia_decrypt128(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
fw.write ("void camellia_decrypt192(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
fw.write ("void camellia_decrypt256(const grub_uint32_t *subkey, grub_uint32_t *io);\n")
fw.write ("#define memcpy grub_memcpy\n")
# Whole libgcrypt is distributed under GPLv3+ or compatible # Whole libgcrypt is distributed under GPLv3+ or compatible
if isc: if isc:
fw.write ("GRUB_MOD_LICENSE (\"GPLv3+\");\n") fw.write ("GRUB_MOD_LICENSE (\"GPLv3+\");\n")