Skip to content

Conversation

@akitaSummer
Copy link
Contributor

No description provided.

@imeoer
Copy link
Collaborator

imeoer commented Jan 15, 2024

@akitaSummer Some CI tests failed, PTAL. :)

Signed-off-by: akitaSummer <644171127@qq.com>
Signed-off-by: akitaSummer <644171127@qq.com>
Signed-off-by: akitaSummer <644171127@qq.com>
Signed-off-by: akitaSummer <644171127@qq.com>
@akitaSummer
Copy link
Contributor Author

@imeoer Please help me try CI again

@akitaSummer akitaSummer force-pushed the macos_passthrough branch 2 times, most recently from 92e4739 to fe23c44 Compare January 16, 2024 02:41
Copy link
Collaborator

@WeiZhang555 WeiZhang555 left a comment

Choose a reason for hiding this comment

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

There're lots of #[cfg(target_os = "macos")] here and there, spreading all across several files, is that possible to split them to different files?

Similar to

src/abi/
  |- fuse_abi_linux.rs
  |- fuse_abi_macos.rs

There should be a balance between code readability and code redundancy.

@akitaSummer akitaSummer force-pushed the macos_passthrough branch 2 times, most recently from e1ceb1d to 2318011 Compare January 20, 2024 17:13
Signed-off-by: akitaSummer <644171127@qq.com>
Copy link
Collaborator

@WeiZhang555 WeiZhang555 left a comment

Choose a reason for hiding this comment

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

Some comments, most part LGTM.

I'm not familiar with MacOS apis, it's better to involve more maintainers to do double check.

#[cfg(target_os = "macos")]
use nix::unistd::getuid;
use std::ffi::CString;
#[cfg(target_os = "macos")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Modification to this files seems unnecessary.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

Copy link
Collaborator

Choose a reason for hiding this comment

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

getuid and Read was never used even on macos platform, so I think you can remove these two lines safely:

use nix::unistd::getuid;
use std::io::Read;

Signed-off-by: akitaSummer <akitasummer@outlook.com>
#[cfg(target_os = "macos")]
use nix::unistd::getuid;
use std::ffi::CString;
#[cfg(target_os = "macos")]
Copy link
Collaborator

Choose a reason for hiding this comment

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

getuid and Read was never used even on macos platform, so I think you can remove these two lines safely:

use nix::unistd::getuid;
use std::io::Read;

@@ -0,0 +1,40 @@
use std::{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing lisence header.

@@ -0,0 +1,137 @@
use std::{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing lisence header

@@ -0,0 +1,120 @@
use std::{
Copy link
Collaborator

Choose a reason for hiding this comment

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

Missing lisence header.

@akitaSummer akitaSummer force-pushed the macos_passthrough branch 2 times, most recently from 8aba2cd to e4980d0 Compare February 17, 2024 15:12
Signed-off-by: akitaSummer <akitasummer@outlook.com>
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