0001-diskpart-force-kernel-to-reread-partition-table.patch 981 B

12345678910111213141516171819202122232425262728293031
  1. From e3a6b120ff88f6dc34570002de97754b607966ec Mon Sep 17 00:00:00 2001
  2. From: Stefano Babic <sbabic@denx.de>
  3. Date: Tue, 9 Jun 2020 13:58:06 +0000
  4. Subject: [PATCH] diskpart: force kernel to reread partition table
  5. After writing a partition table to disk, the kernel should be informed
  6. (like the partconf tool does), else it is not possible to install images
  7. in the new created partitions.
  8. Signed-off-by: Stefano Babic <sbabic@denx.de>
  9. ---
  10. handlers/diskpart_handler.c | 3 ++-
  11. 1 file changed, 2 insertions(+), 1 deletion(-)
  12. diff --git a/handlers/diskpart_handler.c b/handlers/diskpart_handler.c
  13. index 16adc17..372412b 100644
  14. --- a/handlers/diskpart_handler.c
  15. +++ b/handlers/diskpart_handler.c
  16. @@ -273,7 +273,8 @@ static int diskpart(struct img_type *img,
  17. /*
  18. * Everything done, write into disk
  19. */
  20. - ret = fdisk_write_disklabel(cxt);
  21. + ret = fdisk_write_disklabel(cxt) |
  22. + fdisk_reread_partition_table(cxt);
  23. handler_exit:
  24. if (fdisk_deassign_device(cxt, 0))
  25. --
  26. 2.25.1