summaryrefslogtreecommitdiff
path: root/blockdev.c
diff options
context:
space:
mode:
authorJeff Cody <jcody@redhat.com>2012-10-16 15:49:09 -0400
committerKevin Wolf <kwolf@redhat.com>2012-10-24 10:26:18 +0200
commitb1b1d783eabdb6ac4e4578b2c04b0c24483dce77 (patch)
tree93934cecb2a119298e7346ce8a34fd761936806b /blockdev.c
parenta616673dd1c2e00db5e3458d2ba4b6619b78876a (diff)
downloadqemu-b1b1d783eabdb6ac4e4578b2c04b0c24483dce77.tar.gz
block: make bdrv_find_backing_image compare canonical filenames
Currently, bdrv_find_backing_image compares bs->backing_file with what is passed in as a backing_file name. Mismatches may occur, however, when bs->backing_file and backing_file are not both absolute or relative. Use path_combine() to make sure any relative backing filenames are relative to the current image filename being searched, and then use realpath() to make all comparisons based on absolute filenames. If either backing_file or bs->backing_file is determine to be a protocol, then no filename normalization is performed. This also changes bdrv_find_backing_image to no longer be recursive, but iterative. Signed-off-by: Jeff Cody <jcody@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'blockdev.c')
0 files changed, 0 insertions, 0 deletions