From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1f445o-0005YU-0q for mharc-grub-devel@gnu.org; Thu, 05 Apr 2018 08:34:16 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52459) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f445l-0005X3-RH for grub-devel@gnu.org; Thu, 05 Apr 2018 08:34:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f445g-0005eo-Ac for grub-devel@gnu.org; Thu, 05 Apr 2018 08:34:13 -0400 Received: from userp2120.oracle.com ([156.151.31.85]:57138) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1f445g-0005eZ-17 for grub-devel@gnu.org; Thu, 05 Apr 2018 08:34:08 -0400 Received: from pps.filterd (userp2120.oracle.com [127.0.0.1]) by userp2120.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w35C3pFx162703; Thu, 5 Apr 2018 12:34:06 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2017-10-26; bh=4ACNMOoO/lsdedzK/gJTXuCcvNS1Ls2f6EUlyKBnFV4=; b=suBdWlx+bt3YnD/MV73E6kGMOTqk8Kvu+ykwq/ZvsxXUICBZRGI9dzQjWHHLltLiUgsj DLeQHUA+adRUXRwdv3dBEXY7dTjZFcUJKjPZhk3YRCF/+lxJshlLkkSPDbetxykajzYK F60iIa7BKT41Qkpb9bEPJUxTdlpbiZxScNqz4R2fI7Wc25eLB1MrNZ9ojNiSx1nRSSU+ aCcLR0phYxhlo/OIqIKBzYO1EB0JYdVjDIKYOIixU+vBgdhAQM3U52Ddq/n2fQHHzHYt rPfox+HZjaSnonB9gwPnPP08TkVoBn86+oLXAgZrdn4QPB1wWKlL17oIQo+l7LUlMJ4+ vw== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2120.oracle.com with ESMTP id 2h5k4b87kp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 05 Apr 2018 12:34:06 +0000 Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id w35CY6sE031300 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 5 Apr 2018 12:34:06 GMT Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id w35CY5b2019090; Thu, 5 Apr 2018 12:34:05 GMT Received: from olila.local.net-space.pl (/10.175.208.178) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 05 Apr 2018 05:34:04 -0700 Date: Thu, 5 Apr 2018 14:34:01 +0200 From: Daniel Kiper To: Hans de Goede Cc: grub-devel@gnu.org Subject: Re: [PATCH 4/4] EFI: Do not set text-mode until we actually need it Message-ID: <20180405123401.GU26100@olila.local.net-space.pl> References: <20180328145028.21555-1-hdegoede@redhat.com> <20180328145028.21555-5-hdegoede@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180328145028.21555-5-hdegoede@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8853 signatures=668697 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1711220000 definitions=main-1804050128 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] [fuzzy] X-Received-From: 156.151.31.85 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Apr 2018 12:34:15 -0000 On Wed, Mar 28, 2018 at 04:50:28PM +0200, Hans de Goede wrote: > If we're running with a hidden menu we may never need text mode, so do not > change the video-mode to text until we actually need it. > > Signed-off-by: Hans de Goede > --- > grub-core/term/efi/console.c | 72 +++++++++++++++++++++++------------- > 1 file changed, 47 insertions(+), 25 deletions(-) > > diff --git a/grub-core/term/efi/console.c b/grub-core/term/efi/console.c > index 02f64ea74..d9fd7cf48 100644 > --- a/grub-core/term/efi/console.c > +++ b/grub-core/term/efi/console.c > @@ -24,6 +24,11 @@ > #include > #include > > +static grub_err_t grub_prepare_for_text_output(struct grub_term_output *term); Please drop this forward declaration and put the function definition before the callers. > +static int text_mode_available = -1; Could you use bool type here? If yes please define grub_bool_t as stdbool.h does (grub/bool.h?) and replace its usage in grub-core/term/tparm.c as separate patch. If not bool please use enum here. > +static int text_colorstate = -1; Ditto. Daniel