[libvirt] [PATCH v2 11/38] Introduce virStreamSkip

Michal Privoznik mprivozn at redhat.com
Mon May 15 09:06:40 UTC 2017


On 05/15/2017 10:56 AM, Daniel P. Berrange wrote:
> On Mon, May 15, 2017 at 10:54:03AM +0200, Michal Privoznik wrote:

> 
>> Now, question is whether we want signed or unsigned long long. I don't
>> have an opinion about that. On one hand, off_t is signed, but that's
>> because lseek() can seek backwards. We don't have that in our streams.
>> Yet. On the other hand, our streams are different to regular files. I
>> view them as a unidirectional pipe. With some extensions (e.g. sparse
>> messages). lseek() doesn't work over pipes, does it. But then again,
>> long long might be more future proof, if we will ever want to assign a
>> meaning to negative seeks.
> 
> I guess we might as well use signed long long - we aren't gaining anything
> by using unsigned long long, since the value will be truncated to signed
> long long when we use it with lseek().

Good point. I'll go with signed long long then.

Michal




More information about the libvir-list mailing list