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

实现pty,附带测试程序 #685

Merged
merged 5 commits into from
Apr 4, 2024

Conversation

GnoCiYeH
Copy link
Member

@GnoCiYeH GnoCiYeH commented Apr 2, 2024

实现pty功能,能够创建pty对进行通信

@dragonosbot
Copy link

r? @fslongjin

dragonosbot has assigned @fslongjin.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@dragonosbot dragonosbot added A-fs Area: 文件系统 S-等待审查 Status: 等待assignee以及相关方的审查。 T-driver Relevant to the driver team, which will review and decide on the PR/issue. labels Apr 2, 2024
@dragonosbot
Copy link

设备驱动模型部分发生了更改,请进行审查

cc @fslongjin

pub fn saved_termios(&self) -> &Vec<Termios> {
&self.saved_termios
}

#[inline]
pub fn flags(&self) -> TtyDriverFlag {
self.flags
}

#[inline]
fn lockup_tty(&self, index: usize) -> Option<Arc<TtyCore>> {
Copy link
Member

Choose a reason for hiding this comment

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

哈哈,这里有个错别字,应当是lookup


pub mod unix98pty;

lazy_static! {
Copy link
Member

Choose a reason for hiding this comment

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

这两个最好使用unified_init来初始化,使得它初始化时机更为确定,减少未来调试的难度。

@@ -536,8 +585,8 @@ pub fn tty_init() -> Result<(), SystemError> {
// 将这两个设备注册到devfs,TODO:这里console设备应该与tty在一个设备group里面
device_register(tty.clone())?;
device_register(console.clone())?;
devfs_register(tty.name, tty)?;
devfs_register(console.name, console)?;
devfs_register(&tty.name.clone(), tty)?;
Copy link
Member

Choose a reason for hiding this comment

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

这里应该不用clone吧。

@dragonosbot dragonosbot added S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 and removed S-等待审查 Status: 等待assignee以及相关方的审查。 labels Apr 4, 2024
@fslongjin
Copy link
Member

issue: #641

@dragonosbot dragonosbot added the T-virtulization Relevant to the virtulization team, which will review and decide on the PR/issue. label Apr 4, 2024
@fslongjin
Copy link
Member

image
在sysfs目录下的结构不正确。

参考linux:
image

这个咱们开个新的issue发布任务吧。

@fslongjin fslongjin merged commit dfe53cf into DragonOS-Community:master Apr 4, 2024
1 check passed
@fslongjin
Copy link
Member

#581

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-fs Area: 文件系统 S-等待作者修改 Status: 这正在等待作者的一些操作(例如代码更改或更多信息)。 T-driver Relevant to the driver team, which will review and decide on the PR/issue. T-virtulization Relevant to the virtulization team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants