All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [RFT] [PATCH] Use call-method and not interpret for cursor-on/cursor-off
Date: Mon, 08 Feb 2010 12:22:36 +0100	[thread overview]
Message-ID: <4B6FF3FC.10003@gmail.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 99 bytes --]

This should make cursor-on/-off cleaner

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: cursor.diff --]
[-- Type: text/x-diff; name="cursor.diff", Size: 932 bytes --]

=== modified file 'term/ieee1275/ofconsole.c'
--- term/ieee1275/ofconsole.c	2010-01-22 19:42:02 +0000
+++ term/ieee1275/ofconsole.c	2010-02-08 11:06:56 +0000
@@ -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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 293 bytes --]

                 reply	other threads:[~2010-02-08 11:22 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B6FF3FC.10003@gmail.com \
    --to=phcoder@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.