In macOS, lseek with SEEK_DATA behaves differently.
It seeks to the next data region even though offset is in the middle of
a data region. In addition, there may be many data regions without any
hole among them, like this: |---Data---|---Data---|
Because of this, qemu-img convert with raw images a
On 8 September 2018 at 15:15, Yan-Jie Wang wrote:
> In macOS, lseek with SEEK_DATA behaves differently.
> It seeks to the next data region even though offset is in the middle of
> a data region. In addition, there may be many data regions without any
> hole among them, like this: |---Data---|---Da
On 9/8/18 10:34 AM, Peter Maydell wrote:
On 8 September 2018 at 15:15, Yan-Jie Wang wrote:
In macOS, lseek with SEEK_DATA behaves differently.
It seeks to the next data region even though offset is in the middle of
a data region. In addition, there may be many data regions without any
hole amon
This is the program I used to check the behavior of SEEK_DATA and SEEK_HOLE.
#define _FILE_OFFSET_BITS 64
#define _LARGEFILE64_SOURCE 1
#include
#include
#include
#include
#include
#include
#include
#include
/*
* This function is suitable for macOS and Solaris' lseek behavior,
* since s