do-not-force-GUID-partition-with-gpt-commandline-option.patch 783 B

123456789101112131415161718192021222324252627
  1. diff --git a/block/partitions/efi.c b/block/partitions/efi.c
  2. index dc51f46..4bf0f97 100644
  3. --- a/block/partitions/efi.c
  4. +++ b/block/partitions/efi.c
  5. @@ -112,7 +112,11 @@
  6. static int __init
  7. force_gpt_fn(char *str)
  8. {
  9. - force_gpt = 1;
  10. + /* Do not force GPT even if 'gpt' command line option is
  11. + * specified for ChromeOS kernel.
  12. + */
  13. + force_gpt = 0;
  14. + pr_warn("Not forcing GPT even though 'gpt' specified on cmd line.\n");
  15. return 1;
  16. }
  17. __setup("gpt", force_gpt_fn);
  18. @@ -623,7 +627,7 @@
  19. good_agpt = is_gpt_valid(state,
  20. le64_to_cpu(pgpt->alternate_lba),
  21. &agpt, &aptes);
  22. - if (!good_agpt && force_gpt)
  23. + if (!good_agpt && force_gpt)
  24. good_agpt = is_gpt_valid(state, lastlba, &agpt, &aptes);
  25. /* The obviously unsuccessful case */