dmg: use pread
commit16cdf7ce1a53dcab75f5206a89bf98bb907a8b9e
authorChristoph Hellwig <hch@lst.de>
Wed, 12 May 2010 14:31:35 +0000 (12 16:31 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 17 May 2010 08:20:05 +0000 (17 10:20 +0200)
tree869bb47a2a5083a4246971a9a7efcd216162d71c
parentcd02a24b6112da50816a8021d97a2b26038f7190
dmg: use pread

Use pread instead of lseek + read in preparation of using the qemu
block API.  Note that dmg actually uses the implicit file offset
a lot in dmg_open, and we had to replace it with an offset variable.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/dmg.c