| 
									
										
										
										
											2025-01-11 05:16:28 +08:00
										 |  |  | //go:build !linux
 | 
					
						
							| 
									
										
										
										
											2025-01-24 05:02:45 +08:00
										 |  |  | // +build !linux
 | 
					
						
							| 
									
										
										
										
											2025-01-11 05:16:28 +08:00
										 |  |  | 
 | 
					
						
							|  |  |  | package volumes | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | import "errors" | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-14 05:55:59 +08:00
										 |  |  | // BindFromChroot would open "path" inside of "root" using a chrooted
 | 
					
						
							| 
									
										
										
										
											2025-01-11 05:16:28 +08:00
										 |  |  | // subprocess that returns a descriptor, then would create a uniquely-named
 | 
					
						
							|  |  |  | // temporary directory or file under "tmp" and bind-mount the opened descriptor
 | 
					
						
							|  |  |  | // to it, returning the path of the temporary file or directory.  The caller
 | 
					
						
							|  |  |  | // would be responsible for unmounting and removing the temporary.  For now,
 | 
					
						
							|  |  |  | // this just returns an error because it is not implemented for this platform.
 | 
					
						
							| 
									
										
										
										
											2024-12-14 05:55:59 +08:00
										 |  |  | func BindFromChroot(root, path, tmp string) (string, error) { | 
					
						
							| 
									
										
										
										
											2025-01-11 05:16:28 +08:00
										 |  |  | 	return "", errors.New("not available on this system") | 
					
						
							|  |  |  | } |