From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1NCVCk-0007fj-6a for mharc-grub-devel@gnu.org; Mon, 23 Nov 2009 04:27:30 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NCVCh-0007fJ-M9 for grub-devel@gnu.org; Mon, 23 Nov 2009 04:27:27 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NCVCd-0007dl-2w for grub-devel@gnu.org; Mon, 23 Nov 2009 04:27:27 -0500 Received: from [199.232.76.173] (port=45520 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NCVCc-0007df-U2 for grub-devel@gnu.org; Mon, 23 Nov 2009 04:27:22 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:54958 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NCVCc-0007ui-C8 for grub-devel@gnu.org; Mon, 23 Nov 2009 04:27:22 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1NCVCZ-0000bN-S5 for grub-devel@gnu.org; Mon, 23 Nov 2009 10:27:20 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1NCVCZ-0006gz-BP for grub-devel@gnu.org; Mon, 23 Nov 2009 10:27:19 +0100 Date: Mon, 23 Nov 2009 10:27:19 +0100 From: Robert Millan To: The development of GNU GRUB Message-ID: <20091123092719.GA25694@thorin> References: <20091122124853.GA10275@thorin> <4B09360C.7090809@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4B09360C.7090809@gmail.com> Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] grub_video_fbrender_target X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2009 09:27:27 -0000 On Sun, Nov 22, 2009 at 02:01:00PM +0100, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > Robert Millan wrote: > > According to its description, struct grub_video_fbrender_target is a > > driver-specific structure. video_fb.c is generic code and shouldn't be > > using this struct to define its function calls, as this makes it impossible > > to use any of them from outside a driver. > > > > > grub_video_render_target is driver-specific but > grub_video_fbrender_target isn't. Host driver can either put > #define grub_video_render_target grub_video_fbrender_target > In which case driver effectively adopts fbrender_target as its > render_target or add encapsulators for video_fb functions. I think this > patch does more harm than good since if grub_video_render_target isn't > grub_video_fbrender_target then compiler won't complain. Ah, I see what you mean. This is unfortunate, as drivers can't be offloaded from the obligation to define generic handlers just to assert that they use the same struct definition. I was trying to simplify driver registration by making it optional to define operations, making the fallback to generic code automatic. But well, it's not so important. -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."