()
| 2 | |
| 3 | #[cfg(all(target_os = "linux", feature = "fs", feature = "process"))] |
| 4 | fn main() -> rustix::io::Result<()> { |
| 5 | let mut args = std::env::args(); |
| 6 | if args.len() != 3 { |
| 7 | eprintln!("Usage: {} new_root put_old", args.next().unwrap()); |
| 8 | std::process::exit(1); |
| 9 | } |
| 10 | |
| 11 | let _argv0 = args.next().unwrap(); |
| 12 | let new_root = args.next().unwrap(); |
| 13 | let put_old = args.next().unwrap(); |
| 14 | |
| 15 | rustix::process::pivot_root(new_root, put_old)?; |
| 16 | |
| 17 | Ok(()) |
| 18 | } |
| 19 | |
| 20 | #[cfg(any( |
| 21 | not(target_os = "linux"), |
nothing calls this directly
no test coverage detected