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

Missing mkdirat() function and syscall #1119

Closed
nyh opened this issue Jan 11, 2021 · 1 comment
Closed

Missing mkdirat() function and syscall #1119

nyh opened this issue Jan 11, 2021 · 1 comment

Comments

@nyh
Copy link
Contributor

nyh commented Jan 11, 2021

David smith reports on the mailing list:

I'm running my go application under OSv and I'm having an issue with the mkdir() syscall (as accessed in go via os.Mkdir()). The issue appears to be that OSv does not implement the mkdir() syscall. I've searched the documentation and tried reviewing the source, but I have not been able to confirm if this system API is implemented or not.
To recreate the issue, add the following lines to end of GoMain in the golang-example provided in the OSv repo:

err := os.Mkdir("/tmp/dstmp", 0700)
if err != nil {
fmt.Println("Failed to create temp dir:", err.Error())
}

The resulting output from building and running an image incorporating this revised app. is:

OSv v0.55.0-162-g55771e1f
eth0: 192.168.122.15
Booted up in 1009.46 ms
Cmdline: /go.so /hello.so
syscall(): unimplemented system call 234
Hello, 世界
Go version: go1.15.6
syscall(): unimplemented system call 258
Failed to create temp dir: mkdir /tmp/dstmp: function not implemented

System call 258 is actually SYS_mkdirat. We are missing a mkdirat() function (should be easy to implement based on similar *at() functions), and then mkdirat references in linux.cc and and libc/syscall_to_function.h to add the system call.

@wkozaczuk
Copy link
Collaborator

This has been addressed by a0761f8 improved by 09b8848.

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

2 participants