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

add sys_dup2 and sys_dup3 #53

Merged
merged 1 commit into from
May 31, 2024

Conversation

Josen-B
Copy link

@Josen-B Josen-B commented May 30, 2024

The current syscall_dup3 is actually syscall_dup2, change syscall_dup3 to syscall_dup2 and add syscall_dup3.

Copy link

@Azure-stars Azure-stars left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ctypes for axlibc shouldn't be public for doc checking. And types used in axstarry can be defined by itself.

@@ -7,6 +7,7 @@ use alloc::sync::Arc;
use alloc::vec;
use axerrno::AxError;
use axfs::api::{FileIOType, OpenFlags, SeekFrom};
use axlibc::ctypes;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Axlibc is the posix compatibility layer for Unikernel, and it don't update for a long time. The new type for syscall can be defined in axstarry/src/syscall_fs/ctype.rs

@@ -4,6 +4,8 @@ use axhal::{
};
use bitflags::*;
use core::panic;
/// a flag used in sys_dup3

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can wrap the flags as a full type for dup3 syscall in the next commit

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@Azure-stars Azure-stars merged commit cd24ded into Arceos-monolithic:main May 31, 2024
17 checks passed
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

Successfully merging this pull request may close these issues.

3 participants