From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1K1dCz-0008Ef-Na for mharc-grub-devel@gnu.org; Thu, 29 May 2008 04:10:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1K1dCx-0008CT-Pw for grub-devel@gnu.org; Thu, 29 May 2008 04:09:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1K1dCw-0008Aa-1P for grub-devel@gnu.org; Thu, 29 May 2008 04:09:59 -0400 Received: from [199.232.76.173] (port=33333 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1K1dCv-0008AO-O5 for grub-devel@gnu.org; Thu, 29 May 2008 04:09:57 -0400 Received: from ti-out-0910.google.com ([209.85.142.191]:30732) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1K1dCv-00041T-1f for grub-devel@gnu.org; Thu, 29 May 2008 04:09:57 -0400 Received: by ti-out-0910.google.com with SMTP id u5so3355952tia.10 for ; Thu, 29 May 2008 01:09:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; bh=rurfARM8F4NrHnJ+iDrOh04wkeyPa2nKPLFbXpBlnAw=; b=r3lRavkheHx6KsxzrFz2N2llpnE3ol5woY3Cwy02uJog1Jk+H6GhUvnM/QC9g4O1Iy5C+lRPdmlBu4NN15lzP1jZsUyd7V+1Uh9m6NmwCAKtZrg4Iw0TCrJgX/2DR5eQxpSU9JhZyGJKTm2YrptOvzE8uCL7wbag5OIpuJgkcrg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=A10hPzyZ5WMK0aNb7Ngv/e7NUU66EYDO2+pS0ytNBOTRBAIG7Mf/FmKrbwgasVlGnx+4i0eH03ogznqZ30+c9n0jDCgHfcXIH56ZrZczgYcqzk1a2T2RTondtKUMtePuEIIDTdfUZby6E3SKjsC5xQ44w90Lvdm71vCBF+W2Xmo= Received: by 10.110.3.8 with SMTP id 8mr511457tic.11.1212048594846; Thu, 29 May 2008 01:09:54 -0700 (PDT) Received: by 10.110.16.5 with HTTP; Thu, 29 May 2008 01:09:54 -0700 (PDT) Message-ID: Date: Thu, 29 May 2008 16:09:54 +0800 From: Bean To: "The development of GRUB 2" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) Subject: Sugguestion: separate input and output driver 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, 29 May 2008 08:10:00 -0000 Currently, input and output are bundled together, this make it quite difficult to extend. Input: Keyboard, Serial Output: Text mode, Video mode Now, the binding is fixed using individual module: Keyboard + Text = console Keyboard + Video = gfxterm Serial + Text = serial Serial + Video = ? And there are mixing as well. If we separate them, it would make things much clear. For example, the grub_term structure can be split into two mutually exclusive parts: struct grub_term = { .name, .init, .fini, .putchar, .getcharwidth, .checkkey, .getkey, .getwh, .getxy, .gotoxy, .cls, .setcolorstate, .setcursor, .flags, .next }; => struct grub_input { .name, .init, .fini, .checkkey, .getkey .flags, .next } + struct grub_output { .name, .init, .fini, .putchar, .getcharwidth, .getxy, .gotoxy, .cls, .setcolorstate, .setcursor, .flags, .next } Integration between input and output: Input driver <=> console driver <=> Output driver The console driver is the central part. It accepts virtual key from the input driver, and write to the virtual screen provided by output driver. -- Bean