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

Only lifs is shown when list usb disks on macOS #882

Open
ortolanph opened this issue Nov 30, 2022 · 8 comments
Open

Only lifs is shown when list usb disks on macOS #882

ortolanph opened this issue Nov 30, 2022 · 8 comments
Labels

Comments

@ortolanph
Copy link

When listing all known disks on macos, I only get lifs as a response. I needed FAT32 or exFAT.

@ortolanph ortolanph changed the title Only lifs is shown when list usb disks on #macos Only lifs is shown when list usb disks on macOS Nov 30, 2022
@GuillaumeGomez
Copy link
Owner

I'm sorry but if the information you gave, I have absolutely no idea what's wrong, what's expected, etc. Could you expand a bit?

@ortolanph
Copy link
Author

ortolanph commented Dec 2, 2022

In the code below:

use sysinfo::{System, SystemExt};

fn main() {
    let mut sys = System::new_all();

    sys.refresh_all();

    println!("=> disks:");
    for disk in sys.disks() {
        println!("{:?}", disk);
    }
}

It'll produce (on Windows System):

(...)
Disk("USB")[FS: ['F', 'A', 'T', '3', '2']][Type: Unknown(-1)][removable: yes] mounted on "E:\\": 59501772800/61509107712 B
(...)

On MacOS Darwin, the same code produces:

(...)
Disk("USB")[FS: ['L', 'I', 'F', 'S']][Type: Unknown(-1)][removable: yes] mounted on "/Volumes/myUSB": 59501772800/61509107712 B
(...)

All I wanted was FAT32 or EXFAT (or another) on the FileSystem on MacOS results.

I am using the following version;

[dependencies]
sysinfo = "0.26.7"

Did I explain it better?

@GuillaumeGomez
Copy link
Owner

Yes! Unfortunately, I'm only returning what mac is providing me. If you want to take a look into it, I retrieve this information here. Also, I don't know if mac supports FAT32 and EXFAT. Maybe it just has a limited support, hence the LIFS?

@ortolanph
Copy link
Author

From what I know about the Mac World (I am not a Mac User, more a Linux user that has to work with Windows), I can format my USB Stick to FAT32 or exFAT and the System gives me more two options (that more internal things). Well, I don't know how we can move on from here.

@GuillaumeGomez
Copy link
Owner

No idea either... If you can test it locally, then try to see how to get the actual FS name. But be warned that often, the answer is very disappointing. 😆

@ortolanph
Copy link
Author

I'll try to find something...

@ortolanph
Copy link
Author

Hi there! I know that it could be a long long time since we talked. I would like to know in macOS the lib is still returning LIFS. Could you confirm that? I know that the lib evolved, but I'm unaware of the modifications.

@GuillaumeGomez
Copy link
Owner

No idea. You can still try to take a look directly, would very likely be much faster.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants