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)
committerhyokeun <hyokeun.jeon@samsung.com>
Tue, 6 Sep 2016 06:55:35 +0000 (15:55 +0900)
commit29958f70ad0f579ba916034239d9609b26fa8b31
treee6cf5cf6660cfcaa230ae1d58806612084d60d97
parent9e86b34bed5890e5b81d07931aac5752c4b79efd
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