Re: [PATCH v2 11/38] Introduce virStreamSkip

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux