From patchwork Sun Jun 3 13:52:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 137601 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp428187lji; Sun, 3 Jun 2018 06:52:52 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK0a8fYmbH3eaVmtH/4gWqWOL4FyPrBFI9/tG0y7BPFVJF/gTrNPGDES6NL/Hcov2fmdgA5 X-Received: by 2002:a50:8882:: with SMTP id d2-v6mr20501005edd.239.1528033972886; Sun, 03 Jun 2018 06:52:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528033972; cv=none; d=google.com; s=arc-20160816; b=i9XhJSVqGAWA6bkfGk7WBYybkfuzOFEdKpE3CeddwsAyVPGn2aZnin0tE6YvkJOJ7p 9oQ3wZopWTNT1uPnBFD6+Wn1+foHLw2y9tdM0vqVWw17sCjbgtoEpKiBZp3qCzW5Xf+t zfzfZ6Oxa2KwzuWOf7bSG3LbV2iJBopRunAyKY5YLhYv4EpA7VWwG4e+G1RTuuNeaxcp 6e+Bo4WvSENmskXbdF+4f+1Ea6XAA4ksnBuybXKUhyijWrRd/kqgZDJS3T/teRYOCpQB Sd7xm2yRaOdlFEeyfzagRqVAWzRdq5TaDA6fwnTxwmcE3V00A2W4x68VdETMcwyi5sGO eGHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from :arc-authentication-results; bh=FcOyQRZlKl6LcX5N6I0hOpbOikxSOVZawkKh5Ik0lFE=; b=FgKtsvrXkGUXwj6psg1Uo3q5mJ9fZcElibFEDaQFDyWa2/84N3fX82rH+TgyrcqWdv uhDOQJmRPfksARG29AGcMxDXCfWnYvqE4mD9STqq6o6dMKhV5t8Nzr6Vla0ybPOi3FSq 8PNCxcYJxD3UdClsWOMEyBSW2hc3PPtzx+7O28EfNnDvEsBtGLR/Ji9WKz/88cXb2Paj mzNNhli0rRF1QHl/5Cz8vaaEnlisbJNTXSAU4GZykYHXGk3R9cKzHp8mmptggSEnCwLA vL6rYWa9BtGZ1C8SNbiHL9sR6bRDjB8282JegP7HToqmR7REiemFHCm9vLOZVyWO2uH7 rMkw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id q30-v6si5883654edc.314.2018.06.03.06.52.52; Sun, 03 Jun 2018 06:52:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 7DF6EC21D9A; Sun, 3 Jun 2018 13:52:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 387E6C21C93; Sun, 3 Jun 2018 13:52:50 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 257DBC21C93; Sun, 3 Jun 2018 13:52:49 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id C5252C21C2F for ; Sun, 3 Jun 2018 13:52:48 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext-too.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 86025AE6F for ; Sun, 3 Jun 2018 13:52:48 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Sun, 3 Jun 2018 15:52:48 +0200 Message-Id: <20180603135248.51677-1-agraf@suse.de> X-Mailer: git-send-email 2.12.3 Subject: [U-Boot] [PATCH] efi_loader: Fix warning in raw/cols query X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The code to determine rows / cols on the screen could potentially run into a case where it doesn't know how big the screen is. In that case, assume 80x25. Signed-off-by: Alexander Graf --- lib/efi_loader/efi_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/efi_loader/efi_console.c b/lib/efi_loader/efi_console.c index 0bfc24dbd9..ce66c935ec 100644 --- a/lib/efi_loader/efi_console.c +++ b/lib/efi_loader/efi_console.c @@ -223,7 +223,7 @@ static int query_console_serial(int *rows, int *cols) static void query_console_size(void) { const char *stdout_name = env_get("stdout"); - int rows, cols; + int rows = 25, cols = 80; if (stdout_name && !strcmp(stdout_name, "vidconsole") && IS_ENABLED(CONFIG_DM_VIDEO)) {