Deleted Added
full compact
linux_misc.c (293499) linux_misc.c (293500)
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 S��ren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2002 Doug Rabson
3 * Copyright (c) 1994-1995 S��ren Schmidt
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:

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

23 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
27 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 */
29
30#include <sys/cdefs.h>
31__FBSDID("$FreeBSD: stable/10/sys/compat/linux/linux_misc.c 293499 2016-01-09 15:22:50Z dchagin $");
31__FBSDID("$FreeBSD: stable/10/sys/compat/linux/linux_misc.c 293500 2016-01-09 15:23:54Z dchagin $");
32
33#include "opt_compat.h"
34#include "opt_kdtrace.h"
35
36#include <sys/param.h>
37#include <sys/blist.h>
38#include <sys/fcntl.h>
39#if defined(__i386__)

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

880 options = (args->options & (WNOHANG | WUNTRACED));
881 /* WLINUXCLONE should be equal to __WCLONE, but we make sure */
882 if (args->options & __WCLONE)
883 options |= WLINUXCLONE;
884
885 return (linux_common_wait(td, args->pid, args->status, options, NULL));
886}
887
32
33#include "opt_compat.h"
34#include "opt_kdtrace.h"
35
36#include <sys/param.h>
37#include <sys/blist.h>
38#include <sys/fcntl.h>
39#if defined(__i386__)

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

880 options = (args->options & (WNOHANG | WUNTRACED));
881 /* WLINUXCLONE should be equal to __WCLONE, but we make sure */
882 if (args->options & __WCLONE)
883 options |= WLINUXCLONE;
884
885 return (linux_common_wait(td, args->pid, args->status, options, NULL));
886}
887
888int
889linux_wait4(struct thread *td, struct linux_wait4_args *args)
890{
891 int error, options;
892 struct rusage ru, *rup;
888
893
894#ifdef DEBUG
895 if (ldebug(wait4))
896 printf(ARGS(wait4, "%d, %p, %d, %p"),
897 args->pid, (void *)args->status, args->options,
898 (void *)args->rusage);
899#endif
900
901 options = (args->options & (WNOHANG | WUNTRACED));
902 /* WLINUXCLONE should be equal to __WCLONE, but we make sure */
903 if (args->options & __WCLONE)
904 options |= WLINUXCLONE;
905
906 if (args->rusage != NULL)
907 rup = &ru;
908 else
909 rup = NULL;
910 error = linux_common_wait(td, args->pid, args->status, options, rup);
911 if (error != 0)
912 return (error);
913 if (args->rusage != NULL)
914 error = linux_copyout_rusage(&ru, args->rusage);
915 return (error);
916}
917
889int
890linux_mknod(struct thread *td, struct linux_mknod_args *args)
891{
892 char *path;
893 int error;
894
895 LCONVPATHCREAT(td, args->path, &path);
896

--- 1131 unchanged lines hidden ---
918int
919linux_mknod(struct thread *td, struct linux_mknod_args *args)
920{
921 char *path;
922 int error;
923
924 LCONVPATHCREAT(td, args->path, &path);
925

--- 1131 unchanged lines hidden ---