v6-0002-cryptodisk-geli-unify-grub_cryptodisk_dev-functio.patch 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. From 90f9191faff3f7f4c8f98d0ff6023a8b92069022 Mon Sep 17 00:00:00 2001
  2. From: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  3. Date: Tue, 10 Mar 2020 04:31:16 +0100
  4. Subject: [PATCH v6 2/6] cryptodisk: geli: unify grub_cryptodisk_dev function
  5. names
  6. Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>
  7. Reviewed-by: Patrick Steinhardt <ps@pks.im>
  8. ---
  9. grub-core/disk/geli.c | 9 ++++-----
  10. 1 file changed, 4 insertions(+), 5 deletions(-)
  11. diff --git a/grub-core/disk/geli.c b/grub-core/disk/geli.c
  12. index e9d23299a..581631c1d 100644
  13. --- a/grub-core/disk/geli.c
  14. +++ b/grub-core/disk/geli.c
  15. @@ -242,8 +242,7 @@ grub_util_get_geli_uuid (const char *dev)
  16. #endif
  17. static grub_cryptodisk_t
  18. -configure_ciphers (grub_disk_t disk, const char *check_uuid,
  19. - int boot_only)
  20. +geli_scan (grub_disk_t disk, const char *check_uuid, int boot_only)
  21. {
  22. grub_cryptodisk_t newdev;
  23. struct grub_geli_phdr header;
  24. @@ -398,7 +397,7 @@ configure_ciphers (grub_disk_t disk, const char *check_uuid,
  25. }
  26. static grub_err_t
  27. -recover_key (grub_disk_t source, grub_cryptodisk_t dev)
  28. +geli_recover_key (grub_disk_t source, grub_cryptodisk_t dev)
  29. {
  30. grub_size_t keysize;
  31. grub_uint8_t digest[GRUB_CRYPTO_MAX_MDLEN];
  32. @@ -580,8 +579,8 @@ recover_key (grub_disk_t source, grub_cryptodisk_t dev)
  33. }
  34. struct grub_cryptodisk_dev geli_crypto = {
  35. - .scan = configure_ciphers,
  36. - .recover_key = recover_key
  37. + .scan = geli_scan,
  38. + .recover_key = geli_recover_key
  39. };
  40. GRUB_MOD_INIT (geli)
  41. --
  42. 2.28.0