block/raw_bsd: Employ error parameter
Propagate errors in raw_create rather than directly reporting and afterwards discarding them. Signed-off-by: Max Reitz <mreitz@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
		
							parent
							
								
									1fa5cc839a
								
							
						
					
					
						commit
						92f1deec31
					
				@ -140,8 +140,7 @@ static int raw_create(const char *filename, QEMUOptionParameter *options,
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
    ret = bdrv_create_file(filename, options, &local_err);
 | 
					    ret = bdrv_create_file(filename, options, &local_err);
 | 
				
			||||||
    if (error_is_set(&local_err)) {
 | 
					    if (error_is_set(&local_err)) {
 | 
				
			||||||
        qerror_report_err(local_err);
 | 
					        error_propagate(errp, local_err);
 | 
				
			||||||
        error_free(local_err);
 | 
					 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    return ret;
 | 
					    return ret;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user