aboutsummaryrefslogtreecommitdiffstats
path: root/sys/freebsd/fh.txt
blob: 29507b8caa3e26a69e4bc252b2b8b753f8a37fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# 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 ptr[out, statfs])
freebsd11_fhstatfs(fhp ptr[in, fhandle], buf ptr[out, freebsd11_statfs])

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