)]}'
{
  "commit": "fa8354bd226617e2afcc45c27a74959c15291cc0",
  "tree": "ec15ea327bb0c1a48abf143fab45f1dace42fda0",
  "parents": [
    "e2462113b2003085ad16f15e1442ded64e2d9a29"
  ],
  "author": {
    "name": "Peter Wu",
    "email": "peter@lekensteyn.nl",
    "time": "Tue Jan 06 18:48:04 2015 +0100"
  },
  "committer": {
    "name": "Kevin Wolf",
    "email": "kwolf@redhat.com",
    "time": "Fri Feb 06 17:24:21 2015 +0100"
  },
  "message": "block/dmg: properly detect the UDIF trailer\n\nDMG files have a variable length with a UDIF trailer at the end of a\nfile. This UDIF trailer is essential as it describes the contents of\nthe image. At the moment however, the start of this trailer is almost\nalways incorrect as bdrv_getlength() returns a multiple of the block\nsize (rounded up). This results in a failure to recognize DMG files,\nresulting in Invalid argument (EINVAL) errors.\n\nAs there is no API to retrieve the real file size, look for the magic\nheader in the last two sectors to find the start of this 512-byte UDIF\ntrailer (the \"koly\" block).\n\nThe resource fork offset (\"info_begin\") has its offset adjusted as the\ninitial value of offset does not mean \"end of file\" anymore, but \"begin\nof UDIF trailer\".\n\n[Replaced error_set(errp, ERROR_CLASS_GENERIC_ERROR, ...) with\nerror_setg(errp, ...) as discussed with Peter.\n--Stefan]\n\nSigned-off-by: Peter Wu \u003cpeter@lekensteyn.nl\u003e\nReviewed-by: John Snow \u003cjsnow@redhat.com\u003e\nReviewed-by: Stefan Hajnoczi \u003cstefanha@redhat.com\u003e\nMessage-id: 1420566495-13284-2-git-send-email-peter@lekensteyn.nl\nSigned-off-by: Stefan Hajnoczi \u003cstefanha@redhat.com\u003e\nSigned-off-by: Kevin Wolf \u003ckwolf@redhat.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e455886d2bc3d7d3f363e0d95244cca96c7b1a1b",
      "old_mode": 33188,
      "old_path": "block/dmg.c",
      "new_id": "cdad28fe14c6c18856ddc05d607650b8ec63926c",
      "new_mode": 33188,
      "new_path": "block/dmg.c"
    }
  ]
}
