Deleted Added
full compact
linux_ipc.c (219558) linux_ipc.c (224016)
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
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

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

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1994-1995 S�ren Schmidt
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

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

22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 */
28
29#include <sys/cdefs.h>
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_ipc.c 219558 2011-03-12 07:47:05Z dchagin $");
30__FBSDID("$FreeBSD: head/sys/compat/linux/linux_ipc.c 224016 2011-07-14 14:18:14Z bz $");
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/syscallsubr.h>
35#include <sys/sysproto.h>
36#include <sys/proc.h>
37#include <sys/limits.h>
38#include <sys/msg.h>

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

570 bsd_to_linux_semid_ds(&semid, &linux_semid);
571 error = linux_semid_pushdown(args->cmd & LINUX_IPC_64,
572 &linux_semid, PTRIN(args->arg.buf));
573 if (error == 0)
574 td->td_retval[0] = (cmd == SEM_STAT) ? rval : 0;
575 return (error);
576 case LINUX_IPC_INFO:
577 case LINUX_SEM_INFO:
31
32#include <sys/param.h>
33#include <sys/systm.h>
34#include <sys/syscallsubr.h>
35#include <sys/sysproto.h>
36#include <sys/proc.h>
37#include <sys/limits.h>
38#include <sys/msg.h>

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

570 bsd_to_linux_semid_ds(&semid, &linux_semid);
571 error = linux_semid_pushdown(args->cmd & LINUX_IPC_64,
572 &linux_semid, PTRIN(args->arg.buf));
573 if (error == 0)
574 td->td_retval[0] = (cmd == SEM_STAT) ? rval : 0;
575 return (error);
576 case LINUX_IPC_INFO:
577 case LINUX_SEM_INFO:
578 bcopy(&seminfo, &linux_seminfo, sizeof(linux_seminfo) );
578 bcopy(&seminfo, &linux_seminfo.semmni, sizeof(linux_seminfo) -
579 sizeof(linux_seminfo.semmap) );
580 /*
581 * Linux does not use the semmap field either but populates it
582 * with the defined value from SEMMAP, which really is redefined
583 * to SEMMNS, which they define as SEMMNI * SEMMSL.
584 * Try to simulate this returning our dynamic semmns value.
585 */
586 linux_seminfo.semmap = linux_seminfo.semmns;
579/* XXX BSD equivalent?
580#define used_semids 10
581#define used_sems 10
582 linux_seminfo.semusz = used_semids;
583 linux_seminfo.semaem = used_sems;
584*/
585 error = copyout(&linux_seminfo,
586 PTRIN(args->arg.buf), sizeof(linux_seminfo));

--- 305 unchanged lines hidden ---
587/* XXX BSD equivalent?
588#define used_semids 10
589#define used_sems 10
590 linux_seminfo.semusz = used_semids;
591 linux_seminfo.semaem = used_sems;
592*/
593 error = copyout(&linux_seminfo,
594 PTRIN(args->arg.buf), sizeof(linux_seminfo));

--- 305 unchanged lines hidden ---