Remove crc.mod and move crc command to hashsum.mod.
Remove lib/crc.c - users updated to use gcrypt implementation. * grub-core/commands/crc.c: Removed. * grub-core/Makefile.core.def (crc): Module removed. * grub-core/commands/hashsum.c (aliases[]): Add crc alias. * grub-core/commands/hashsum.c (GRUB_MOD_INIT): Register crc command. * grub-core/commands/hashsum.c (GRUB_MOD_FINI): Unregister crc command. * grub-core/lib/crc.c: Removed. * include/grub/lib/crc.h: Removed. * Makefile.util.def (crc): Remove lib/crc.c * grub-core/Makefile.core.def (libgrub.a): Remove grub-core/lib/crc.c. * util/grub-fstest.c (cmd_crd): Use libgcrypt crc implementation. * Makefile.util.def (libgrub.a): Add grub-core/lib/libgcrypt-grub/cipher/crc.c. * Makefile.util.def (grub-fstest): Add CFLAGS_GCRY to cflags. * Makefile.util.def (grub-fstest): Add CPPFLAGS_GCRY to cppflags. * grub-core/efiemu/prepare.c (grub_efiemu_crc): Use libgcrypt crc implementation.
This commit is contained in:
parent
e0337366d1
commit
c55f50180d
9 changed files with 55 additions and 193 deletions
|
@ -41,6 +41,7 @@ struct { const char *name; const char *hashname; } aliases[] =
|
|||
{"sha256sum", "sha256"},
|
||||
{"sha512sum", "sha512"},
|
||||
{"md5sum", "md5"},
|
||||
{"crc", "crc32"},
|
||||
};
|
||||
|
||||
static inline int
|
||||
|
@ -248,7 +249,7 @@ grub_cmd_hashsum (struct grub_extcmd_context *ctxt,
|
|||
return GRUB_ERR_NONE;
|
||||
}
|
||||
|
||||
static grub_extcmd_t cmd, cmd_md5, cmd_sha256, cmd_sha512;
|
||||
static grub_extcmd_t cmd, cmd_md5, cmd_sha256, cmd_sha512 , cmd_crc;
|
||||
|
||||
GRUB_MOD_INIT(hashsum)
|
||||
{
|
||||
|
@ -272,6 +273,12 @@ GRUB_MOD_INIT(hashsum)
|
|||
"[FILE1 [FILE2 ...]]"),
|
||||
N_("Compute or check hash checksum."),
|
||||
options);
|
||||
|
||||
cmd_crc = grub_register_extcmd ("crc", grub_cmd_hashsum, 0,
|
||||
N_("[-c FILE [-p PREFIX]] "
|
||||
"[FILE1 [FILE2 ...]]"),
|
||||
N_("Compute or check hash checksum."),
|
||||
options);
|
||||
}
|
||||
|
||||
GRUB_MOD_FINI(hashsum)
|
||||
|
@ -280,4 +287,5 @@ GRUB_MOD_FINI(hashsum)
|
|||
grub_unregister_extcmd (cmd_md5);
|
||||
grub_unregister_extcmd (cmd_sha256);
|
||||
grub_unregister_extcmd (cmd_sha512);
|
||||
grub_unregister_extcmd (cmd_crc);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue