-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Implement various syscalls on Linux for systemd #1217
base: master
Are you sure you want to change the base?
Conversation
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
Co-authored-by: 48cf <[email protected]>
3e0bdce
to
640ca23
Compare
As mentioned on Discord, the clone patch is not ready for inclusion -- clone() needs to integrate with the pthreads code, otherwise things will break horribly with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for the clone() patch.
[[gnu::weak]] int sys_name_to_handle_at(int dirfd, const char *pathname, struct file_handle *handle, int *mount_id, int flags); | ||
[[gnu::weak]] int sys_splice(int in_fd, off_t *in_off, int out_fd, off_t *out_off, size_t size, unsigned int flags, size_t *out); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are Linux extensions, not POSIX. Do we still keep them in this header?
@@ -83,6 +84,12 @@ int sys_ioctl(int fd, unsigned long request, void *arg, int *result); | |||
|
|||
[[gnu::weak]] int sys_getifaddrs(struct ifaddrs **); | |||
|
|||
[[gnu::weak]] int sys_sendfile(int outfd, int infd, off_t *offset, size_t count, size_t *out); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sendfile()
returns ssize_t
, not size_t
. However, the value is always positive, so passing size_t *
is probably okay. I'm not sure how we handle this for other syscalls, but if it's consistent with other calls, it can stay like this.
The same applies to sys_splice()
.
No description provided.