Deleted Added
full compact
flopen.c (169449) flopen.c (169450)
1/*-
2 * Copyright (c) 2007 Dag-Erling Co�dan Sm�rgrav
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2007 Dag-Erling Co�dan Sm�rgrav
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 12 unchanged lines hidden (view full) ---

21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/lib/libutil/flopen.c 169449 2007-05-10 14:56:07Z des $");
29__FBSDID("$FreeBSD: head/lib/libutil/flopen.c 169450 2007-05-10 15:01:42Z des $");
30
30
31#include <sys/file.h>
31#include <sys/stat.h>
32
33#include <errno.h>
34#include <fcntl.h>
35#include <stdarg.h>
32#include <sys/stat.h>
33
34#include <errno.h>
35#include <fcntl.h>
36#include <stdarg.h>
37#include <unistd.h>
36
38
39#include <libutil.h>
40
37int
38flopen(const char *path, int flags, ...)
39{
40 int fd, operation, serrno;
41 struct stat sb, fsb;
42 mode_t mode;
43
44#ifdef O_EXLOCK

--- 48 unchanged lines hidden ---
41int
42flopen(const char *path, int flags, ...)
43{
44 int fd, operation, serrno;
45 struct stat sb, fsb;
46 mode_t mode;
47
48#ifdef O_EXLOCK

--- 48 unchanged lines hidden ---