Received: from mout01.posteo.de (mout01.posteo.de [185.67.36.65]) (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 CED5C1411EE for ; Fri, 17 May 2024 22:30:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.67.36.65 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715985023; cv=none; b=OlmrSZXjn4P4OfQK5onSG9EabsgvcfuhoW60PhkxQXMXplAo+YSJ6e3fnAUDdYU8/AzGh1Ej3vxXOXrqfEW+vFgsJhXUe/x/IfpIJ3uxS37qCFEuuN52zH0SZOgDNE2jtC8/4hYXM0P94zYG09Ocp1KhE+aHR2zGJZymwn0Obvc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715985023; c=relaxed/simple; bh=u2wdZoKsOhn/Vy1gWh8LEUQfEtn63LoK9aOvto0sG/o=; h=Mime-Version:Content-Type:Date:Message-Id:From:To:Subject; b=ttnWTtDIfCwp90vvgJDs6OeU+y7CMSRvaCZlC/07Qws4KZPfuNzp3NLzwl4axKSNm6fPOli/DqQ/sX1TvxPrkM/ROVor/yGKWBizWYfwO1EJGhyfoz6a+2tqeIERFGjBGulqLKx6mXD1McNrxOXep0ChryEnClUDe9iUSAOO1iE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net; spf=pass smtp.mailfrom=posteo.net; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b=YNtZpNUt; arc=none smtp.client-ip=185.67.36.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=posteo.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=posteo.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=posteo.net header.i=@posteo.net header.b="YNtZpNUt" Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 3E776240027 for ; Sat, 18 May 2024 00:30:12 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1715985012; bh=u2wdZoKsOhn/Vy1gWh8LEUQfEtn63LoK9aOvto0sG/o=; h=Mime-Version:Content-Transfer-Encoding:Content-Type:Date: Message-Id:From:To:Subject:From; b=YNtZpNUtRkDJRyiy+96eq2xZNd+mYvYYrZcQ/qQd0HmhFsOZWty1ZYXv6/pmGHrSx UeGZbFrTaFhCRurcqPh5H94DwsW8RxUp0B4MazglEPxRgcVD1f03HWpOhxDnVZa0t2 7DvtLHz4hAvJxAi8+NN3uN5QOtBiNVqWfQhaJcST1P0ieAddXsvWFCkr8rjDdkBw6q GghKsous7jXcrO7k82dqNJhv3TBdDlGf9qGPx0qbuVBaKusONgiX/2V379ZvUCRcM8 QJKH8tIrBIcotNbGtzKxSnOfO/FwpL7XX2dbzvBBrYlqvMrBL4xnn8KNC9ab+QOSvG BbyTLmY2V/SUQ== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Vh1ql6Nq3z6tn4 for ; Sat, 18 May 2024 00:30:11 +0200 (CEST) Precedence: bulk X-Mailing-List: kbd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Fri, 17 May 2024 22:30:11 +0000 Message-Id: From: "Sertonix" To: Subject: [PATCH] libkeymap: fix double kbdfile open 976867c3a84 (Rewrite libkbdfile library) changed kbdfile_find to error when the file descriptor was already opened. Make sure kbdfile_find isn't called again when kbdfile is found in include_dirpath1. Signed-off-by: Sertonix --- src/libkeymap/analyze.l | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libkeymap/analyze.l b/src/libkeymap/analyze.l index 9c4c747..dd94206 100644 --- a/src/libkeymap/analyze.l +++ b/src/libkeymap/analyze.l @@ -177,7 +177,7 @@ find_standard_incl_file(struct lk_ctx *ctx, char *s, st= ruct kbdfile *fp) i--; pathname =3D kbdfile_get_pathname(ctx->stack[i]); =20 - if (kbdfile_find(s, include_dirpath1, include_suffixes, fp)) { + if (rc =3D kbdfile_find(s, include_dirpath1, include_suffixes, fp)) { if ((rc =3D find_incl_file_near_fn(ctx, s, pathname, fp)) =3D=3D -1) return rc; } --=20 2.45.1