From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MAUQa-0003Cz-9p for mharc-grub-devel@gnu.org; Sat, 30 May 2009 15:41:12 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MAUQY-0003By-Hf for grub-devel@gnu.org; Sat, 30 May 2009 15:41:10 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MAUQU-0003BK-Np for grub-devel@gnu.org; Sat, 30 May 2009 15:41:10 -0400 Received: from [199.232.76.173] (port=34565 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MAUQU-0003BH-KX for grub-devel@gnu.org; Sat, 30 May 2009 15:41:06 -0400 Received: from aybabtu.com ([69.60.117.155]:47941) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MAUQU-0008No-BA for grub-devel@gnu.org; Sat, 30 May 2009 15:41:06 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MATPZ-00036z-HF; Sat, 30 May 2009 20:36:05 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MAUQP-0006rl-Cj; Sat, 30 May 2009 21:41:01 +0200 Date: Sat, 30 May 2009 21:41:01 +0200 From: Robert Millan To: Vladimir 'phcoder' Serbinenko Message-ID: <20090530194101.GA24539@thorin> References: <1242498014.3701.10.camel@fz.local> <20090517203642.GU3277@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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, 1) Cc: grub-devel@gnu.org Subject: Re: Fwd: [PATCH] gfxpayload 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: Sat, 30 May 2009 19:41:10 -0000 On Sat, May 30, 2009 at 05:23:18PM +0200, Vladimir 'phcoder' Serbinenko wrote: > On Sun, May 17, 2009 at 10:36 PM, Robert Millan wrote: > > > > Hi, > > > > On Sun, May 17, 2009 at 04:34:16PM +0200, Vladimir 'phcoder' Serbinenko wrote: > >>  #ifndef GRUB_ASSUME_LINUX_HAS_FB_SUPPORT > >> -#define GRUB_ASSUME_LINUX_HAS_FB_SUPPORT 0 > >> +#define DEFAULT_VIDEO_MODE "text" > >> +#else > >> +#define DEFAULT_VIDEO_MODE "keep" > >>  #endif > > > > As discussed on IRC, this "keep" option seems unnecessary;  it just means > > "do nothing" so we may as well #ifdef the code out. > It may be necessary in future for linux loader to be able to check if > current mode is acceptable for linux (e.g. vnc is not). xnu code does > this (text mode isn't acceptable). But for now calling with keep can > be put in ifdef..endif Maybe, but there's no point in some part of GRUB telling another routine "please do nothing, leave things as they are" when it could just not call it instead. It just wastes execution time. > >> +             grub_error (GRUB_ERR_OUT_OF_MEMORY, > >> +                         "couldn't allocate temporary storage"); > >> +             goto fail; > >> +           } > > > > Doesn't grub_malloc set this errno / errmsg already? > > > It says "out of memory" but I guess it should be clear enough. If it's not, it should be fixed in kern/mm.c. There's nothing specific to linux.c in this problem. -- 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."