From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 6D9C751034 for ; Mon, 20 May 2024 10:44:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716201867; cv=none; b=moEvZmePPYtD3rg11UaTpcC56WY2+lsoafD0LxjRezh4ocvT6qr6pMIkwSMBu+IdphQIUG7jKJ9vci0mRz3nOMKCrJ6gydw1GALzpggm8fPZYm7Oo2nbDtmhZfyik6H0vW8yKDmmOOKPgjSgPZK9Q8NahtkJwjCTdfhZ9d2I0Zs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716201867; c=relaxed/simple; bh=vZ8Ji9fY2HbUMQnsHkIL0gO4z+h2cbKs67dt/NMgWdc=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=Gc1od5bCDcmOk7cH36XNvsTeijRhyn6pNTQRK2mU+RkNXbitvNaVJ7USaEM1xcljAPFxomkgXnvN6Xv6Ol4SnibTz3IbhWcKLI7QUWpgCslgS7lfxl0pHYis3MHJ5fiXBtDrgrEgJuEhZRMj0rvjzEiZN4nmutLXW3wp299fzrA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Z3VIy6vA; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Z3VIy6vA" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 537B4C2BD11; Mon, 20 May 2024 10:44:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716201867; bh=vZ8Ji9fY2HbUMQnsHkIL0gO4z+h2cbKs67dt/NMgWdc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Z3VIy6vAYxl4cc3rH8fYmBtjljviWmMVP6iEtYJt7kd6nt1uT7M1z+e5jRQW9m6/b fAxOzJJM1UacVWNJSxhqqnKyk9kll6IzQKAuSl6KTgSdhQGDotDVCNgrtY//vcaUxn G51MzmeVnQVPu5K4llS2ralGsCzLMTmlFUc6hwPGqFm3GjDztmx+sz3pr2bAQt0NnY im11WjUeU4boUvTw+Qnlyf9/euTK5xBIEzFYbNvK8+VVJhs/RwTAsN5FHyvifXNFWo ljsuD9B+/mJlBVuyVrWVb2UlGePxYZ+i9QL/Zr8lUaLLtIgRrDueBO65oK0HIFy54d 6no7/YxQb7d5A== Date: Mon, 20 May 2024 12:44:23 +0200 From: Alexey Gladkov To: Sertonix Cc: kbd@lists.linux.dev Subject: Re: [PATCH] libkeymap: fix double kbdfile open Message-ID: References: Precedence: bulk X-Mailing-List: kbd@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 17, 2024 at 10:30:11PM +0000, Sertonix wrote: > > 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. Applied. Thanks! > 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, struct kbdfile *fp) > i--; > pathname = kbdfile_get_pathname(ctx->stack[i]); > > - if (kbdfile_find(s, include_dirpath1, include_suffixes, fp)) { > + if (rc = kbdfile_find(s, include_dirpath1, include_suffixes, fp)) { > if ((rc = find_incl_file_near_fn(ctx, s, pathname, fp)) == -1) > return rc; > } > -- > 2.45.1 > > -- Rgrds, legion