Sun Sep 15 12:58:34 2013 UTC ()
Make alpha use linux_sys_utimes() just like other archs.


(njoly)
diff -r1.77 -r1.78 src/sys/compat/linux/arch/alpha/syscalls.master
diff -r1.224 -r1.225 src/sys/compat/linux/common/linux_misc.c

cvs diff -r1.77 -r1.78 src/sys/compat/linux/arch/alpha/syscalls.master (expand / switch to unified diff)

--- src/sys/compat/linux/arch/alpha/syscalls.master 2012/09/19 21:19:14 1.77
+++ src/sys/compat/linux/arch/alpha/syscalls.master 2013/09/15 12:58:34 1.78
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1 $NetBSD: syscalls.master,v 1.77 2012/09/19 21:19:14 pooka Exp $ 1 $NetBSD: syscalls.master,v 1.78 2013/09/15 12:58:34 njoly Exp $
2; 2;
3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93 3; @(#)syscalls.master 8.1 (Berkeley) 7/19/93
4 4
5; NetBSD alpha COMPAT_LINUX system call name/number "master" file. 5; NetBSD alpha COMPAT_LINUX system call name/number "master" file.
6; (See syscalls.conf to see what it is processed into.) 6; (See syscalls.conf to see what it is processed into.)
7; 7;
8; Fields: number type [type-dependent ...] 8; Fields: number type [type-dependent ...]
9; number system call number, must be in order 9; number system call number, must be in order
10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of 10; type one of STD, OBSOL, UNIMPL, NODEF, NOARGS, or one of
11; the compatibility options defined in syscalls.conf. 11; the compatibility options defined in syscalls.conf.
12; 12;
13; types: 13; types:
14; STD always included 14; STD always included
@@ -578,28 +578,28 @@ @@ -578,28 +578,28 @@
578358 STD { int|linux_sys||select(int nfds, fd_set *readfds, \ 578358 STD { int|linux_sys||select(int nfds, fd_set *readfds, \
579 fd_set *writefds, fd_set *exceptfds, \ 579 fd_set *writefds, fd_set *exceptfds, \
580 struct timeval50 *timeout); } 580 struct timeval50 *timeout); }
581359 NOARGS { int|compat_50_sys||gettimeofday( \ 581359 NOARGS { int|compat_50_sys||gettimeofday( \
582 struct timeval50 *tp, struct timezone *tzp); } 582 struct timeval50 *tp, struct timezone *tzp); }
583360 NOARGS { int|compat_50_sys||settimeofday( \ 583360 NOARGS { int|compat_50_sys||settimeofday( \
584 const struct timeval50 *tp, \ 584 const struct timeval50 *tp, \
585 const struct timezone *tzp); } 585 const struct timezone *tzp); }
586361 NOARGS { int|compat_50_sys||getitimer(int which, \ 586361 NOARGS { int|compat_50_sys||getitimer(int which, \
587 struct itimerval50 *itv); } 587 struct itimerval50 *itv); }
588362 NOARGS { int|compat_50_sys||setitimer(int which, \ 588362 NOARGS { int|compat_50_sys||setitimer(int which, \
589 const struct itimerval50 *itv, \ 589 const struct itimerval50 *itv, \
590 struct itimerval50 *oitv); } 590 struct itimerval50 *oitv); }
591363 NOARGS { int|compat_50_sys||utimes(char *path, \ 591363 STD { int|linux_sys||utimes(char *path, \
592 struct timeval50 *times); } 592 struct linux_timeval *times); }
593364 NOARGS { int|compat_50_sys||getrusage(int who, \ 593364 NOARGS { int|compat_50_sys||getrusage(int who, \
594 struct rusage50 *rusage); } 594 struct rusage50 *rusage); }
595365 STD { int|linux_sys||wait4(int pid, int *status, \ 595365 STD { int|linux_sys||wait4(int pid, int *status, \
596 int options, struct rusage50 *rusage); } 596 int options, struct rusage50 *rusage); }
597366 UNIMPL adjtimex 597366 UNIMPL adjtimex
598367 NOARGS { int|sys||__getcwd(char *bufp, size_t length); } 598367 NOARGS { int|sys||__getcwd(char *bufp, size_t length); }
599368 UNIMPL capget 599368 UNIMPL capget
600369 UNIMPL capset 600369 UNIMPL capset
601370 UNIMPL sendfile 601370 UNIMPL sendfile
602371 UNIMPL setresgid 602371 UNIMPL setresgid
603372 UNIMPL getresgid 603372 UNIMPL getresgid
604373 UNIMPL sys_dipc 604373 UNIMPL sys_dipc
605374 UNIMPL pivot_root 605374 UNIMPL pivot_root

cvs diff -r1.224 -r1.225 src/sys/compat/linux/common/linux_misc.c (expand / switch to unified diff)

--- src/sys/compat/linux/common/linux_misc.c 2013/08/11 09:07:15 1.224
+++ src/sys/compat/linux/common/linux_misc.c 2013/09/15 12:58:34 1.225
@@ -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__ 
1385int 1384int
1386linux_sys_utimes(struct lwp *l, const struct linux_sys_utimes_args *uap, register_t *retval) 1385linux_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 */