| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: linux_misc.c,v 1.224 2013/08/11 09:07:15 pooka Exp $ */ | | 1 | /* $NetBSD: linux_misc.c,v 1.225 2013/09/15 12:58:34 njoly Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. | | 4 | * Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * This code is derived from software contributed to The NetBSD Foundation | | 7 | * This code is derived from software contributed to The NetBSD Foundation |
8 | * by Frank van der Linden and Eric Haszlakiewicz; by Jason R. Thorpe | | 8 | * by Frank van der Linden and Eric Haszlakiewicz; by Jason R. Thorpe |
9 | * of the Numerical Aerospace Simulation Facility, NASA Ames Research Center. | | 9 | * of the Numerical Aerospace Simulation Facility, NASA Ames Research Center. |
10 | * | | 10 | * |
11 | * Redistribution and use in source and binary forms, with or without | | 11 | * Redistribution and use in source and binary forms, with or without |
12 | * modification, are permitted provided that the following conditions | | 12 | * modification, are permitted provided that the following conditions |
13 | * are met: | | 13 | * are met: |
14 | * 1. Redistributions of source code must retain the above copyright | | 14 | * 1. Redistributions of source code must retain the above copyright |
| @@ -47,27 +47,27 @@ | | | @@ -47,27 +47,27 @@ |
47 | * linux_sys_readdir : linux_misc_notalpha.c | | 47 | * linux_sys_readdir : linux_misc_notalpha.c |
48 | * linux_sys_setresgid : linux_misc_notalpha.c | | 48 | * linux_sys_setresgid : linux_misc_notalpha.c |
49 | * linux_sys_time : linux_misc_notalpha.c | | 49 | * linux_sys_time : linux_misc_notalpha.c |
50 | * linux_sys_utime : linux_misc_notalpha.c | | 50 | * linux_sys_utime : linux_misc_notalpha.c |
51 | * linux_sys_waitpid : linux_misc_notalpha.c | | 51 | * linux_sys_waitpid : linux_misc_notalpha.c |
52 | * linux_sys_old_mmap : linux_oldmmap.c | | 52 | * linux_sys_old_mmap : linux_oldmmap.c |
53 | * linux_sys_oldolduname : linux_oldolduname.c | | 53 | * linux_sys_oldolduname : linux_oldolduname.c |
54 | * linux_sys_oldselect : linux_oldselect.c | | 54 | * linux_sys_oldselect : linux_oldselect.c |
55 | * linux_sys_olduname : linux_olduname.c | | 55 | * linux_sys_olduname : linux_olduname.c |
56 | * linux_sys_pipe : linux_pipe.c | | 56 | * linux_sys_pipe : linux_pipe.c |
57 | */ | | 57 | */ |
58 | | | 58 | |
59 | #include <sys/cdefs.h> | | 59 | #include <sys/cdefs.h> |
60 | __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.224 2013/08/11 09:07:15 pooka Exp $"); | | 60 | __KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.225 2013/09/15 12:58:34 njoly Exp $"); |
61 | | | 61 | |
62 | #include <sys/param.h> | | 62 | #include <sys/param.h> |
63 | #include <sys/systm.h> | | 63 | #include <sys/systm.h> |
64 | #include <sys/namei.h> | | 64 | #include <sys/namei.h> |
65 | #include <sys/proc.h> | | 65 | #include <sys/proc.h> |
66 | #include <sys/dirent.h> | | 66 | #include <sys/dirent.h> |
67 | #include <sys/file.h> | | 67 | #include <sys/file.h> |
68 | #include <sys/stat.h> | | 68 | #include <sys/stat.h> |
69 | #include <sys/filedesc.h> | | 69 | #include <sys/filedesc.h> |
70 | #include <sys/ioctl.h> | | 70 | #include <sys/ioctl.h> |
71 | #include <sys/kernel.h> | | 71 | #include <sys/kernel.h> |
72 | #include <sys/malloc.h> | | 72 | #include <sys/malloc.h> |
73 | #include <sys/mbuf.h> | | 73 | #include <sys/mbuf.h> |
| @@ -1371,27 +1371,26 @@ linux_sys_getpriority(struct lwp *l, con | | | @@ -1371,27 +1371,26 @@ linux_sys_getpriority(struct lwp *l, con |
1371 | int error; | | 1371 | int error; |
1372 | | | 1372 | |
1373 | SCARG(&bsa, which) = SCARG(uap, which); | | 1373 | SCARG(&bsa, which) = SCARG(uap, which); |
1374 | SCARG(&bsa, who) = SCARG(uap, who); | | 1374 | SCARG(&bsa, who) = SCARG(uap, who); |
1375 | | | 1375 | |
1376 | if ((error = sys_getpriority(l, &bsa, retval))) | | 1376 | if ((error = sys_getpriority(l, &bsa, retval))) |
1377 | return error; | | 1377 | return error; |
1378 | | | 1378 | |
1379 | *retval = NZERO - *retval; | | 1379 | *retval = NZERO - *retval; |
1380 | | | 1380 | |
1381 | return 0; | | 1381 | return 0; |
1382 | } | | 1382 | } |
1383 | | | 1383 | |
1384 | #ifndef __alpha__ | | | |
1385 | int | | 1384 | int |
1386 | linux_sys_utimes(struct lwp *l, const struct linux_sys_utimes_args *uap, register_t *retval) | | 1385 | linux_sys_utimes(struct lwp *l, const struct linux_sys_utimes_args *uap, register_t *retval) |
1387 | { | | 1386 | { |
1388 | /* { | | 1387 | /* { |
1389 | syscallarg(const char *) path; | | 1388 | syscallarg(const char *) path; |
1390 | syscallarg(const struct linux_timeval) *times; | | 1389 | syscallarg(const struct linux_timeval) *times; |
1391 | } */ | | 1390 | } */ |
1392 | struct linux_timeval ltv[2]; | | 1391 | struct linux_timeval ltv[2]; |
1393 | struct timeval tv[2]; | | 1392 | struct timeval tv[2]; |
1394 | struct timeval *tptr = NULL; | | 1393 | struct timeval *tptr = NULL; |
1395 | int error; | | 1394 | int error; |
1396 | | | 1395 | |
1397 | if (SCARG(uap, times)) { | | 1396 | if (SCARG(uap, times)) { |
| @@ -1428,15 +1427,14 @@ linux_sys_lutimes(struct lwp *l, const s | | | @@ -1428,15 +1427,14 @@ linux_sys_lutimes(struct lwp *l, const s |
1428 | return error; | | 1427 | return error; |
1429 | | | 1428 | |
1430 | tv[0].tv_sec = ltv[0].tv_sec; | | 1429 | tv[0].tv_sec = ltv[0].tv_sec; |
1431 | tv[0].tv_usec = ltv[0].tv_usec; | | 1430 | tv[0].tv_usec = ltv[0].tv_usec; |
1432 | tv[1].tv_sec = ltv[1].tv_sec; | | 1431 | tv[1].tv_sec = ltv[1].tv_sec; |
1433 | tv[1].tv_usec = ltv[1].tv_usec; | | 1432 | tv[1].tv_usec = ltv[1].tv_usec; |
1434 | | | 1433 | |
1435 | tptr = tv; | | 1434 | tptr = tv; |
1436 | } | | 1435 | } |
1437 | | | 1436 | |
1438 | return do_sys_utimes(l, NULL, SCARG(uap, path), NOFOLLOW, | | 1437 | return do_sys_utimes(l, NULL, SCARG(uap, path), NOFOLLOW, |
1439 | tptr, UIO_SYSSPACE); | | 1438 | tptr, UIO_SYSSPACE); |
1440 | } | | 1439 | } |
1441 | #endif /* __alpha__ */ | | | |
1442 | #endif /* !COMPAT_LINUX32 */ | | 1440 | #endif /* !COMPAT_LINUX32 */ |