()
| 141 | |
| 142 | #[cfg(target_os = "macos")] |
| 143 | fn io_platform_uuid() -> Option<String> { |
| 144 | let output = std::process::Command::new("/usr/sbin/ioreg") |
| 145 | .args(["-rd1", "-c", "IOPlatformExpertDevice"]) |
| 146 | .output() |
| 147 | .ok()?; |
| 148 | if !output.status.success() { |
| 149 | return None; |
| 150 | } |
| 151 | parse_io_platform_uuid(&String::from_utf8_lossy(&output.stdout)) |
| 152 | } |
| 153 | |
| 154 | fn parse_io_platform_uuid(output: &str) -> Option<String> { |
| 155 | output.lines().find_map(|line| { |
no test coverage detected