]> Sergey Matveev's repositories - public-inbox.git/blobdiff - devel/syscall-list
www: drop --subject from "git send-email" instructions
[public-inbox.git] / devel / syscall-list
index b33401d98ce4e2bac487b6f710eeb788bcf09ba5..d33a8a78a86e00c4534259125fa2c380323d813c 100755 (executable)
@@ -1,4 +1,4 @@
-# Copyright 2021 all contributors <meta@public-inbox.org>
+# Copyright all contributors <meta@public-inbox.org>
 # License: AGPL-3.0+ <http://www.gnu.org/licenses/agpl-3.0.txt>
 # Dump syscall numbers under Linux and any other kernel which
 # promises stable syscall numbers.  This is to maintain
@@ -9,7 +9,10 @@
 eval 'exec perl -S $0 ${1+"$@"}' # no shebang
        if 0; # running under some shell
 use strict;
+use v5.10.1;
 use File::Temp 0.19;
+use POSIX qw(uname);
+say '$machine='.(POSIX::uname())[-1];
 my $cc = $ENV{CC} // 'cc';
 my @cflags = split(/\s+/, $ENV{CFLAGS} // '-Wall');
 my $str = do { local $/; <DATA> };
@@ -23,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)
@@ -43,6 +48,17 @@ int main(void)
        D(SYS_inotify_add_watch);
        D(SYS_inotify_rm_watch);
        D(SYS_prctl);
+       D(SYS_fstatfs);
+       D(SYS_sendmsg);
+       D(SYS_recvmsg);
+#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
 #endif /* Linux, any other OSes with stable syscalls? */
        printf("size_t=%zu off_t=%zu\n", sizeof(size_t), sizeof(off_t));
        return 0;