From patchwork Thu Mar 23 21:34:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Daniel_D=C3=ADaz?= X-Patchwork-Id: 95921 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp951294qgd; Thu, 23 Mar 2017 14:35:29 -0700 (PDT) X-Received: by 10.107.143.215 with SMTP id r206mr4720171iod.121.1490304929398; Thu, 23 Mar 2017 14:35:29 -0700 (PDT) Return-Path: Received: from mail.openembedded.org (mail.openembedded.org. [140.211.169.62]) by mx.google.com with ESMTP id m12si14489572iti.60.2017.03.23.14.35.29; Thu, 23 Mar 2017 14:35:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) client-ip=140.211.169.62; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of openembedded-core-bounces@lists.openembedded.org designates 140.211.169.62 as permitted sender) smtp.mailfrom=openembedded-core-bounces@lists.openembedded.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from review.yoctoproject.org (localhost [127.0.0.1]) by mail.openembedded.org (Postfix) with ESMTP id 18D0E77B8B; Thu, 23 Mar 2017 21:35:20 +0000 (UTC) X-Original-To: openembedded-core@lists.openembedded.org Delivered-To: openembedded-core@lists.openembedded.org Received: from mail-ot0-f171.google.com (mail-ot0-f171.google.com [74.125.82.171]) by mail.openembedded.org (Postfix) with ESMTP id 50FB273081 for ; Thu, 23 Mar 2017 21:35:17 +0000 (UTC) Received: by mail-ot0-f171.google.com with SMTP id a5so4747601oth.1 for ; Thu, 23 Mar 2017 14:35:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sgCVTl3ua68T8HxLfMYi19L509Jh2XYlHcm8lrpwfZQ=; b=V2kXesHOAOm6IWuifGKHr4wy9adsnyi7STi8LQIScWiWcOB+YpeqjLuIfxwBWFiXQd 9rzqLGJqkmijnKSXetw44CC1a6qUeZD2+lG0i0QxL3fuwBKKO4HqrLH5VIElC7l5bc+Y LvrDgFIvLoUna91/WfKz5/mBJ/L6Qe75SNdPQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sgCVTl3ua68T8HxLfMYi19L509Jh2XYlHcm8lrpwfZQ=; b=fA+lNmHr45PxoEBgP0UdxoQb2OFqE2aet+rIVIkcyPB32c/QyLKv63X9df9vgeIJTv 4ZjxKKEGHC9nWzs3TIAuqksxs18AqZtF1hmNGC3XTd3ZUXY+y8Tf3xEFU11raksu9M3C B/WagCgVPCRORJpgWSxrel0odPZSot3TsC3jPRFX55+lJX5j++lqsWjNBvqnQGocwOV1 SN4pybIxLDX3cTsJWSW9mV4W2e0QKzBNeq1v1+PSCMIL5vaAfDkYXSaqYXQb30Oq2NPe SRmsUO+tZmkHd4dOHNPQbtb0mWDkMRwcgkzHANlzqQxeYQplxwLDQArSCKx/eavCFp/2 NCJA== X-Gm-Message-State: AFeK/H0Tx3LI3NEFaYm2D6dugH95/AJX6BCOJRSDeNb9mSDa7K8a8h65SEW12HYuzy7H/zQR X-Received: by 10.157.54.210 with SMTP id s18mr2833938otd.245.1490304918309; Thu, 23 Mar 2017 14:35:18 -0700 (PDT) Received: from aura.cortijodelrio.net (CableLink67-82.telefonia.InterCable.net. [201.172.67.82]) by smtp.googlemail.com with ESMTPSA id r130sm142321oif.20.2017.03.23.14.35.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 23 Mar 2017 14:35:17 -0700 (PDT) From: =?utf-8?q?Daniel_D=C3=ADaz?= To: openembedded-core@lists.openembedded.org Date: Thu, 23 Mar 2017 15:34:44 -0600 Message-Id: <1490304884-32402-1-git-send-email-daniel.diaz@linaro.org> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Cc: Koen Kooi Subject: [OE-core] [PATCH v2] base-files: resize only serial tty's in profile X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: openembedded-core-bounces@lists.openembedded.org Errors-To: openembedded-core-bounces@lists.openembedded.org We don't want to run resize on non serial consoles. There's been an earlier attempt (6557787), so this builds upon that. The problem we're seeing is that if there is text buffered in the virtual console (like from a desperate user trying to enter login details), resize will get stuck while calling ioctl(tty, TCSETAW); Since serial consoles are named (not just numbered), this change limits resize's reach even further to run only on /dev/tty[A-z] (thus avoiding /dev/tty[0-9]). Signed-off-by: Daniel Díaz --- v2: Rationale behind this patch, no functional change. meta/recipes-core/base-files/base-files/profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile index 7367fd1..c616616 100644 --- a/meta/recipes-core/base-files/base-files/profile +++ b/meta/recipes-core/base-files/base-files/profile @@ -26,7 +26,7 @@ if [ -x /usr/bin/resize ] && termpath="`tty`"; then # Make sure we are on a serial console (i.e. the device used starts with /dev/tty), # otherwise we confuse e.g. the eclipse launcher which tries do use ssh case "$termpath" in - /dev/tty*) resize >/dev/null + /dev/tty[A-z]*) resize >/dev/null esac fi