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)
committerJunfeng Dong <junfeng.dong@intel.com>
Tue, 19 Nov 2013 10:57:38 +0000 (18:57 +0800)
commitf64aa1cf5d1e68fa474e45ba67c171e0c6188d02
treef31307ed16f52baaa60f2cae97defd9163305852
parentedc8516c6aa50c9826c479c3364870549062a943
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