1*eda14cbcSMatt Macy /* 2*eda14cbcSMatt Macy * This file is part of the ZFS Event Daemon (ZED) 3*eda14cbcSMatt Macy * for ZFS on Linux (ZoL) <http://zfsonlinux.org/>. 4*eda14cbcSMatt Macy * Developed at Lawrence Livermore National Laboratory (LLNL-CODE-403049). 5*eda14cbcSMatt Macy * Copyright (C) 2013-2014 Lawrence Livermore National Security, LLC. 6*eda14cbcSMatt Macy * Refer to the ZoL git commit log for authoritative copyright attribution. 7*eda14cbcSMatt Macy * 8*eda14cbcSMatt Macy * The contents of this file are subject to the terms of the 9*eda14cbcSMatt Macy * Common Development and Distribution License Version 1.0 (CDDL-1.0). 10*eda14cbcSMatt Macy * You can obtain a copy of the license from the top-level file 11*eda14cbcSMatt Macy * "OPENSOLARIS.LICENSE" or at <http://opensource.org/licenses/CDDL-1.0>. 12*eda14cbcSMatt Macy * You may not use this file except in compliance with the license. 13*eda14cbcSMatt Macy */ 14*eda14cbcSMatt Macy 15*eda14cbcSMatt Macy #ifndef ZED_FILE_H 16*eda14cbcSMatt Macy #define ZED_FILE_H 17*eda14cbcSMatt Macy 18*eda14cbcSMatt Macy #include <sys/types.h> 19*eda14cbcSMatt Macy #include <unistd.h> 20*eda14cbcSMatt Macy 21*eda14cbcSMatt Macy ssize_t zed_file_read_n(int fd, void *buf, size_t n); 22*eda14cbcSMatt Macy 23*eda14cbcSMatt Macy ssize_t zed_file_write_n(int fd, void *buf, size_t n); 24*eda14cbcSMatt Macy 25*eda14cbcSMatt Macy int zed_file_lock(int fd); 26*eda14cbcSMatt Macy 27*eda14cbcSMatt Macy int zed_file_unlock(int fd); 28*eda14cbcSMatt Macy 29*eda14cbcSMatt Macy pid_t zed_file_is_locked(int fd); 30*eda14cbcSMatt Macy 31*eda14cbcSMatt Macy void zed_file_close_from(int fd); 32*eda14cbcSMatt Macy 33*eda14cbcSMatt Macy int zed_file_close_on_exec(int fd); 34*eda14cbcSMatt Macy 35*eda14cbcSMatt Macy #endif /* !ZED_FILE_H */ 36