From nobody Mon Mar 13 01:43:42 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PZfZQ39jnz3xx4q; Mon, 13 Mar 2023 01:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PZfZQ2YGvz3nRK; Mon, 13 Mar 2023 01:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678671822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IHD3rm9RDQy1a7FqA6iLsYj8GLPN+FQZO2jjjd/6ePs=; b=DLoLWmT9NsKjXItQ4WQ9WEIrD9sAUUyjZYECyI+6g2YzXq4O9kNEr6G5RIKUw6JvWDv7Af 50fwujk+eMz22P2JbstSfy/XsK2+QMFzZdQ8y/urY6gcYiIGvvzcbvsQF7YGE8GUskbZI+ PQdFfKSxF7YkoKj+nzMrn0ZfXJmUSA5wjkji5kgJolnvL+iYKc6yrazyNLj2jSDzZeQaPu 2w8E/8y9Gap4BCTpdcfvf4fMkoFafPdY5lQBcWjGkSqCLEYMdkTg4q5wnS4UVtRpTivaiO r5wfDp8Y52pIbCP9IW+tuTGMAh38N2368utVQRwzW6Jxg7xqe1KtaTZBTMhWjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678671822; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IHD3rm9RDQy1a7FqA6iLsYj8GLPN+FQZO2jjjd/6ePs=; b=pdOClMf1A5MZ0hJKSWHdzPGPkaFewPtj7UgvsVFUOt5oIAlNqrxLCU3nCu9bsHVXMaqG5b Ykm9l6JYC2pB0cF6FESyxvzPRRK4QoqqiOa5YNZTpXox1oc7oebxiBjiarhcR1d6494CQK FClN5VUg82aRIRkLFi04bXz9AwHO4W3YjQpmlJVASZbR7AqZq3C4XHqmYY5Fxxwb5xoIc+ SXDJT2AeVbGitoqywRWEUwI0kpy4U7TtbZajnVJhnbPRKGFKWKVNeHcZIE9Fe5puBshAVP mqp50j5nxhkE3ndTbnwzDt70Ex0hfFLXZZfOaKG1beRDlNTrL+eMsLecYjtH/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678671822; a=rsa-sha256; cv=none; b=wh1lYKImyhbqcwelUmCc9B9DC4P9lnGVcG85ckpjEBVNzHGb7KuFDYea95fePaOgT8keX1 5EyeMfXb2c3WE57PR4EeHSZ7AXC3g/q7y9N2YB+AXYmZzd0EssYQRbJgXkKXDW4YgB7IM9 +y7kQIGEARc3dksj1gjbDNKMj6iHBXAXmtD4fl4LxuL/JQXoKZKFzg77lFw3yHDKTpfZVm vxvO2GdZ06ovyzkRgUAQ3Iy7qIwvqWS8ts3uWioFtukSOn96MI8iRNM9CWVHKJPC6mMC2D SxD8ViI7QQb2fCeSWnCqhdZselqr4XqpFG0zC8o199k+aACiZRQmkpnImURcqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PZfZQ1cBWzZZF; Mon, 13 Mar 2023 01:43:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32D1hghk043690; Mon, 13 Mar 2023 01:43:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32D1hgV3043689; Mon, 13 Mar 2023 01:43:42 GMT (envelope-from git) Date: Mon, 13 Mar 2023 01:43:42 GMT Message-Id: <202303130143.32D1hgV3043689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "David E. O'Brien" Subject: git: 65e9eb07012a - main - Look in getlocalbase() for the calendar-data package data List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obrien X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65e9eb07012a0bf2d6940175c98fb463d169c984 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by obrien: URL: https://cgit.FreeBSD.org/src/commit/?id=65e9eb07012a0bf2d6940175c98fb463d169c984 commit 65e9eb07012a0bf2d6940175c98fb463d169c984 Author: David E. O'Brien AuthorDate: 2023-03-08 03:51:27 +0000 Commit: David E. O'Brien CommitDate: 2023-03-13 01:40:07 +0000 Look in getlocalbase() for the calendar-data package data Fix d20d6550187a95a78bb532909aad8ef7ac62be66 where getlocalbase() wasn't used to fill out the printf(3) format of _PATH_INCLUDE_LOCAL. Differential Revision: https://reviews.freebsd.org/D38975 Reviewed by: imp --- usr.bin/calendar/io.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/usr.bin/calendar/io.c b/usr.bin/calendar/io.c index 5afcb1a33314..5a77455d0ff6 100644 --- a/usr.bin/calendar/io.c +++ b/usr.bin/calendar/io.c @@ -151,9 +151,12 @@ cal_fopen(const char *file) } warnx("can't open calendar file \"%s\"", file); - if (!warned && stat(_PATH_INCLUDE_LOCAL, &sb) != 0) { - warnx("calendar data files now provided by calendar-data pkg."); - warned = true; + if (!warned) { + snprintf(path, sizeof(path), _PATH_INCLUDE_LOCAL, getlocalbase()); + if (stat(path, &sb) != 0) { + warnx("calendar data files now provided by calendar-data pkg."); + warned = true; + } } return (NULL);