[libc-commits] [libc] [libc] add ioctl (PR #141393)

via libc-commits libc-commits at lists.llvm.org
Mon Jun 9 12:45:29 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- libc/hdr/sys_ioctl_macros.h libc/src/sys/ioctl/ioctl.h libc/src/sys/ioctl/linux/ioctl.cpp libc/test/src/sys/ioctl/linux/ioctl_test.cpp libc/include/llvm-libc-macros/linux/sys-ioctl-macros.h
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/libc/test/src/sys/ioctl/linux/ioctl_test.cpp b/libc/test/src/sys/ioctl/linux/ioctl_test.cpp
index ee41ebd60..9c56a4689 100644
--- a/libc/test/src/sys/ioctl/linux/ioctl_test.cpp
+++ b/libc/test/src/sys/ioctl/linux/ioctl_test.cpp
@@ -30,8 +30,8 @@ TEST(LlvmLibcSysIoctlTest, InvalidCommandAndFIONREAD) {
   constexpr const char TEST_MSG[] = "ioctl test";
   constexpr int TEST_MSG_SIZE = sizeof(TEST_MSG) - 1;
   auto TEST_FILE = libc_make_test_file_path(TEST_FILE_NAME);
-  int new_test_file_fd =
-      LIBC_NAMESPACE::open(TEST_FILE, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+  int new_test_file_fd = LIBC_NAMESPACE::open(
+      TEST_FILE, O_CREAT | O_WRONLY, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
   ASSERT_THAT(
       (int)LIBC_NAMESPACE::write(new_test_file_fd, TEST_MSG, TEST_MSG_SIZE),
       Succeeds(TEST_MSG_SIZE));

``````````

</details>


https://github.com/llvm/llvm-project/pull/141393


More information about the libc-commits mailing list