Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp337468lql; Mon, 11 Mar 2024 04:30:39 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJMsZJ+Ye4hUU84HF//+EK7FmmDxy29mtfvtSr/2Ryuq8KRetvV41Pq4V4T6rey2U2SQzwPRvmOCKWeaNTbK8GLE1V4toJyb+At0XUwg== X-Google-Smtp-Source: AGHT+IHHY3LTs5JSAnV8I8/UfZ7NpNcXex+D0zYPAw6ALFbkhRR47JOXa9tHV2QT3u4SCtdCZPSV X-Received: by 2002:a17:906:ae8c:b0:a43:a12b:1951 with SMTP id md12-20020a170906ae8c00b00a43a12b1951mr76608ejb.2.1710156639509; Mon, 11 Mar 2024 04:30:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710156639; cv=pass; d=google.com; s=arc-20160816; b=PQdY4FfB3TAyFPj1Js8Fk0mwrR/mJjnC2Y66vzyn6CQwGsuzsL2Zt+A2Ymjw5HEx7j J1mi1GqQoTlILT2y1NuHA9UcSyhu3wW88TdVVTBERKoS/IH6NCoN869xA7AxNp0OMyNY w1AoPR9rCNV9p+5UH/CW1Ab6Nkroq19uU+1eq5lAozH1FMjIg3YtiyTfXsG0pxTARnJk pK/F+1KCBWVnXAqajUX+LyOl9oI6LvINDblSyQWi1zi+lhu4t/pggp81FCf7v7MY8U8J GF5ow2c3EeqwcAsV5vaLipx1AO6uQ3+Ojkg0RqzoxwDRcENyah6qIM8A4kRdZQ4FNlek hGZw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=r7ITJeMJdkZqutebrKusVvee8rKFjlZ8euVviL3Kb48=; fh=M024ndqGR8kEzBw/QSAtf5Zk8Ts6H7dLWl5PrK53GSI=; b=E7+3jAyKs7ADGE/yI3FknSLzdZ3l/QiiKH2ULfxWkQjCK89ThlXOgk64DiNknIG/kq aulRWKYVramZ5vGMOPaDSq7UwnT5KsLG7A0kO92fm25WSbHctb8Ysl8VALqiruKZdcqk lU2zEqgvgyNCxJRP7fVfvmGvZqnf1Ni96XY/txrOhkP+WbwHhlYEiEERQEFIolYb/bjD q+/Uw5F2E8ybLObm6jZ5xUvzaeAOI9e5l2Q0zX0jigvSV0yR2QKe6caJNittzk6o0y0D eCIFjFioZMsuTK8RGFhQfe5LeHcc8fKQDRyr2eWn/YrtB1woFJQBMWO2aWPlkIC3rNQ9 gKRA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-98762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98762-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lf21-20020a170906ae5500b00a4617e02d6fsi1520241ejb.1018.2024.03.11.04.30.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 04:30:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-98762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=pengutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-98762-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-98762-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 4119A1F2272E for ; Mon, 11 Mar 2024 11:30:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3765B3AC0C; Mon, 11 Mar 2024 11:30:35 +0000 (UTC) Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E2E4339FF2 for ; Mon, 11 Mar 2024 11:30:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710156634; cv=none; b=jODtEvFsnxRFTSStbUqySjSNfsA4y2w1w1i8eUtauTD9TvHwXp2EgD0/kgyENOc0cH5lBE4t0tZtjgEEeIQdObFU4q+/DcmP7v1yD/tcYaGrJvYk1srXCw5Va5+TfVruegoEuMzYRi1qQlt4QjuL8/QI/LlSKa37TSZ9r74Evdo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710156634; c=relaxed/simple; bh=qM8hF6ZmRnBrmgXNks/rh7LqwkHDijbtSphZtiJE2U4=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type; b=UAQWl8Jf+eTXx5ilXk5BdJokAjs7xAguol1YR4/TVQ9ICwPHA3GIcIBSfOnYzdWud0W4Wu5fGUJ5eCcLpoDCCKZRimiiTiLUBeIh9SmLfHd11Ym+nJYFBALjLfVf2e5rV3NpKkgWd2mOCLJ5xL168Vhj0Dh3XJXHtmrUSv1HgEA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1rjdrM-0007Fx-2C; Mon, 11 Mar 2024 12:30:24 +0100 Received: from [2a0a:edc0:0:900:1d::77] (helo=ptz.office.stw.pengutronix.de) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rjdrL-005hcG-Ed; Mon, 11 Mar 2024 12:30:23 +0100 Received: from ukl by ptz.office.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1rjdrL-0040U5-19; Mon, 11 Mar 2024 12:30:23 +0100 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= To: Greg Kroah-Hartman , Jiri Slaby Cc: linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de Subject: [PATCH] tty: vt: conmakehash: Don't mention the full path of the input in output Date: Mon, 11 Mar 2024 12:30:18 +0100 Message-ID: <20240311113017.483101-2-u.kleine-koenig@pengutronix.de> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Developer-Signature: v=1; a=openpgp-sha256; l=1866; i=u.kleine-koenig@pengutronix.de; h=from:subject; bh=qM8hF6ZmRnBrmgXNks/rh7LqwkHDijbtSphZtiJE2U4=; b=owEBbQGS/pANAwAKAY+A+1h9Ev5OAcsmYgBl7utJG/3nW61SonsD5u0XPzPV6gvfi6dS9PiK1 oX4x13ZP0aJATMEAAEKAB0WIQQ/gaxpOnoeWYmt/tOPgPtYfRL+TgUCZe7rSQAKCRCPgPtYfRL+ Tp/qB/9+4JB8AW8tepvkjnO+ROE4CRGaE4NbcDZlwYedjY2YaIIa4jFNPnLi3fONZwEO7rfWFAn MxBA+lQx8WgerLHGoAQscBfIe5yUr6Ot8OIbWqj6wQmHorJf0DqLMX6YkKghSm6+cBkDN8hp7l3 SDy/PhaKSbHynxt8yQqZCnYH6fVpcg9UBrqBBEo5N0s0fee+kA8SNl4SihkjUnOqGaRXqo+ApWz NhYJpAa1oHA43No7b9nET22xfShHLqT583SQiAgxM2Sk8K/HY7l8LaJPq4inO2KweGntMc9iTvc LyrqImhsCSDIhY+kVDBB34JCOrhsDNY6YkjfHBnXI0TVU1+z X-Developer-Key: i=u.kleine-koenig@pengutronix.de; a=openpgp; fpr=0D2511F322BFAB1C1580266BE2DCDD9132669BD6 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: ukl@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org This change strips $abs_srctree of the input file containing the character mapping table in the generated output. The motivation for this change is Yocto emitting a build warning WARNING: linux-lxatac-6.7-r0 do_package_qa: QA Issue: File /usr/src/debug/linux-lxatac/6.7-r0/drivers/tty/vt/consolemap_deftbl.c in package linux-lxatac-src contains reference to TMPDIR So this change brings us one step closer to make the build result reproducible independent of the build path. Signed-off-by: Uwe Kleine-König --- drivers/tty/vt/conmakehash.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/tty/vt/conmakehash.c b/drivers/tty/vt/conmakehash.c index cddd789fe46e..dc2177fec715 100644 --- a/drivers/tty/vt/conmakehash.c +++ b/drivers/tty/vt/conmakehash.c @@ -76,7 +76,8 @@ static void addpair(int fp, int un) int main(int argc, char *argv[]) { FILE *ctbl; - char *tblname; + const char *tblname, *rel_tblname; + const char *abs_srctree; char buffer[65536]; int fontlen; int i, nuni, nent; @@ -101,6 +102,16 @@ int main(int argc, char *argv[]) } } + abs_srctree = getenv("abs_srctree"); + if (abs_srctree && !strncmp(abs_srctree, tblname, strlen(abs_srctree))) + { + rel_tblname = tblname + strlen(abs_srctree); + while (*rel_tblname == '/') + ++rel_tblname; + } + else + rel_tblname = tblname; + /* For now we assume the default font is always 256 characters. */ fontlen = 256; @@ -253,7 +264,7 @@ int main(int argc, char *argv[]) #include \n\ \n\ u8 dfont_unicount[%d] = \n\ -{\n\t", argv[1], fontlen); +{\n\t", rel_tblname, fontlen); for ( i = 0 ; i < fontlen ; i++ ) { base-commit: 8ffc8b1bbd505e27e2c8439d326b6059c906c9dd -- 2.43.0