From patchwork Mon Jun 17 21:43:45 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= X-Patchwork-Id: 20348 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 6EF85C3237 for ; Mon, 17 Jun 2024 21:43:54 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 807CA6548B; Mon, 17 Jun 2024 23:43:53 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=protonmail.com header.i=@protonmail.com header.b="u1GCO9AA"; dkim-atps=neutral Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id CEE9B61A1C for ; Mon, 17 Jun 2024 23:43:51 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1718660631; x=1718919831; bh=jW6mPIPXM4sEAE7qfA6M4xx7usDmie/huTyY7+gJQb4=; h=Date:To:From:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=u1GCO9AAndsOtHGaxr5TqrEBBZbUkyJplLpJ6ISe9Ec2yyt8ocos2IUsbao9CK5RQ qA5oB70O/1DShMqeQpM7EtLD1u/k4vyQokH+9o81VMQIi/Hq4lkQb7YGOfc2L0n0oQ MtkbfapvH6JvaPKF1TxlB9hZqYmXyONqHOS2nA4sFCZTU+mG06gsNVlvH+8KPM7jbs ZLHQ5d+O7dsdZ9iRZ1LLjQffzhB7u+HzaCESed/CFlrB/ExoQ2MnMArEkS8pa1V7QS cUY7aoqiO9zH9o2E1mkK0fMsf5rTNubbhWRzHfILWyfUXt0wZR7IeMpbtz9mov4y+1 qSo0o2Plp3iBw== Date: Mon, 17 Jun 2024 21:43:45 +0000 To: libcamera-devel@lists.libcamera.org From: =?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= Subject: [PATCH v1] v4l2: v4l2_compat: Fix redirect from `__open(at)64_2()` Message-ID: <20240617214343.2302454-1-pobrn@protonmail.com> Feedback-ID: 20568564:user:proton X-Pm-Message-ID: 36deabbeebf80779f70f2e743579d465ec08c65b MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" `__open64_2()` and `__openat64_2()` should redirect to `open64()` and `openat64()`, respectively, otherwise the `O_LARGEFILE` flag will not be applied. Fixes: 1023107b6405 ("v4l2: v4l2_compat: Intercept open64, openat64, and mmap64") Signed-off-by: Barnabás Pőcze Reviewed-by: Laurent Pinchart --- src/v4l2/v4l2_compat.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/v4l2/v4l2_compat.cpp b/src/v4l2/v4l2_compat.cpp index 8e2b7e92..8a44403e 100644 --- a/src/v4l2/v4l2_compat.cpp +++ b/src/v4l2/v4l2_compat.cpp @@ -59,7 +59,7 @@ LIBCAMERA_PUBLIC int open64(const char *path, int oflag, ...) LIBCAMERA_PUBLIC int __open64_2(const char *path, int oflag) { - return open(path, oflag); + return open64(path, oflag); } #endif @@ -90,7 +90,7 @@ LIBCAMERA_PUBLIC int openat64(int dirfd, const char *path, int oflag, ...) LIBCAMERA_PUBLIC int __openat64_2(int dirfd, const char *path, int oflag) { - return openat(dirfd, path, oflag); + return openat64(dirfd, path, oflag); } #endif