diff options
author | Kir Kolyshkin <kir@openvz.org> | 2016-12-17 14:21:56 +0300 |
---|---|---|
committer | Andrei Vagin <avagin@virtuozzo.com> | 2017-03-15 00:09:54 +0300 |
commit | 1be75af874aba6515167462b69741309dd1dd2a6 (patch) | |
tree | e894f1a74248de3bb8dffd070c1ecd932d2e3389 /compel/arch | |
parent | 7d181cda7376a0ea97fecd9e5376aa09cd1e19ef (diff) |
compel_syscall(): make ret argument signed
I saw this line in the code
unsigned long sret = -ENOSYS;
and ended up with this patch. Note syscall(2) man page says return value
is long -- who am I to disagree?
travis-ci: success for More polishing for compel cli
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Acked-by: Cyrill Gorcunov <gorcunov@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
Diffstat (limited to 'compel/arch')
-rw-r--r-- | compel/arch/aarch64/src/lib/infect.c | 4 | ||||
-rw-r--r-- | compel/arch/arm/src/lib/infect.c | 4 | ||||
-rw-r--r-- | compel/arch/ppc64/src/lib/infect.c | 4 | ||||
-rw-r--r-- | compel/arch/x86/src/lib/infect.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/compel/arch/aarch64/src/lib/infect.c b/compel/arch/aarch64/src/lib/infect.c index ee1ec7c20..4f5534b75 100644 --- a/compel/arch/aarch64/src/lib/infect.c +++ b/compel/arch/aarch64/src/lib/infect.c @@ -83,7 +83,7 @@ err: return ret; } -int compel_syscall(struct parasite_ctl *ctl, int nr, unsigned long *ret, +int compel_syscall(struct parasite_ctl *ctl, int nr, long *ret, unsigned long arg1, unsigned long arg2, unsigned long arg3, @@ -114,7 +114,7 @@ void *remote_mmap(struct parasite_ctl *ctl, void *addr, size_t length, int prot, int flags, int fd, off_t offset) { - unsigned long map; + long map; int err; err = compel_syscall(ctl, __NR_mmap, &map, diff --git a/compel/arch/arm/src/lib/infect.c b/compel/arch/arm/src/lib/infect.c index 61377691a..ad085ff98 100644 --- a/compel/arch/arm/src/lib/infect.c +++ b/compel/arch/arm/src/lib/infect.c @@ -99,7 +99,7 @@ err: return ret; } -int compel_syscall(struct parasite_ctl *ctl, int nr, unsigned long *ret, +int compel_syscall(struct parasite_ctl *ctl, int nr, long *ret, unsigned long arg1, unsigned long arg2, unsigned long arg3, @@ -128,7 +128,7 @@ void *remote_mmap(struct parasite_ctl *ctl, void *addr, size_t length, int prot, int flags, int fd, off_t offset) { - unsigned long map; + long map; int err; if (offset & ~PAGE_MASK) diff --git a/compel/arch/ppc64/src/lib/infect.c b/compel/arch/ppc64/src/lib/infect.c index 637c3654e..11154d658 100644 --- a/compel/arch/ppc64/src/lib/infect.c +++ b/compel/arch/ppc64/src/lib/infect.c @@ -381,7 +381,7 @@ int get_task_regs(pid_t pid, user_regs_struct_t regs, save_regs_t save, void *ar return save(arg, ®s, &fpregs); } -int compel_syscall(struct parasite_ctl *ctl, int nr, unsigned long *ret, +int compel_syscall(struct parasite_ctl *ctl, int nr, long *ret, unsigned long arg1, unsigned long arg2, unsigned long arg3, @@ -410,7 +410,7 @@ void *remote_mmap(struct parasite_ctl *ctl, void *addr, size_t length, int prot, int flags, int fd, off_t offset) { - unsigned long map = 0; + long map = 0; int err; err = compel_syscall(ctl, __NR_mmap, &map, diff --git a/compel/arch/x86/src/lib/infect.c b/compel/arch/x86/src/lib/infect.c index be0439917..9a3b1fb75 100644 --- a/compel/arch/x86/src/lib/infect.c +++ b/compel/arch/x86/src/lib/infect.c @@ -195,7 +195,7 @@ err: return ret; } -int compel_syscall(struct parasite_ctl *ctl, int nr, unsigned long *ret, +int compel_syscall(struct parasite_ctl *ctl, int nr, long *ret, unsigned long arg1, unsigned long arg2, unsigned long arg3, @@ -240,7 +240,7 @@ void *remote_mmap(struct parasite_ctl *ctl, void *addr, size_t length, int prot, int flags, int fd, off_t offset) { - unsigned long map; + long map; int err; bool compat_task = !user_regs_native(&ctl->orig.regs); |