Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jan 2016 20:53:57 +0000 (UTC)
From:      Jilles Tjoelker <jilles@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r293783 - head/lib/libc/sys
Message-ID:  <201601122053.u0CKrvmB060658@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jilles
Date: Tue Jan 12 20:53:57 2016
New Revision: 293783
URL: https://svnweb.freebsd.org/changeset/base/293783

Log:
  Update futimens/utimensat for MFC to stable/10:
  
  * Fix __FreeBSD_version check.
  * Update history section in man page.
  
  An MFC of this commit to stable/10 will allow using the new system calls
  instead of the fallback.
  
  MFC after:	3 days

Modified:
  head/lib/libc/sys/futimens.c
  head/lib/libc/sys/utimensat.2
  head/lib/libc/sys/utimensat.c

Modified: head/lib/libc/sys/futimens.c
==============================================================================
--- head/lib/libc/sys/futimens.c	Tue Jan 12 19:33:43 2016	(r293782)
+++ head/lib/libc/sys/futimens.c	Tue Jan 12 20:53:57 2016	(r293783)
@@ -42,8 +42,11 @@ futimens(int fd, const struct timespec t
 {
 	struct timeval now, tv[2], *tvp;
 	struct stat sb;
+	int osreldate;
 
-	if (__getosreldate() >= 1100056)
+	osreldate = __getosreldate();
+	if (osreldate >= 1100056 ||
+	    (osreldate >= 1002506 && osreldate < 1100000))
 		return (__sys_futimens(fd, times));
 
 	if (times == NULL || (times[0].tv_nsec == UTIME_NOW &&

Modified: head/lib/libc/sys/utimensat.2
==============================================================================
--- head/lib/libc/sys/utimensat.2	Tue Jan 12 19:33:43 2016	(r293782)
+++ head/lib/libc/sys/utimensat.2	Tue Jan 12 20:53:57 2016	(r293783)
@@ -31,7 +31,7 @@
 .\"     @(#)utimes.2	8.1 (Berkeley) 6/4/93
 .\" $FreeBSD$
 .\"
-.Dd January 23, 2015
+.Dd January 12, 2016
 .Dt UTIMENSAT 2
 .Os
 .Sh NAME
@@ -289,4 +289,4 @@ The
 and
 .Fn utimensat
 system calls appeared in
-.Fx 11.0 .
+.Fx 10.3 .

Modified: head/lib/libc/sys/utimensat.c
==============================================================================
--- head/lib/libc/sys/utimensat.c	Tue Jan 12 19:33:43 2016	(r293782)
+++ head/lib/libc/sys/utimensat.c	Tue Jan 12 20:53:57 2016	(r293783)
@@ -42,8 +42,11 @@ utimensat(int fd, const char *path, cons
 {
 	struct timeval now, tv[2], *tvp;
 	struct stat sb;
+	int osreldate;
 
-	if (__getosreldate() >= 1100056)
+	osreldate = __getosreldate();
+	if (osreldate >= 1100056 ||
+	    (osreldate >= 1002506 && osreldate < 1100000))
 		return (__sys_utimensat(fd, path, times, flag));
 
 	if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201601122053.u0CKrvmB060658>