Source-Changes-D archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src



Emmanuel Dreyfus <manu%NetBSD.org@localhost> writes:

> Module Name:  src
> Committed By: manu
> Date:         Wed Aug 17 07:22:35 UTC 2011
>
> Modified Files:
>       src/distrib/sets/lists/comp: mi
>       src/lib/libc/sys: Makefile.inc utimes.2
>       src/sys/kern: syscalls.master vfs_syscalls.c
>
> Log Message:
> Add futimens(2) and part of utimnsat(2)

I guess something like following change is necessary so that when both
tv_nsec is set to UTIME_NOW,

        1) to perform same permission check as when NULL is passed to 2nd
        arg.
        2) to set same value for both atime and mtime.

enami.

Index: vfs_syscalls.c
===================================================================
RCS file: /cvsroot/src/sys/kern/vfs_syscalls.c,v
retrieving revision 1.437
diff -c -r1.437 vfs_syscalls.c
*** vfs_syscalls.c      18 Aug 2011 19:34:47 -0000      1.437
--- vfs_syscalls.c      22 Aug 2011 03:50:05 -0000
***************
*** 3137,3146 ****
                }
        }
  
!       if (ts[0].tv_nsec == UTIME_NOW)
                nanotime(&ts[0]);
! 
!       if (ts[1].tv_nsec == UTIME_NOW)
                nanotime(&ts[1]);
  
        if (vp == NULL) {
--- 3137,3149 ----
                }
        }
  
!       if (ts[0].tv_nsec == UTIME_NOW) {
                nanotime(&ts[0]);
!               if (ts[1].tv_nsec == UTIME_NOW) {
!                       vanull = true;
!                       ts[1] = ts[0];
!               }
!       } else if (ts[1].tv_nsec == UTIME_NOW)
                nanotime(&ts[1]);
  
        if (vp == NULL) {


Home | Main Index | Thread Index | Old Index