blkdebug: Initialize state as 1
state = 0 in rules means that the rule is valid for any state. Therefore it's impossible to have a rule that works only in the initial state. This changes the initial state from 0 to 1 to make this possible. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
		
							parent
							
								
									698f0d52cd
								
							
						
					
					
						commit
						8db520cee8
					
				@ -301,6 +301,9 @@ static int blkdebug_open(BlockDriverState *bs, const char *filename, int flags)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    filename = c + 1;
 | 
					    filename = c + 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /* Set initial state */
 | 
				
			||||||
 | 
					    s->vars.state = 1;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Open the backing file */
 | 
					    /* Open the backing file */
 | 
				
			||||||
    ret = bdrv_file_open(&bs->file, filename, flags);
 | 
					    ret = bdrv_file_open(&bs->file, filename, flags);
 | 
				
			||||||
    if (ret < 0) {
 | 
					    if (ret < 0) {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user