From owner-svn-src-head@freebsd.org Fri Nov 15 18:34:31 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9968E1ACF71; Fri, 15 Nov 2019 18:34:31 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47F6T33XLCz3DNy; Fri, 15 Nov 2019 18:34:31 +0000 (UTC) (envelope-from arichardson@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8249F1D033; Fri, 15 Nov 2019 18:34:30 +0000 (UTC) (envelope-from arichardson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id xAFIYUS2088861; Fri, 15 Nov 2019 18:34:30 GMT (envelope-from arichardson@FreeBSD.org) Received: (from arichardson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id xAFIYUes088860; Fri, 15 Nov 2019 18:34:30 GMT (envelope-from arichardson@FreeBSD.org) Message-Id: <201911151834.xAFIYUes088860@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: arichardson set sender to arichardson@FreeBSD.org using -f From: Alex Richardson Date: Fri, 15 Nov 2019 18:34:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r354739 - head/usr.sbin/makefs X-SVN-Group: head X-SVN-Commit-Author: arichardson X-SVN-Commit-Paths: head/usr.sbin/makefs X-SVN-Commit-Revision: 354739 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Nov 2019 18:34:31 -0000 Author: arichardson Date: Fri Nov 15 18:34:30 2019 New Revision: 354739 URL: https://svnweb.freebsd.org/changeset/base/354739 Log: makefs: Also set UFS di_birthtime when building on Linux Since st_birthtime doesn't exists on Linux (unless you use statx(2)), we instead populate it with the st_ctime value. Reviewed By: emaste Differential Revision: https://reviews.freebsd.org/D22386 Modified: head/usr.sbin/makefs/ffs.c Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Fri Nov 15 18:34:23 2019 (r354738) +++ head/usr.sbin/makefs/ffs.c Fri Nov 15 18:34:30 2019 (r354739) @@ -728,15 +728,22 @@ ffs_build_dinode2(struct ufs2_dinode *dinp, dirbuf_t * dinp->di_atime = st->st_atime; dinp->di_mtime = st->st_mtime; dinp->di_ctime = st->st_ctime; +#if HAVE_STRUCT_STAT_BIRTHTIME + dinp->di_birthtime = st->st_birthtime; +#else + dinp->di_birthtime = st->st_ctime; +#endif #if HAVE_STRUCT_STAT_ST_MTIMENSEC dinp->di_atimensec = st->st_atimensec; dinp->di_mtimensec = st->st_mtimensec; dinp->di_ctimensec = st->st_ctimensec; -#endif #if HAVE_STRUCT_STAT_BIRTHTIME - dinp->di_birthtime = st->st_birthtime; dinp->di_birthnsec = st->st_birthtimensec; +#else + dinp->di_birthnsec = st->st_ctimensec; #endif +#endif + /* not set: di_db, di_ib, di_blocks, di_spare */ membuf = NULL;