Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get last os error when file access failed #31

Closed
templexxx opened this issue Nov 4, 2022 · 2 comments
Closed

get last os error when file access failed #31

templexxx opened this issue Nov 4, 2022 · 2 comments
Assignees

Comments

@templexxx
Copy link
Collaborator

Always get bad address in present.

I don't think it's the right errno return by this call, because what I've changed is open flags, flags is just a integer(immediate number), no address releated to it.

[2022-11-04T12:39:10Z WARN  omo::os::linux] failed to open (lines.txt, 533249, 438): IOError(Os { code: 14, kind: Uncategorized, message: "Bad address" })

There maybe something wrong with the I/O error handler.

#30

@templexxx
Copy link
Collaborator Author

after get right syscall return, I found:

[2022-11-05T06:58:10Z DEBUG omo::os::linux] open(lines.txt, 533249, 438) pc: 4563320
[2022-11-05T06:58:10Z WARN  omo::os::linux] failed to open (lines.txt, 533249, 438): IOError(Os { code: 2, kind: NotFound, message: "No such file or directory" })

this flags: 533249 (0x82301) causes No such file or directory error #32

@templexxx
Copy link
Collaborator Author

final implementaion:

  1. log with warn level if there is a syscall error
  2. return host's errno directly to the emulator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant