aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortigergao99 <tigergao1999@outlook.com>2020-11-24 14:48:13 -0500
committerMark Johnston <markjdb@gmail.com>2020-11-25 11:52:43 -0500
commit2f1cec6277878744f2f5484a1833fb91903515f2 (patch)
tree57707d14ae6fe087611c3d5b335d0f6c61d8fabb
parent3f581b433adb5d4c4129121dc1b7fea0b46ad1b2 (diff)
sys/freebsd: add fh related syscalls
-rw-r--r--sys/freebsd/fh.txt38
-rw-r--r--sys/freebsd/fh.txt.const14
2 files changed, 52 insertions, 0 deletions
diff --git a/sys/freebsd/fh.txt b/sys/freebsd/fh.txt
new file mode 100644
index 000000000..9269e2974
--- /dev/null
+++ b/sys/freebsd/fh.txt
@@ -0,0 +1,38 @@
+# Copyright 2020 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
+
+include <sys/param.h>
+include <sys/mount.h>
+include <sys/stat.h>
+include <unistd.h>
+include <fcntl.h>
+
+getfh(file ptr[in, filename], fhp ptr[out, fhandle])
+lgetfh(file ptr[in, filename], fhp ptr[out, fhandle])
+getfhat(fd fd, file ptr[in, filename], fhp ptr[out, fhandle], flags flags[getfhat_flags])
+
+fhlink(fhp ptr[in, fhandle], to ptr[in, filename])
+fhlinkat(fhp ptr[in, fhandle], fd fd, to ptr[in, filename])
+
+fhopen(fhp ptr[in, fhandle], flags flags[open_flags]) fd
+fhstat(fhp ptr[in, fhandle], statbuf ptr[out, stat])
+fhstatfs(fhp ptr[in, fhandle], buf buffer[out])
+
+fhreadlink(fhp ptr[in, fhandle], buf buffer[out], bufsize len[buf])
+
+fsid {
+ val array[int32, 2]
+}
+
+fid {
+ fid_len int16
+ fid_data0 int16
+ fid_data array[int8, MAXFIDSZ]
+}
+
+fhandle {
+ fh_fsid fsid
+ fh_fid fid
+}
+
+getfhat_flags = AT_SYMLINK_NOFOLLOW, AT_BENEATH
diff --git a/sys/freebsd/fh.txt.const b/sys/freebsd/fh.txt.const
new file mode 100644
index 000000000..13e65646e
--- /dev/null
+++ b/sys/freebsd/fh.txt.const
@@ -0,0 +1,14 @@
+# Code generated by syz-sysgen. DO NOT EDIT.
+arches = 386, amd64
+AT_BENEATH = 4096
+AT_SYMLINK_NOFOLLOW = 512
+MAXFIDSZ = 16
+SYS_fhlink = 565
+SYS_fhlinkat = 566
+SYS_fhopen = 298
+SYS_fhreadlink = 567
+SYS_fhstat = 553
+SYS_fhstatfs = 558
+SYS_getfh = 161
+SYS_getfhat = 564
+SYS_lgetfh = 160