]> git.proxmox.com Git - mirror_qemu.git/commit - block/file-win32.c
block: Open the underlying image file in generic code
authorKevin Wolf <kwolf@redhat.com>
Wed, 14 Apr 2010 12:17:38 +0000 (14:17 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 3 May 2010 08:07:30 +0000 (10:07 +0200)
commit66f82ceed6781261c09e65fb440ca76842fd0500
tree138160d48093543a87d4db02b94267d564e2d258
parent579153325158d944be544ced96c6218e7d48802a
block: Open the underlying image file in generic code

Format drivers shouldn't need to bother with things like file names, but rather
just get an open BlockDriverState for the underlying protocol. This patch
introduces this behaviour for bdrv_open implementation. For protocols which
need to access the filename to open their file/device/connection/... a new
callback bdrv_file_open is introduced which doesn't get an underlying file
opened.

For now, also some of the more obscure formats use bdrv_file_open because they
open() the file themselves instead of using the block.c functions. They need to
be fixed in later patches.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
23 files changed:
block.c
block/blkdebug.c
block/bochs.c
block/cloop.c
block/cow.c
block/curl.c
block/dmg.c
block/nbd.c
block/parallels.c
block/qcow.c
block/qcow2-cluster.c
block/qcow2-refcount.c
block/qcow2-snapshot.c
block/qcow2.c
block/qcow2.h
block/raw-posix.c
block/raw-win32.c
block/raw.c
block/vdi.c
block/vmdk.c
block/vpc.c
block/vvfat.c
block_int.h