Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MU7MQ-0001VZ-Km for mharc-grub-devel@gnu.org; Thu, 23 Jul 2009 19:06:02 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MU7MQ-0001VB-2S for grub-devel@gnu.org; Thu, 23 Jul 2009 19:06:02 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MU7MK-0001R6-Nl for grub-devel@gnu.org; Thu, 23 Jul 2009 19:06:00 -0400 Received: from [199.232.76.173] (port=49782 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MU7MK-0001R3-Ia for grub-devel@gnu.org; Thu, 23 Jul 2009 19:05:56 -0400 Received: from mail-gx0-f219.google.com ([209.85.217.219]:58818) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MU7MJ-0004oc-Sr for grub-devel@gnu.org; Thu, 23 Jul 2009 19:05:56 -0400 Received: by gxk19 with SMTP id 19so2286439gxk.18 for ; Thu, 23 Jul 2009 16:05:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:received:message-id :from:to:in-reply-to:content-type:mime-version:subject:date :references:x-mailer; bh=96aXQ+foW++7rv+D5St7d3Ht4wLkCDKtPKaPGQ5C4fk=; b=sRcbdXyZkHN1ylj6UVV/NTcMPh3Wvbg4IsHGFaTrpvHjVhe8ndKFzU48i4+S3SBBGy YpkcWdxL78xyZiK8MtKL4cchf53lonc4arC7KotEH1TchPFr5fqZuNsGBKUOohsMnGIE J+5CrqZLDS0Yghd5BC17oJg16F49CKCPghZzU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:from:to:in-reply-to:content-type:mime-version :subject:date:references:x-mailer; b=KA7XOkqrPjZu/p5p9HWQJDmx4a4EHNh5c7+ba6yzQSIOyyh55AQJzenllxiiFxAwSI vfdq0MGYtvMEQVFN744hkonc6uONB4fUDxNljvFv7e4UXMH4Rvx02iYFweatUgcvlvJW AzHRxtQd6e5T/101TAJmmx3YsDCdTtsGim3Ek= Received: by 10.90.81.9 with SMTP id e9mr2268681agb.51.1248390354181; Thu, 23 Jul 2009 16:05:54 -0700 (PDT) Received: from mail.definitelynotsafe.com (cpe-66-75-249-204.san.res.rr.com [66.75.249.204]) by mx.google.com with ESMTPS id 40sm6901708aga.38.2009.07.23.16.05.53 (version=TLSv1/SSLv3 cipher=RC4-MD5); Thu, 23 Jul 2009 16:05:53 -0700 (PDT) Sender: Joe Auricchio Received: from [10.24.0.125] (unknown [10.24.0.1]) (Authenticated sender: jauricch) by mail.definitelynotsafe.com (Postfix) with ESMTPSA id 7BD5F176E7 for ; Thu, 23 Jul 2009 16:05:01 -0700 (PDT) Message-Id: From: Joe Auricchio To: The development of GRUB 2 In-Reply-To: <1248388931.2661.155.camel@mj> Content-Type: multipart/mixed; boundary=Apple-Mail-4--499838719 Mime-Version: 1.0 (Apple Message framework v935.3) Date: Thu, 23 Jul 2009 16:05:00 -0700 References: <4F38CAFF-C240-46FC-84BA-D3B96872B3E3@gmail.com> <1248388931.2661.155.camel@mj> X-Mailer: Apple Mail (2.935.3) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [PATCH 2/2] Alias cls as clear X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jul 2009 23:06:02 -0000 --Apple-Mail-4--499838719 Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit On 23 Jul, 2009, at 15:42 , Pavel Roskin wrote: > On Wed, 2009-07-22 at 22:08 -0700, Joe Auricchio wrote: >> * commands/minicmd.c: Add clear as alias for cls. >> >> My background is in Unix, so 'clear' comes much more naturally to my >> fingers than 'cls'. But it's bad to clutter grub with too many >> commands. >> So I leave this to the maintainers: do we add both commands, only >> one, >> or >> neither? > > Let's have "clear" only, as it's more clear :-) > > Please include the ChangeLog entry. How's this? -joe --Apple-Mail-4--499838719 Content-Disposition: attachment; filename=add_clear_command.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="add_clear_command.patch" Content-Transfer-Encoding: 7bit Index: grub2/commands/minicmd.c =================================================================== --- grub2.orig/commands/minicmd.c 2009-07-23 16:02:58.000000000 -0700 +++ grub2/commands/minicmd.c 2009-07-23 16:03:28.000000000 -0700 @@ -336,8 +336,19 @@ return 0; } +/* clear */ +static grub_err_t +grub_mini_cmd_clear (struct grub_command *cmd __attribute__ ((unused)), + int argc __attribute__ ((unused)), + char *argv[] __attribute__ ((unused))) +{ + grub_cls (); + return 0; +} + static grub_command_t cmd_cat, cmd_help, cmd_root; static grub_command_t cmd_dump, cmd_rmmod, cmd_lsmod, cmd_exit; +static grub_command_t cmd_clear; GRUB_MOD_INIT(minicmd) { @@ -362,6 +373,9 @@ cmd_exit = grub_register_command ("exit", grub_mini_cmd_exit, 0, "exit from GRUB"); + cmd_clear = + grub_register_command ("clear", grub_mini_cmd_clear, + 0, "clear the screen"); } GRUB_MOD_FINI(minicmd) @@ -373,4 +387,5 @@ grub_unregister_command (cmd_rmmod); grub_unregister_command (cmd_lsmod); grub_unregister_command (cmd_exit); + grub_unregister_command (cmd_clear); } Index: grub2/ChangeLog =================================================================== --- grub2.orig/ChangeLog 2009-07-23 16:02:58.000000000 -0700 +++ grub2/ChangeLog 2009-07-23 16:03:17.000000000 -0700 @@ -1,3 +1,7 @@ +2009-07-23 Joe Auricchio + + * commands/minicmd.c: Add clear command. + 2009-07-23 Pavel Roskin * include/grub/misc.h (ALIGN_UP): Cast align to the type of addr --Apple-Mail-4--499838719--