]> git.proxmox.com Git - mirror_zfs-debian.git/blob - cmd/zed/zed_file.h
Imported Upstream version 0.6.4.2
[mirror_zfs-debian.git] / cmd / zed / zed_file.h
1 /*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license from the top-level
9 * OPENSOLARIS.LICENSE or <http://opensource.org/licenses/CDDL-1.0>.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
12 *
13 * When distributing Covered Code, include this CDDL HEADER in each file
14 * and include the License file from the top-level OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22 /*
23 * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049).
24 * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC.
25 */
26
27 #ifndef ZED_FILE_H
28 #define ZED_FILE_H
29
30 #include <sys/types.h>
31 #include <unistd.h>
32
33 ssize_t zed_file_read_n(int fd, void *buf, size_t n);
34
35 ssize_t zed_file_write_n(int fd, void *buf, size_t n);
36
37 int zed_file_lock(int fd);
38
39 int zed_file_unlock(int fd);
40
41 pid_t zed_file_is_locked(int fd);
42
43 void zed_file_close_from(int fd);
44
45 int zed_file_close_on_exec(int fd);
46
47 #endif /* !ZED_FILE_H */