All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Abort cat command with ESC
@ 2008-02-14 20:37 Christian Franke
  2008-02-17 13:55 ` Robert Millan
  0 siblings, 1 reply; 2+ messages in thread
From: Christian Franke @ 2008-02-14 20:37 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

A minor feature addition.

2008-02-14  Christian Franke  <franke@computer.org>

	* commands/cat.c (grub_cmd_cat): Add break on
	GRUB_TERM_ESC key.



[-- Attachment #2: grub2-cat-abort.patch --]
[-- Type: text/x-patch, Size: 397 bytes --]

--- grub2.orig/commands/cat.c	2008-02-09 14:02:53.557039500 +0100
+++ grub2/commands/cat.c	2008-02-12 22:56:57.125000000 +0100
@@ -59,6 +59,12 @@ grub_cmd_cat (struct grub_arg_list *stat
 	      grub_setcolorstate (GRUB_TERM_COLOR_STANDARD);
 	    }
 	}
+
+      if (GRUB_TERM_ASCII_CHAR (grub_checkkey ()) == GRUB_TERM_ESC)
+	{
+	  grub_getkey ();
+	  break;
+	}
     }
 
   grub_putchar ('\n');

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-17 13:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-14 20:37 [PATCH] Abort cat command with ESC Christian Franke
2008-02-17 13:55 ` Robert Millan

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.