Suport manual terminal geometry specification.
* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Save state in grub_ofconsole_terminfo_output. (grub_ofconsole_term): Use grub_terminfo_getwh. (grub_ofconsole_getwh): Removed. * grub-core/term/serial.c (grub_serial_getwh): Removed. (grub_serial_term): Use grub_terminfo_getwh. * grub-core/term/terminfo.c (grub_terminfo_getwh): New function. (options): New struct. (OPTION_*): New enum. (grub_cmd_terminfo): Transform into extcmd and handle new parameters. * include/grub/terminfo.h (grub_terminfo_output_state): New fields width and height. (grub_terminfo_getwh): New proto. * grub-core/lib/legacy_parse.c (grub_legacy_parse): Handle --lines.
This commit is contained in:
		
							parent
							
								
									1a8fed20ad
								
							
						
					
					
						commit
						a9cc5438a5
					
				
					 6 changed files with 119 additions and 89 deletions
				
			
		|  | @ -55,14 +55,6 @@ struct grub_serial_input_state | |||
|   struct grub_serial_port *port; | ||||
| }; | ||||
| 
 | ||||
| static grub_uint16_t | ||||
| grub_serial_getwh (struct grub_term_output *term __attribute__ ((unused))) | ||||
| { | ||||
|   const grub_uint8_t TEXT_WIDTH = 80; | ||||
|   const grub_uint8_t TEXT_HEIGHT = 24; | ||||
|   return (TEXT_WIDTH << 8) | TEXT_HEIGHT; | ||||
| } | ||||
| 
 | ||||
| static void  | ||||
| serial_put (grub_term_output_t term, const int c) | ||||
| { | ||||
|  | @ -89,7 +81,9 @@ struct grub_serial_output_state grub_serial_terminfo_output = | |||
|   { | ||||
|     .tinfo = | ||||
|     { | ||||
|       .put = serial_put | ||||
|       .put = serial_put, | ||||
|       .width = 80, | ||||
|       .height = 24 | ||||
|     } | ||||
|   }; | ||||
| 
 | ||||
|  | @ -107,7 +101,7 @@ static struct grub_term_output grub_serial_term_output = | |||
| { | ||||
|   .name = "serial", | ||||
|   .putchar = grub_terminfo_putchar, | ||||
|   .getwh = grub_serial_getwh, | ||||
|   .getwh = grub_terminfo_getwh, | ||||
|   .getxy = grub_terminfo_getxy, | ||||
|   .gotoxy = grub_terminfo_gotoxy, | ||||
|   .cls = grub_terminfo_cls, | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue