migrate dep mount to nix
This commit is contained in:
		
							parent
							
								
									5e96269a07
								
							
						
					
					
						commit
						4174ac175b
					
				
							
								
								
									
										12
									
								
								src/main.rs
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								src/main.rs
									
									
									
									
									
								
							| @ -1,9 +1,9 @@ | ||||
| use std::fs::create_dir; | ||||
| use std::io::{Result, ErrorKind}; | ||||
| use std::fs::File; | ||||
| use sys_mount::{ | ||||
|     Mount, | ||||
|     MountFlags | ||||
| use nix::mount::{ | ||||
|     mount, | ||||
|     MsFlags | ||||
| }; | ||||
| 
 | ||||
| const PATH_MAX:u32 = 4096; | ||||
| @ -42,8 +42,6 @@ fn bind_ns_file(ns_file: String) -> Result<()> { | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| fn create_mount(ns_file: String) -> std::io::Result<Mount> { | ||||
|     Mount::builder() | ||||
|         .flags(MountFlags::BIND) | ||||
|         .mount(PROC_NS_DIR, ns_file) | ||||
| fn create_mount(ns_file: String) -> Result<()> { | ||||
|     Ok(mount::<str, str, str, str>(Some(PROC_NS_DIR), ns_file.as_str(), None, MsFlags::MS_BIND, None)?) | ||||
| } | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user