git: 6ead1379fd42 - main - sys/user.h: Add kinfo_lockf structure to report advisory locks
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 09 Apr 2022 21:48:20 UTC
The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6ead1379fd42d96b57d58d338dae10b2e73fd8d8 commit 6ead1379fd42d96b57d58d338dae10b2e73fd8d8 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2022-04-01 21:19:35 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> CommitDate: 2022-04-09 21:43:53 +0000 sys/user.h: Add kinfo_lockf structure to report advisory locks Reviewed by: markj, rmacklem Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D34756 --- sys/sys/user.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/sys/sys/user.h b/sys/sys/user.h index f57a69aed13e..cf64f8e8eda4 100644 --- a/sys/sys/user.h +++ b/sys/sys/user.h @@ -452,6 +452,28 @@ struct kinfo_file { char kf_path[PATH_MAX]; /* Path to file, if any. */ }; +struct kinfo_lockf { + int kl_structsize; /* Variable size of record. */ + int kl_rw; + int kl_type; + int kl_pid; + int kl_sysid; + int kl_pad0; + uint64_t kl_file_fsid; + uint64_t kl_file_rdev; + uint64_t kl_file_fileid; + off_t kl_start; + off_t kl_len; /* len == 0 till the EOF */ + char kl_path[PATH_MAX]; +}; + +#define KLOCKF_RW_READ 0x01 +#define KLOCKF_RW_WRITE 0x02 + +#define KLOCKF_TYPE_FLOCK 0x01 +#define KLOCKF_TYPE_PID 0x02 +#define KLOCKF_TYPE_REMOTE 0x03 + /* * The KERN_PROC_VMMAP sysctl allows a process to dump the VM layout of * another process as a series of entries.