about summary refs log tree commit homepage
path: root/devel
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2022-01-30 21:49:08 +0000
committerEric Wong <e@80x24.org>2022-01-31 02:04:11 +0000
commit14fa0abdcc7b6513540e529375e53edd74ce13e8 (patch)
tree9f0de95629590def3c2dd72df28243faf129014e /devel
parent6beeb75e5ccddf9f4e8eefc62cbe349972f59917 (diff)
downloadpublic-inbox-14fa0abdcc7b6513540e529375e53edd74ce13e8.tar.gz
btrfs is Linux-only at the moment (and likely to remain that way
for practical purposes).  So rely on Linux ABI stability and use
the `syscall' and `ioctl' perlops rather than relying on Inline::C.
Inline::C (and gcc||clang) are monstrous dependencies which we
can't expect users to have.

This makes supporting new architectures more difficult, but new
architectures come along rarely and this reduces the burden for
the majority of Linux users on popular architectures (while
still avoiding the distribution of pre-built binaries).

Link: https://public-inbox.org/meta/YbCPWGaJEkV6eWfo@codewreck.org/
Diffstat (limited to 'devel')
-rwxr-xr-xdevel/syscall-list10
1 files changed, 9 insertions, 1 deletions
diff --git a/devel/syscall-list b/devel/syscall-list
index 3d55df1f..a6b1bfa7 100755
--- a/devel/syscall-list
+++ b/devel/syscall-list
@@ -26,8 +26,10 @@ system($cc, '-o', $x, $f, @cflags) == 0 or die "cc failed \$?=$?";
 exec($x);
 __DATA__
 #define _GNU_SOURCE
-#include <unistd.h>
 #include <sys/syscall.h>
+#include <sys/ioctl.h>
+#include <linux/fs.h>
+#include <unistd.h>
 #include <stdio.h>
 
 #define D(x) printf("$" #x " = %ld;\n", (long)x)
@@ -46,6 +48,12 @@ int main(void)
         D(SYS_inotify_add_watch);
         D(SYS_inotify_rm_watch);
         D(SYS_prctl);
+        D(SYS_fstatfs);
+#ifdef FS_IOC_GETFLAGS
+        printf("FS_IOC_GETFLAGS=%#lx\nFS_IOC_SETFLAGS=%#lx\n",
+                (unsigned long)FS_IOC_GETFLAGS, (unsigned long)FS_IOC_SETFLAGS);
+#endif
+
 #ifdef SYS_renameat2
         D(SYS_renameat2);
 #endif