Skip destroyed pools in zpool import
This commit is contained in:
		
							parent
							
								
									4cd8ea7346
								
							
						
					
					
						commit
						897b81a1af
					
				
							
								
								
									
										3
									
								
								zpool.go
								
								
								
								
							
							
						
						
									
										3
									
								
								zpool.go
								
								
								
								
							| 
						 | 
				
			
			@ -376,6 +376,9 @@ func poolSearchImport(q string, searchpaths []string, guid bool) (name string,
 | 
			
		|||
			err = errPoolList
 | 
			
		||||
			return
 | 
			
		||||
		}
 | 
			
		||||
		if PoolState(C.get_zpool_state(tconfig)) == PoolStateDestroyed {
 | 
			
		||||
			continue // skip destroyed pools
 | 
			
		||||
		}
 | 
			
		||||
		if guid {
 | 
			
		||||
			sguid := fmt.Sprint(C.get_zpool_guid(tconfig))
 | 
			
		||||
			if q == sguid {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue