Show a patch.

GET /api/patches/14875/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 14875,
    "url": "https://patchwork.libcamera.org/api/patches/14875/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/14875/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/projects/1/?format=api",
        "name": "libcamera",
        "link_name": "libcamera",
        "list_id": "libcamera_core",
        "list_email": "libcamera-devel@lists.libcamera.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": ""
    },
    "msgid": "<20211130033820.18235-22-laurent.pinchart@ideasonboard.com>",
    "date": "2021-11-30T03:38:19",
    "name": "[libcamera-devel,v4,21/22] libcamera: base: shared_fd: Rename fd() to get()",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "d3fb707550fdf75a77ad4ab3bdeea070e981c512",
    "submitter": {
        "id": 2,
        "url": "https://patchwork.libcamera.org/api/people/2/?format=api",
        "name": "Laurent Pinchart",
        "email": "laurent.pinchart@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/14875/mbox/",
    "series": [
        {
            "id": 2776,
            "url": "https://patchwork.libcamera.org/api/series/2776/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=2776",
            "date": "2021-11-30T03:37:58",
            "name": "libcamera: Introduce UniqueFD",
            "version": 4,
            "mbox": "https://patchwork.libcamera.org/series/2776/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/14875/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/14875/checks/",
    "tags": {},
    "headers": {
        "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>",
        "X-Original-To": "parsemail@patchwork.libcamera.org",
        "Delivered-To": "parsemail@patchwork.libcamera.org",
        "Received": [
            "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BB6DAC3254\n\tfor <parsemail@patchwork.libcamera.org>;\n\tTue, 30 Nov 2021 03:39:15 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 6B2DF60719;\n\tTue, 30 Nov 2021 04:39:15 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id A134B605C1\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 04:38:58 +0100 (CET)",
            "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 428F68F0\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 30 Nov 2021 04:38:58 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"BW5Xrn2N\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1638243538;\n\tbh=FAdH9f51RJMyBse7aDEEaH7f36ny31yhQqSU9RFJofg=;\n\th=From:To:Subject:Date:In-Reply-To:References:From;\n\tb=BW5Xrn2NkKyZ6W7fhscuG9O81g+3khUDUeGAcgjXA8UWY8GsvlstVCDsy9UKgyXkm\n\t+WUxgVKQBktzh5J2MfDqLm+Q+4cX/SDV5Wc8EblsnaQOS4AElklLdDDugtPRw8qXyN\n\t7jmJARc4HDWeZ8UlNMTHnOBJdUTb4oQhhmakMnwU=",
        "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org",
        "Date": "Tue, 30 Nov 2021 05:38:19 +0200",
        "Message-Id": "<20211130033820.18235-22-laurent.pinchart@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.32.0",
        "In-Reply-To": "<20211130033820.18235-1-laurent.pinchart@ideasonboard.com>",
        "References": "<20211130033820.18235-1-laurent.pinchart@ideasonboard.com>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Subject": "[libcamera-devel] [PATCH v4 21/22] libcamera: base: shared_fd:\n\tRename fd() to get()",
        "X-BeenThere": "libcamera-devel@lists.libcamera.org",
        "X-Mailman-Version": "2.1.29",
        "Precedence": "list",
        "List-Id": "<libcamera-devel.lists.libcamera.org>",
        "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>",
        "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>",
        "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>",
        "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>",
        "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "For consistency with UniqueFD, rename the fd() function to get().\nRenaming UniqueFD::get() to fd() would have been another option, but was\nrejected to keep as close as possible to the std::shared_ptr<> and\nstd::unique_ptr<> APIs.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n include/libcamera/base/shared_fd.h            |  2 +-\n include/libcamera/internal/v4l2_videodevice.h |  2 +-\n src/cam/drm.cpp                               |  4 +-\n src/cam/image.cpp                             |  4 +-\n src/gstreamer/gstlibcameraallocator.cpp       |  2 +-\n src/ipa/raspberrypi/raspberrypi.cpp           |  2 +-\n src/libcamera/base/shared_fd.cpp              |  4 +-\n src/libcamera/framebuffer.cpp                 |  2 +-\n src/libcamera/ipc_pipe.cpp                    |  2 +-\n src/libcamera/mapped_framebuffer.cpp          |  4 +-\n .../pipeline/raspberrypi/raspberrypi.cpp      |  2 +-\n src/libcamera/v4l2_videodevice.cpp            |  6 +--\n src/v4l2/v4l2_camera.cpp                      |  2 +-\n test/shared-fd.cpp                            | 39 ++++++++++---------\n 14 files changed, 39 insertions(+), 38 deletions(-)",
    "diff": "diff --git a/include/libcamera/base/shared_fd.h b/include/libcamera/base/shared_fd.h\nindex 1dd51a7f046b..e53a8b88601e 100644\n--- a/include/libcamera/base/shared_fd.h\n+++ b/include/libcamera/base/shared_fd.h\n@@ -27,7 +27,7 @@ public:\n \tSharedFD &operator=(SharedFD &&other);\n \n \tbool isValid() const { return fd_ != nullptr; }\n-\tint fd() const { return fd_ ? fd_->fd() : -1; }\n+\tint get() const { return fd_ ? fd_->fd() : -1; }\n \tUniqueFD dup() const;\n \n private:\ndiff --git a/include/libcamera/internal/v4l2_videodevice.h b/include/libcamera/internal/v4l2_videodevice.h\nindex 5ba2b54643ac..9b2ec3afecff 100644\n--- a/include/libcamera/internal/v4l2_videodevice.h\n+++ b/include/libcamera/internal/v4l2_videodevice.h\n@@ -140,7 +140,7 @@ private:\n \tprivate:\n \t\tstruct Plane {\n \t\t\tPlane(const FrameBuffer::Plane &plane)\n-\t\t\t\t: fd(plane.fd.fd()), length(plane.length)\n+\t\t\t\t: fd(plane.fd.get()), length(plane.length)\n \t\t\t{\n \t\t\t}\n \ndiff --git a/src/cam/drm.cpp b/src/cam/drm.cpp\nindex f25300913a7f..46e34eb546fb 100644\n--- a/src/cam/drm.cpp\n+++ b/src/cam/drm.cpp\n@@ -608,12 +608,12 @@ std::unique_ptr<FrameBuffer> Device::createFrameBuffer(\n \n \tunsigned int i = 0;\n \tfor (const libcamera::FrameBuffer::Plane &plane : planes) {\n-\t\tint fd = plane.fd.fd();\n+\t\tint fd = plane.fd.get();\n \t\tuint32_t handle;\n \n \t\tauto iter = fb->planes_.find(fd);\n \t\tif (iter == fb->planes_.end()) {\n-\t\t\tret = drmPrimeFDToHandle(fd_, plane.fd.fd(), &handle);\n+\t\t\tret = drmPrimeFDToHandle(fd_, plane.fd.get(), &handle);\n \t\t\tif (ret < 0) {\n \t\t\t\tret = -errno;\n \t\t\t\tstd::cerr\ndiff --git a/src/cam/image.cpp b/src/cam/image.cpp\nindex 0180be78d396..fe2cc6da5a15 100644\n--- a/src/cam/image.cpp\n+++ b/src/cam/image.cpp\n@@ -39,7 +39,7 @@ std::unique_ptr<Image> Image::fromFrameBuffer(const FrameBuffer *buffer, MapMode\n \tstd::map<int, MappedBufferInfo> mappedBuffers;\n \n \tfor (const FrameBuffer::Plane &plane : buffer->planes()) {\n-\t\tconst int fd = plane.fd.fd();\n+\t\tconst int fd = plane.fd.get();\n \t\tif (mappedBuffers.find(fd) == mappedBuffers.end()) {\n \t\t\tconst size_t length = lseek(fd, 0, SEEK_END);\n \t\t\tmappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length };\n@@ -61,7 +61,7 @@ std::unique_ptr<Image> Image::fromFrameBuffer(const FrameBuffer *buffer, MapMode\n \t}\n \n \tfor (const FrameBuffer::Plane &plane : buffer->planes()) {\n-\t\tconst int fd = plane.fd.fd();\n+\t\tconst int fd = plane.fd.get();\n \t\tauto &info = mappedBuffers[fd];\n \t\tif (!info.address) {\n \t\t\tvoid *address = mmap(nullptr, info.mapLength, mmapFlags,\ndiff --git a/src/gstreamer/gstlibcameraallocator.cpp b/src/gstreamer/gstlibcameraallocator.cpp\nindex cb07d6e9e87f..c740b8fc82a8 100644\n--- a/src/gstreamer/gstlibcameraallocator.cpp\n+++ b/src/gstreamer/gstlibcameraallocator.cpp\n@@ -52,7 +52,7 @@ FrameWrap::FrameWrap(GstAllocator *allocator, FrameBuffer *buffer,\n \t  outstandingPlanes_(0)\n {\n \tfor (const FrameBuffer::Plane &plane : buffer->planes()) {\n-\t\tGstMemory *mem = gst_fd_allocator_alloc(allocator, plane.fd.fd(),\n+\t\tGstMemory *mem = gst_fd_allocator_alloc(allocator, plane.fd.get(),\n \t\t\t\t\t\t\tplane.offset + plane.length,\n \t\t\t\t\t\t\tGST_FD_MEMORY_FLAG_DONT_CLOSE);\n \t\tgst_memory_resize(mem, plane.offset, plane.length);\ndiff --git a/src/ipa/raspberrypi/raspberrypi.cpp b/src/ipa/raspberrypi/raspberrypi.cpp\nindex aaf629eeb3fc..0ed41385018a 100644\n--- a/src/ipa/raspberrypi/raspberrypi.cpp\n+++ b/src/ipa/raspberrypi/raspberrypi.cpp\n@@ -377,7 +377,7 @@ int IPARPi::configure(const IPACameraSensorInfo &sensorInfo,\n \t\tlsTableHandle_ = std::move(ipaConfig.lsTableHandle);\n \t\tif (lsTableHandle_.isValid()) {\n \t\t\tlsTable_ = mmap(nullptr, ipa::RPi::MaxLsGridSize, PROT_READ | PROT_WRITE,\n-\t\t\t\t\tMAP_SHARED, lsTableHandle_.fd(), 0);\n+\t\t\t\t\tMAP_SHARED, lsTableHandle_.get(), 0);\n \n \t\t\tif (lsTable_ == MAP_FAILED) {\n \t\t\t\tLOG(IPARPI, Error) << \"dmaHeap mmap failure for LS table.\";\ndiff --git a/src/libcamera/base/shared_fd.cpp b/src/libcamera/base/shared_fd.cpp\nindex 56dc579258c7..0c8b93a47f85 100644\n--- a/src/libcamera/base/shared_fd.cpp\n+++ b/src/libcamera/base/shared_fd.cpp\n@@ -208,7 +208,7 @@ SharedFD &SharedFD::operator=(SharedFD &&other)\n  */\n \n /**\n- * \\fn SharedFD::fd()\n+ * \\fn SharedFD::get()\n  * \\brief Retrieve the numerical file descriptor\n  * \\return The numerical file descriptor, which may be -1 if the SharedFD\n  * instance is invalid\n@@ -253,7 +253,7 @@ SharedFD &SharedFD::operator=(SharedFD &&other)\n  */\n UniqueFD SharedFD::dup() const\n {\n-\tint dupFd = ::dup(fd());\n+\tint dupFd = ::dup(get());\n \tif (dupFd == -1) {\n \t\tint ret = -errno;\n \t\tLOG(SharedFD, Error)\ndiff --git a/src/libcamera/framebuffer.cpp b/src/libcamera/framebuffer.cpp\nindex f313566c5561..701212f3ae21 100644\n--- a/src/libcamera/framebuffer.cpp\n+++ b/src/libcamera/framebuffer.cpp\n@@ -218,7 +218,7 @@ ino_t fileDescriptorInode(const SharedFD &fd)\n \t\treturn 0;\n \n \tstruct stat st;\n-\tint ret = fstat(fd.fd(), &st);\n+\tint ret = fstat(fd.get(), &st);\n \tif (ret < 0) {\n \t\tret = -errno;\n \t\tLOG(Buffer, Fatal)\ndiff --git a/src/libcamera/ipc_pipe.cpp b/src/libcamera/ipc_pipe.cpp\nindex 3b47032de0a2..31a0ca09f9f0 100644\n--- a/src/libcamera/ipc_pipe.cpp\n+++ b/src/libcamera/ipc_pipe.cpp\n@@ -113,7 +113,7 @@ IPCUnixSocket::Payload IPCMessage::payload() const\n \t}\n \n \tfor (const SharedFD &fd : fds_)\n-\t\tpayload.fds.push_back(fd.fd());\n+\t\tpayload.fds.push_back(fd.get());\n \n \treturn payload;\n }\ndiff --git a/src/libcamera/mapped_framebuffer.cpp b/src/libcamera/mapped_framebuffer.cpp\nindex 464d35fef2d2..6860069b68ca 100644\n--- a/src/libcamera/mapped_framebuffer.cpp\n+++ b/src/libcamera/mapped_framebuffer.cpp\n@@ -198,7 +198,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)\n \tstd::map<int, MappedBufferInfo> mappedBuffers;\n \n \tfor (const FrameBuffer::Plane &plane : buffer->planes()) {\n-\t\tconst int fd = plane.fd.fd();\n+\t\tconst int fd = plane.fd.get();\n \t\tif (mappedBuffers.find(fd) == mappedBuffers.end()) {\n \t\t\tconst size_t length = lseek(fd, 0, SEEK_END);\n \t\t\tmappedBuffers[fd] = MappedBufferInfo{ nullptr, 0, length };\n@@ -220,7 +220,7 @@ MappedFrameBuffer::MappedFrameBuffer(const FrameBuffer *buffer, MapFlags flags)\n \t}\n \n \tfor (const FrameBuffer::Plane &plane : buffer->planes()) {\n-\t\tconst int fd = plane.fd.fd();\n+\t\tconst int fd = plane.fd.get();\n \t\tauto &info = mappedBuffers[fd];\n \t\tif (!info.address) {\n \t\t\tvoid *address = mmap(nullptr, info.mapLength, mmapFlags,\ndiff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\nindex fdcd1eca11d6..fa2848533b29 100644\n--- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n+++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp\n@@ -1470,7 +1470,7 @@ void RPiCameraData::setIspControls(const ControlList &controls)\n \t\tSpan<uint8_t> s = value.data();\n \t\tbcm2835_isp_lens_shading *ls =\n \t\t\treinterpret_cast<bcm2835_isp_lens_shading *>(s.data());\n-\t\tls->dmabuf = lsTable_.fd();\n+\t\tls->dmabuf = lsTable_.get();\n \t}\n \n \tisp_[Isp::Input].dev()->setControls(&ctrls);\ndiff --git a/src/libcamera/v4l2_videodevice.cpp b/src/libcamera/v4l2_videodevice.cpp\nindex 0d214d9edc7a..b4b89e2759b9 100644\n--- a/src/libcamera/v4l2_videodevice.cpp\n+++ b/src/libcamera/v4l2_videodevice.cpp\n@@ -282,7 +282,7 @@ bool V4L2BufferCache::Entry::operator==(const FrameBuffer &buffer) const\n \t\treturn false;\n \n \tfor (unsigned int i = 0; i < planes.size(); i++)\n-\t\tif (planes_[i].fd != planes[i].fd.fd() ||\n+\t\tif (planes_[i].fd != planes[i].fd.get() ||\n \t\t    planes_[i].length != planes[i].length)\n \t\t\treturn false;\n \treturn true;\n@@ -1517,9 +1517,9 @@ int V4L2VideoDevice::queueBuffer(FrameBuffer *buffer)\n \tif (buf.memory == V4L2_MEMORY_DMABUF) {\n \t\tif (multiPlanar) {\n \t\t\tfor (unsigned int p = 0; p < numV4l2Planes; ++p)\n-\t\t\t\tv4l2Planes[p].m.fd = planes[p].fd.fd();\n+\t\t\t\tv4l2Planes[p].m.fd = planes[p].fd.get();\n \t\t} else {\n-\t\t\tbuf.m.fd = planes[0].fd.fd();\n+\t\t\tbuf.m.fd = planes[0].fd.get();\n \t\t}\n \t}\n \ndiff --git a/src/v4l2/v4l2_camera.cpp b/src/v4l2/v4l2_camera.cpp\nindex 464507505c79..e922b9e6aab2 100644\n--- a/src/v4l2/v4l2_camera.cpp\n+++ b/src/v4l2/v4l2_camera.cpp\n@@ -195,7 +195,7 @@ int V4L2Camera::getBufferFd(unsigned int index)\n \tif (buffers.size() <= index)\n \t\treturn -1;\n \n-\treturn buffers[index]->planes()[0].fd.fd();\n+\treturn buffers[index]->planes()[0].fd.get();\n }\n \n int V4L2Camera::streamOn()\ndiff --git a/test/shared-fd.cpp b/test/shared-fd.cpp\nindex 60e5d0aaa395..997d7be18c47 100644\n--- a/test/shared-fd.cpp\n+++ b/test/shared-fd.cpp\n@@ -46,7 +46,7 @@ protected:\n \t\t/* Test creating empty SharedFD. */\n \t\tdesc1_ = new SharedFD();\n \n-\t\tif (desc1_->fd() != -1) {\n+\t\tif (desc1_->get() != -1) {\n \t\t\tstd::cout << \"Failed fd numerical check (default constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n@@ -60,19 +60,19 @@ protected:\n \t\t * descriptor.\n \t\t */\n \t\tdesc1_ = new SharedFD(fd_);\n-\t\tif (desc1_->fd() == fd_) {\n+\t\tif (desc1_->get() == fd_) {\n \t\t\tstd::cout << \"Failed fd numerical check (lvalue ref constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!isValidFd(fd_) || !isValidFd(desc1_->fd())) {\n+\t\tif (!isValidFd(fd_) || !isValidFd(desc1_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after construction (lvalue ref constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tint fd = desc1_->fd();\n+\t\tint fd = desc1_->get();\n \n \t\tdelete desc1_;\n \t\tdesc1_ = nullptr;\n@@ -91,19 +91,19 @@ protected:\n \t\tint dupFdCopy = dupFd;\n \n \t\tdesc1_ = new SharedFD(std::move(dupFd));\n-\t\tif (desc1_->fd() != dupFdCopy) {\n+\t\tif (desc1_->get() != dupFdCopy) {\n \t\t\tstd::cout << \"Failed fd numerical check (rvalue ref constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (dupFd != -1 || !isValidFd(fd_) || !isValidFd(desc1_->fd())) {\n+\t\tif (dupFd != -1 || !isValidFd(fd_) || !isValidFd(desc1_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after construction (rvalue ref constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tfd = desc1_->fd();\n+\t\tfd = desc1_->get();\n \n \t\tdelete desc1_;\n \t\tdesc1_ = nullptr;\n@@ -118,13 +118,14 @@ protected:\n \t\tdesc1_ = new SharedFD(fd_);\n \t\tdesc2_ = new SharedFD(*desc1_);\n \n-\t\tif (desc1_->fd() == fd_ || desc2_->fd() == fd_ || desc1_->fd() != desc2_->fd()) {\n+\t\tif (desc1_->get() == fd_ || desc2_->get() == fd_ ||\n+\t\t    desc1_->get() != desc2_->get()) {\n \t\t\tstd::cout << \"Failed fd numerical check (copy constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!isValidFd(desc1_->fd()) || !isValidFd(desc2_->fd())) {\n+\t\tif (!isValidFd(desc1_->get()) || !isValidFd(desc2_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after construction (copy constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n@@ -133,7 +134,7 @@ protected:\n \t\tdelete desc1_;\n \t\tdesc1_ = nullptr;\n \n-\t\tif (!isValidFd(desc2_->fd())) {\n+\t\tif (!isValidFd(desc2_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after destruction (copy constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n@@ -144,16 +145,16 @@ protected:\n \n \t\t/* Test creating SharedFD by taking over other SharedFD. */\n \t\tdesc1_ = new SharedFD(fd_);\n-\t\tfd = desc1_->fd();\n+\t\tfd = desc1_->get();\n \t\tdesc2_ = new SharedFD(std::move(*desc1_));\n \n-\t\tif (desc1_->fd() != -1 || desc2_->fd() != fd) {\n+\t\tif (desc1_->get() != -1 || desc2_->get() != fd) {\n \t\t\tstd::cout << \"Failed fd numerical check (move constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!isValidFd(desc2_->fd())) {\n+\t\tif (!isValidFd(desc2_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after construction (move constructor)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n@@ -168,16 +169,16 @@ protected:\n \t\tdesc1_ = new SharedFD();\n \t\tdesc2_ = new SharedFD(fd_);\n \n-\t\tfd = desc2_->fd();\n+\t\tfd = desc2_->get();\n \t\t*desc1_ = *desc2_;\n \n-\t\tif (desc1_->fd() != fd || desc2_->fd() != fd) {\n+\t\tif (desc1_->get() != fd || desc2_->get() != fd) {\n \t\t\tstd::cout << \"Failed fd numerical check (copy assignment)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!isValidFd(desc1_->fd()) || !isValidFd(desc2_->fd())) {\n+\t\tif (!isValidFd(desc1_->get()) || !isValidFd(desc2_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after construction (copy assignment)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n@@ -192,16 +193,16 @@ protected:\n \t\tdesc1_ = new SharedFD();\n \t\tdesc2_ = new SharedFD(fd_);\n \n-\t\tfd = desc2_->fd();\n+\t\tfd = desc2_->get();\n \t\t*desc1_ = std::move(*desc2_);\n \n-\t\tif (desc1_->fd() != fd || desc2_->fd() != -1) {\n+\t\tif (desc1_->get() != fd || desc2_->get() != -1) {\n \t\t\tstd::cout << \"Failed fd numerical check (move assignment)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n \t\t}\n \n-\t\tif (!isValidFd(desc1_->fd())) {\n+\t\tif (!isValidFd(desc1_->get())) {\n \t\t\tstd::cout << \"Failed fd validity after construction (move assignment)\"\n \t\t\t\t  << std::endl;\n \t\t\treturn TestFail;\n",
    "prefixes": [
        "libcamera-devel",
        "v4",
        "21/22"
    ]
}