|  | @@ -31,6 +31,9 @@ FILE_LICENCE ( GPL2_OR_LATER );
 | 
		
	
		
			
			| 31 | 31 |  #include <ipxe/command.h>
 | 
		
	
		
			
			| 32 | 32 |  #include <ipxe/parseopt.h>
 | 
		
	
		
			
			| 33 | 33 |  #include <ipxe/settings.h>
 | 
		
	
		
			
			|  | 34 | +#include <ipxe/console.h>
 | 
		
	
		
			
			|  | 35 | +#include <ipxe/keys.h>
 | 
		
	
		
			
			|  | 36 | +#include <ipxe/process.h>
 | 
		
	
		
			
			| 34 | 37 |  #include <ipxe/nap.h>
 | 
		
	
		
			
			| 35 | 38 |  #include <ipxe/shell.h>
 | 
		
	
		
			
			| 36 | 39 |  
 | 
		
	
	
		
			
			|  | @@ -564,8 +567,12 @@ static int sleep_exec ( int argc, char **argv ) {
 | 
		
	
		
			
			| 564 | 567 |  	/* Delay for specified number of seconds */
 | 
		
	
		
			
			| 565 | 568 |  	start = currticks();
 | 
		
	
		
			
			| 566 | 569 |  	delay = ( seconds * TICKS_PER_SEC );
 | 
		
	
		
			
			| 567 |  | -	while ( ( currticks() - start ) <= delay )
 | 
		
	
		
			
			|  | 570 | +	while ( ( currticks() - start ) <= delay ) {
 | 
		
	
		
			
			|  | 571 | +		step();
 | 
		
	
		
			
			|  | 572 | +		if ( iskey() && ( getchar() == CTRL_C ) )
 | 
		
	
		
			
			|  | 573 | +			return -ECANCELED;
 | 
		
	
		
			
			| 568 | 574 |  		cpu_nap();
 | 
		
	
		
			
			|  | 575 | +	}
 | 
		
	
		
			
			| 569 | 576 |  
 | 
		
	
		
			
			| 570 | 577 |  	return 0;
 | 
		
	
		
			
			| 571 | 578 |  }
 |