Skip to content

Commit

Permalink
Stub for get_mount_points on unsupported targets
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Jan 7, 2024
1 parent 1a1f75e commit fd89ea5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/freedesktop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -808,6 +808,18 @@ fn get_mount_points() -> Result<Vec<MountPoint>, Error> {
Ok(result)
}

#[cfg(not(any(
target_os = "linux",
target_os = "dragonfly",
target_os = "freebsd",
target_os = "openbsd",
target_os = "netbsd"
)))]
fn get_mount_points() -> Result<Vec<MountPoint>, Error> {
// On platforms that don't have support yet, simply return no mount points
Ok(Vec::new())
}

#[cfg(test)]
mod tests {
use serial_test::serial;
Expand Down

0 comments on commit fd89ea5

Please sign in to comment.