Deleted Added
full compact
ibcs2_fcntl.c (141488) ibcs2_fcntl.c (177633)
1/*-
2 * Copyright (c) 1995 Scott Bartram
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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1995 Scott Bartram
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 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */
27
28#include <sys/cdefs.h>
29__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_fcntl.c 141488 2005-02-07 22:02:18Z jhb $");
29__FBSDID("$FreeBSD: head/sys/i386/ibcs2/ibcs2_fcntl.c 177633 2008-03-26 15:23:12Z dfr $");
30
31#include "opt_spx_hack.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/fcntl.h>
36#include <sys/file.h>
37#include <sys/filedesc.h>

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

88 break;
89 case F_UNLCK:
90 iflp->l_type = IBCS2_F_UNLCK;
91 break;
92 }
93 iflp->l_whence = (short)flp->l_whence;
94 iflp->l_start = (ibcs2_off_t)flp->l_start;
95 iflp->l_len = (ibcs2_off_t)flp->l_len;
30
31#include "opt_spx_hack.h"
32
33#include <sys/param.h>
34#include <sys/systm.h>
35#include <sys/fcntl.h>
36#include <sys/file.h>
37#include <sys/filedesc.h>

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

88 break;
89 case F_UNLCK:
90 iflp->l_type = IBCS2_F_UNLCK;
91 break;
92 }
93 iflp->l_whence = (short)flp->l_whence;
94 iflp->l_start = (ibcs2_off_t)flp->l_start;
95 iflp->l_len = (ibcs2_off_t)flp->l_len;
96 iflp->l_sysid = 0;
96 iflp->l_sysid = flp->l_sysid;
97 iflp->l_pid = (ibcs2_pid_t)flp->l_pid;
98}
99
100#ifdef DEBUG_IBCS2
101static void
102print_flock(struct flock *flp)
103{
104 printf("flock: start=%x len=%x pid=%d type=%d whence=%d\n",

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

122 case IBCS2_F_WRLCK:
123 flp->l_type = F_WRLCK;
124 break;
125 case IBCS2_F_UNLCK:
126 flp->l_type = F_UNLCK;
127 break;
128 }
129 flp->l_whence = iflp->l_whence;
97 iflp->l_pid = (ibcs2_pid_t)flp->l_pid;
98}
99
100#ifdef DEBUG_IBCS2
101static void
102print_flock(struct flock *flp)
103{
104 printf("flock: start=%x len=%x pid=%d type=%d whence=%d\n",

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

122 case IBCS2_F_WRLCK:
123 flp->l_type = F_WRLCK;
124 break;
125 case IBCS2_F_UNLCK:
126 flp->l_type = F_UNLCK;
127 break;
128 }
129 flp->l_whence = iflp->l_whence;
130 flp->l_sysid = iflp->l_sysid;
130}
131
132/* convert iBCS2 mode into NetBSD mode */
133static int
134ioflags2oflags(flags)
135 int flags;
136{
137 int r = 0;

--- 176 unchanged lines hidden ---
131}
132
133/* convert iBCS2 mode into NetBSD mode */
134static int
135ioflags2oflags(flags)
136 int flags;
137{
138 int r = 0;

--- 176 unchanged lines hidden ---