* [Qemu-devel] [patch] Make _sysctl less broken
@ 2004-09-11 18:48 Paul Brook
2004-09-13 21:22 ` Fabrice Bellard
0 siblings, 1 reply; 2+ messages in thread
From: Paul Brook @ 2004-09-11 18:48 UTC (permalink / raw)
To: qemu-devel
Qemu doesn't currently implement the _sysctl linux syscall, and complains
loudly when it is used.
For some reason my Debian arm-linux chroot calls this syscall extensively, and
the "Unsupported syscall" errors were causing problems.
The patch below makes it always return ENOTDIR. The sysctl names vary between
kernel versions, so user applications should already gracefully accept this.
Paul
Index: syscall.c
===================================================================
RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v
retrieving revision 1.50
diff -u -p -r1.50 syscall.c
--- syscall.c 19 Jun 2004 16:59:03 -0000 1.50
+++ syscall.c 11 Sep 2004 18:35:28 -0000
@@ -2600,7 +2624,9 @@ long do_syscall(void *cpu_env, int num,
ret = get_errno(fdatasync(arg1));
break;
case TARGET_NR__sysctl:
- goto unimplemented;
+ /* We don't implement this, but ENODIR is always a safe
+ return value. */
+ return -ENOTDIR;
case TARGET_NR_sched_setparam:
{
struct sched_param *target_schp = (void *)arg2;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [patch] Make _sysctl less broken
2004-09-11 18:48 [Qemu-devel] [patch] Make _sysctl less broken Paul Brook
@ 2004-09-13 21:22 ` Fabrice Bellard
0 siblings, 0 replies; 2+ messages in thread
From: Fabrice Bellard @ 2004-09-13 21:22 UTC (permalink / raw)
To: qemu-devel
Applied.
Fabrice.
Paul Brook wrote:
> Qemu doesn't currently implement the _sysctl linux syscall, and complains
> loudly when it is used.
>
> For some reason my Debian arm-linux chroot calls this syscall extensively, and
> the "Unsupported syscall" errors were causing problems.
>
> The patch below makes it always return ENOTDIR. The sysctl names vary between
> kernel versions, so user applications should already gracefully accept this.
>
> Paul
>
> Index: syscall.c
> ===================================================================
> RCS file: /cvsroot/qemu/qemu/linux-user/syscall.c,v
> retrieving revision 1.50
> diff -u -p -r1.50 syscall.c
> --- syscall.c 19 Jun 2004 16:59:03 -0000 1.50
> +++ syscall.c 11 Sep 2004 18:35:28 -0000
> @@ -2600,7 +2624,9 @@ long do_syscall(void *cpu_env, int num,
> ret = get_errno(fdatasync(arg1));
> break;
> case TARGET_NR__sysctl:
> - goto unimplemented;
> + /* We don't implement this, but ENODIR is always a safe
> + return value. */
> + return -ENOTDIR;
> case TARGET_NR_sched_setparam:
> {
> struct sched_param *target_schp = (void *)arg2;
>
>
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-09-13 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-11 18:48 [Qemu-devel] [patch] Make _sysctl less broken Paul Brook
2004-09-13 21:22 ` Fabrice Bellard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).