block: Respect underlying file's EOF
commit59c9a95fd29cfb3296ee58e8a446df251d14a459
authorMax Reitz <mreitz@redhat.com>
Wed, 22 Oct 2014 15:00:15 +0000 (22 17:00 +0200)
committerKevin Wolf <kwolf@redhat.com>
Thu, 23 Oct 2014 13:34:02 +0000 (23 15:34 +0200)
tree9c517349fef109279af42b95d66ae6c699ae3941
parent7f75a07d50710e7f1371c4b248e0550549f77ead
block: Respect underlying file's EOF

When falling through to the underlying file in
bdrv_co_get_block_status(), if it returns that the query offset is
beyond the file end (by setting *pnum to 0), return the range to be
zero and do not let the number of sectors for which information could be
obtained be overwritten.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block.c