Use call-method and not interpret for cursor-on/cursor-off
PATCH 1/1 Use call-method and not interpret for cursor-on/cursor-off
This should make cursor-on/-off cleaner
Signature · 2 lines
Regards Vladimir 'φ-coder/phcoder' Serbinenko
=== modified file 'term/ieee1275/ofconsole.c'
ieee1275/ofconsole.c +18 -2
@@ -322,10 +322,26 @@ grub_ofconsole_setcursor (int on) {/* Understood by the Open Firmware flavour in OLPC. */ + +struct cursor_args + { +struct grub_ieee1275_common_hdr common; +grub_ieee1275_cell_t method; +grub_ieee1275_cell_t device; +grub_ieee1275_cell_t catch_result; + } + args; +int status; + +INIT_IEEE1275_COMMON (&args.common,"call-method" ,2 ,1 ); + args.device = (grub_ieee1275_cell_t ) stdout_ihandle; +if (on) -grub_ieee1275_interpret ("cursor-on" ,0 ); + args.method = (grub_ieee1275_cell_t )"cursor-on" ;else -grub_ieee1275_interpret ("cursor-off" ,0 ); + args.method = (grub_ieee1275_cell_t )"cursor-off" ; + + status =IEEE1275_CALL_ENTRY_FN (&args); } static void