)]}'
{
  "commit": "1668770c6fe7308939f208c265328a8ef92b6ac1",
  "tree": "f787fd81606d11698acd1cec6a8d0f36c39d568f",
  "parents": [
    "bcf6109a76a873fc1227402d4b5b13a87dc3eb1a"
  ],
  "author": {
    "name": "Stefan Tauner",
    "email": "stefan.tauner@alumni.tuwien.ac.at",
    "time": "Fri Dec 25 21:59:45 2015 +0000"
  },
  "committer": {
    "name": "Stefan Tauner",
    "email": "stefan.tauner@alumni.tuwien.ac.at",
    "time": "Fri Dec 25 21:59:45 2015 +0000"
  },
  "message": "Rigorously check integrity of I/O stream data\n\nEven if fwrite() succeeds the data is not necessarily out of the clib\u0027s buffers\nand writing it eventually could fail. Even if the data is flushed out (explicitly by\nfflush() or implicitly by fclose()) the kernel might still hold a buffer.\n\nPreviously we have ignored this to a large extent - even in important cases\nlike writing the flash contents to a file. The results can be truncated\nimages that would brick the respective machine if written back as is (though\nflashrom would not allow that due to a size mismatch). flashrom would not\nindicate the problem in any output - so far we only check the return value\nof fwrite() that is not conclusive.\n\nThis patch checks the return values of all related system calls like fclose()\nunless we only read the file and are not really interested in output errors.\nIn the latter case the return value is casted to void to document this fact.\nAdditionally, this patch explicitly calls fflush() and fsync() (on regular files only)\nto do the best we can to guarantee the read image reaches the disk safely\nand at least inform the user if it did not work.\n\nCorresponding to flashrom svn r1902.\n\nSigned-off-by: Stefan Tauner \u003cstefan.tauner@alumni.tuwien.ac.at\u003e\nAcked-by: Urja Rannikko \u003curjaman@gmail.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c9c7e311397f90a732c03df540f984de782e2404",
      "old_mode": 33188,
      "old_path": "flashrom.c",
      "new_id": "113a05b46685d9e289abd65b5d6469a8abcf120f",
      "new_mode": 33188,
      "new_path": "flashrom.c"
    },
    {
      "type": "modify",
      "old_id": "0b9f6e5f9fa912020669211e08032186bc72ccd9",
      "old_mode": 33188,
      "old_path": "layout.c",
      "new_id": "d0394513874f526be88880cfbf69f36e33d12973",
      "new_mode": 33188,
      "new_path": "layout.c"
    },
    {
      "type": "modify",
      "old_id": "1361dd5a3c2f2ec5d85981e1f1cc8c425b3eac53",
      "old_mode": 33188,
      "old_path": "processor_enable.c",
      "new_id": "117aa1e797d168bba4d5460f492c910641a0c39f",
      "new_mode": 33188,
      "new_path": "processor_enable.c"
    }
  ]
}
