0001-fix-return-code.patch 783 B

12345678910111213141516171819202122232425
  1. genpart: return 0 if partition written OK, with no do_magic
  2. If do_magic is false, we won't write the 0xaa55 magic.
  3. However, if we successfully wrote the partition entry, we still
  4. want to return 0 to indicate success.
  5. Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
  6. Cc: Robert Schwebel <r.schwebel@pengutronix.de>
  7. --
  8. Patch sent upstream, but no mailing list.
  9. Status: accepted upstream, not yet released.
  10. diff -durN host-genpart-1.0.2.orig/src/genpart.c host-genpart-1.0.2/src/genpart.c
  11. --- host-genpart-1.0.2.orig/src/genpart.c 2009-12-20 21:54:56.000000000 +0100
  12. +++ host-genpart-1.0.2/src/genpart.c 2013-01-22 23:13:24.109752579 +0100
  13. @@ -92,6 +92,8 @@
  14. if (do_magic) {
  15. if (fwrite(&magic, 2, 1, stdout) > 0)
  16. rc=0;
  17. + } else {
  18. + rc=0;
  19. }
  20. }
  21. return rc;