Deleted Added
full compact
freebsd32_misc.c (271010) freebsd32_misc.c (272246)
1/*-
2 * Copyright (c) 2002 Doug Rabson
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Doug Rabson
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

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

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: stable/10/sys/compat/freebsd32/freebsd32_misc.c 271010 2014-09-03 09:05:16Z kib $");
28__FBSDID("$FreeBSD: stable/10/sys/compat/freebsd32/freebsd32_misc.c 272246 2014-09-28 11:08:32Z kib $");
29
30#include "opt_compat.h"
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#define __ELF_WORD_SIZE 32
35
36#include <sys/param.h>

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

3071 }
3072 return (kern_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id),
3073 uap->com, data));
3074}
3075
3076int
3077freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap)
3078{
29
30#include "opt_compat.h"
31#include "opt_inet.h"
32#include "opt_inet6.h"
33
34#define __ELF_WORD_SIZE 32
35
36#include <sys/param.h>

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

3071 }
3072 return (kern_procctl(td, uap->idtype, PAIR32TO64(id_t, uap->id),
3073 uap->com, data));
3074}
3075
3076int
3077freebsd32_fcntl(struct thread *td, struct freebsd32_fcntl_args *uap)
3078{
3079 intptr_t tmp;
3079 long tmp;
3080
3081 switch (uap->cmd) {
3082 /*
3083 * Do unsigned conversion for arg when operation
3084 * interprets it as flags or pointer.
3085 */
3086 case F_SETLK_REMOTE:
3087 case F_SETLKW:
3088 case F_SETLK:
3089 case F_GETLK:
3090 case F_SETFD:
3091 case F_SETFL:
3092 tmp = (unsigned int)(uap->arg);
3093 break;
3094 default:
3095 tmp = uap->arg;
3096 break;
3097 }
3080
3081 switch (uap->cmd) {
3082 /*
3083 * Do unsigned conversion for arg when operation
3084 * interprets it as flags or pointer.
3085 */
3086 case F_SETLK_REMOTE:
3087 case F_SETLKW:
3088 case F_SETLK:
3089 case F_GETLK:
3090 case F_SETFD:
3091 case F_SETFL:
3092 tmp = (unsigned int)(uap->arg);
3093 break;
3094 default:
3095 tmp = uap->arg;
3096 break;
3097 }
3098 return (kern_fcntl(td, uap->fd, uap->cmd, tmp));
3098 return (kern_fcntl_freebsd(td, uap->fd, uap->cmd, tmp));
3099}
3099}