1. 25 Dec, 2015 2 commits
    • Stefan Tauner's avatar
      Add support for Sanyo LE25FU406C/LE25U40CMC · 2f055dfb
      Stefan Tauner authored
      
      Corresponding to flashrom svn r1903.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Tested-by: default avatarJose Luis León <zenky1@gmail.com>
      Acked-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      2f055dfb
    • Stefan Tauner's avatar
      Rigorously check integrity of I/O stream data · 1668770c
      Stefan Tauner authored
      
      Even if fwrite() succeeds the data is not necessarily out of the clib's buffers
      and writing it eventually could fail. Even if the data is flushed out (explicitly by
      fflush() or implicitly by fclose()) the kernel might still hold a buffer.
      
      Previously we have ignored this to a large extent - even in important cases
      like writing the flash contents to a file. The results can be truncated
      images that would brick the respective machine if written back as is (though
      flashrom would not allow that due to a size mismatch). flashrom would not
      indicate the problem in any output - so far we only check the return value
      of fwrite() that is not conclusive.
      
      This patch checks the return values of all related system calls like fclose()
      unless we only read the file and are not really interested in output errors.
      In the latter case the return value is casted to void to document this fact.
      Additionally, this patch explicitly calls fflush() and fsync() (on regular files only)
      to do the best we can to guarantee the read image reaches the disk safely
      and at least inform the user if it did not work.
      
      Corresponding to flashrom svn r1902.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarUrja Rannikko <urjaman@gmail.com>
      1668770c
  2. 22 Nov, 2015 1 commit
  3. 21 Nov, 2015 1 commit
  4. 14 Nov, 2015 2 commits
  5. 16 Oct, 2015 1 commit
  6. 05 Jul, 2015 1 commit
  7. 29 Jun, 2015 1 commit
  8. 28 Jun, 2015 1 commit
  9. 22 Jun, 2015 1 commit
  10. 20 Jun, 2015 1 commit
  11. 02 Jun, 2015 1 commit
  12. 23 May, 2015 1 commit
  13. 03 Apr, 2015 1 commit
  14. 01 Mar, 2015 2 commits
  15. 18 Feb, 2015 1 commit
    • Stefan Tauner's avatar
      Fix a number of problems in mstarddc_spi.c · adadca66
      Stefan Tauner authored
      
      Coverity has brought up the following problems:
      
      mstarddc_spi_send_command():
       - CID 1270702: bad comparison of malloced pointer 'cmd'.
       - CID 1270701: a NULL pointer dereference possible because of above.
      
      Simply checking the return value of malloc in a valid way fixes both problems.
      
      mstarddc_spi_init():
       - CID 1270699 and 1270700: Memory leak of i2c_device.
      
      This patch revamps the function in various ways to fix these issues and some
      other irritating bits.
      It reduces scopes of variables where possible, pushes the code towards our
      coding standards and introduces a label-based resource cleanup at the end.
      
      Corresponding to flashrom svn r1885.
      Signed-off-by: default avatarStefan Tauner <stefan.tauner@alumni.tuwien.ac.at>
      Acked-by: default avatarAlexandre Boeglin <alex@boeglin.org>
      adadca66
  16. 11 Feb, 2015 1 commit
  17. 10 Feb, 2015 1 commit
  18. 08 Feb, 2015 3 commits
  19. 27 Jan, 2015 1 commit
  20. 26 Jan, 2015 2 commits
  21. 25 Jan, 2015 4 commits
  22. 24 Jan, 2015 2 commits
  23. 19 Jan, 2015 1 commit
  24. 10 Jan, 2015 7 commits