linux-user: lseek: explicitly cast non-set offsets to signed
authorAlexander Graf <agraf@suse.de>
Thu, 13 Dec 2012 13:29:22 +0000 (14:29 +0100)
committerChanho Park <parkch98@gmail.com>
Tue, 9 Sep 2014 02:32:52 +0000 (11:32 +0900)
commit4381fa980d140454c3432c591386cb48e36096d3
tree58c15c66f140c9e6fff90601b57efdf8818ca7ce
parent55974d4975a4025df4ad3e70b4824c0fed6dd9b2
linux-user: lseek: explicitly cast non-set offsets to signed

When doing lseek, SEEK_SET indicates that the offset is an unsigned variable.
Other seek types have parameters that can be negative.

When converting from 32bit to 64bit parameters, we need to take this into
account and enable SEEK_END and SEEK_CUR to be negative, while SEEK_SET stays
absolute positioned which we need to maintain as unsigned.

Signed-off-by: Alexander Graf <agraf@suse.de>
linux-user/syscall.c