bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 1 | /* |
| 2 | libulockmgr: Userspace Lock Manager Library |
| 3 | Copyright (C) 2006 Miklos Szeredi <miklos@szeredi.hu> |
| 4 | |
| 5 | This program can be distributed under the terms of the GNU LGPLv2. |
| 6 | See the file COPYING.LIB. |
| 7 | */ |
| 8 | |
Matt Mower | 523a059 | 2015-12-13 11:31:00 -0600 | [diff] [blame] | 9 | #include "fuse_lowlevel.h" |
| 10 | |
bigbiff bigbiff | 9c75405 | 2013-01-09 09:09:08 -0500 | [diff] [blame] | 11 | #include <stdint.h> |
| 12 | #include <fcntl.h> |
| 13 | #include <sys/types.h> |
| 14 | |
| 15 | /** |
| 16 | * Perform POSIX locking operation |
| 17 | * |
| 18 | * @param fd the file descriptor |
| 19 | * @param cmd the locking command (F_GETFL, F_SETLK or F_SETLKW) |
| 20 | * @param lock the lock parameters |
| 21 | * @param owner the lock owner ID cookie |
| 22 | * @param owner_len length of the lock owner ID cookie |
| 23 | * @return 0 on success -errno on error |
| 24 | */ |
| 25 | int ulockmgr_op(int fd, int cmd, struct flock *lock, const void *owner, |
| 26 | size_t owner_len); |