Re: [Qemu-devel] [PATCH 1/2] raw-posix: Fix raw_co_get_block_status() after EOF

2014-10-10 Thread Benoît Canet
The Monday 22 Sep 2014 à 17:23:44 (+0200), Max Reitz wrote : > As its comment states, raw_co_get_block_status() should unconditionally > return 0 and set *pnum to 0 for after EOF. > > An assertion after lseek(..., SEEK_HOLE) tried to catch this case by > asserting that errno != -ENXIO (which would

[Qemu-devel] [PATCH 1/2] raw-posix: Fix raw_co_get_block_status() after EOF

2014-09-22 Thread Max Reitz
As its comment states, raw_co_get_block_status() should unconditionally return 0 and set *pnum to 0 for after EOF. An assertion after lseek(..., SEEK_HOLE) tried to catch this case by asserting that errno != -ENXIO (which would indicate a position after the EOF); but it should be errno != ENXIO in