On 6/6/23 12:29, Ilya Leoshkevich wrote:
The only concrete objection I have is the change of API, which could
be fixed with return
get_errno(openat(...)).
I believe both openat() and safe_openat() return -1 on error and set
errno, or am I missing something?
Oops, no, bad memory on my part --
On Tue, 2023-06-06 at 11:24 -0700, Richard Henderson wrote:
> On 6/6/23 06:27, Ilya Leoshkevich wrote:
> > @@ -8518,7 +8522,11 @@ int do_guest_openat(CPUArchState *cpu_env,
> > int dirfd, const char *pathname,
> > return fd;
> > }
> >
> > - return safe_openat(dirfd,
On 6/6/23 06:27, Ilya Leoshkevich wrote:
@@ -8518,7 +8522,11 @@ int do_guest_openat(CPUArchState *cpu_env, int dirfd,
const char *pathname,
return fd;
}
-return safe_openat(dirfd, path(pathname), flags, mode);
+if (safe) {
+return safe_openat(dirfd,
gdbstub cannot meaningfully handle QEMU_ERESTARTSYS, and it doesn't
need to. Add a parameter to do_guest_openat() that makes it use
openat() instead of safe_openat(), so that it becomes usable from
gdbstub.
Signed-off-by: Ilya Leoshkevich
---
linux-user/qemu.h| 2 +-
linux-user/syscall.c |