]> git.proxmox.com Git - mirror_qemu.git/commit - block/raw-posix.c
block: Unlink temporary files in raw-posix/win32
authorKevin Wolf <kwolf@redhat.com>
Fri, 11 Apr 2014 17:16:36 +0000 (19:16 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 30 Apr 2014 09:05:00 +0000 (11:05 +0200)
commit8bfea15ddac3a0ae832f181653c36e020f24f007
treea099d37af1dd602f2a8a41a4866f4e6f6ce02043
parent5669b44de5b3b607a3a4749e0c8c5ddfd723e76b
block: Unlink temporary files in raw-posix/win32

Instead of having unlink() calls in the generic block layer, where we
aren't even guarateed to have a file name, move them to those block
drivers that are actually used and that always have a filename. Gets us
rid of some #ifdefs as well.

The patch also converts bs->is_temporary to a new BDRV_O_TEMPORARY open
flag so that it is inherited in the protocol layer and the raw-posix and
raw-win32 drivers can unlink the file.

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
block.c
block/raw-posix.c
block/raw-win32.c
include/block/block.h
include/block/block_int.h