From owner-svn-src-stable@freebsd.org Fri Jan 15 20:55:46 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E213A82213; Fri, 15 Jan 2016 20:55:46 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E5DA1889; Fri, 15 Jan 2016 20:55:45 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0FKtiEN072592; Fri, 15 Jan 2016 20:55:44 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0FKtimi072589; Fri, 15 Jan 2016 20:55:44 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201601152055.u0FKtimi072589@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 15 Jan 2016 20:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r294099 - stable/10/lib/libc/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2016 20:55:46 -0000 Author: jilles Date: Fri Jan 15 20:55:44 2016 New Revision: 294099 URL: https://svnweb.freebsd.org/changeset/base/294099 Log: MFC r293783: futimens/utimensat: Use the new system calls. Update the __FreeBSD_version check in lib/libc/sys/futimens.c and lib/libc/sys/utimensat.c. Before this, fallback code using futimes/futimesat/lutimes was used except when running on a sufficiently recent 11-current kernel. Also, update the history section in the man page. Modified: stable/10/lib/libc/sys/futimens.c stable/10/lib/libc/sys/utimensat.2 stable/10/lib/libc/sys/utimensat.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/sys/futimens.c ============================================================================== --- stable/10/lib/libc/sys/futimens.c Fri Jan 15 18:53:06 2016 (r294098) +++ stable/10/lib/libc/sys/futimens.c Fri Jan 15 20:55:44 2016 (r294099) @@ -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: stable/10/lib/libc/sys/utimensat.2 ============================================================================== --- stable/10/lib/libc/sys/utimensat.2 Fri Jan 15 18:53:06 2016 (r294098) +++ stable/10/lib/libc/sys/utimensat.2 Fri Jan 15 20:55:44 2016 (r294099) @@ -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: stable/10/lib/libc/sys/utimensat.c ============================================================================== --- stable/10/lib/libc/sys/utimensat.c Fri Jan 15 18:53:06 2016 (r294098) +++ stable/10/lib/libc/sys/utimensat.c Fri Jan 15 20:55:44 2016 (r294099) @@ -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) {