Page MenuHomeFreeBSD

makefs: Fix "time" mtree attribute handling
ClosedPublic

Authored by mhorne063_gmail.com on Mar 18 2019, 6:14 PM.
Tags
None
Referenced Files
F158225649: D19627.id55209.diff
Sat, May 30, 1:13 AM
F158190646: D19627.id.diff
Fri, May 29, 2:46 PM
F158179798: D19627.id55205.diff
Fri, May 29, 11:10 AM
Unknown Object (File)
Thu, May 28, 8:58 PM
Unknown Object (File)
Tue, May 26, 4:20 AM
Unknown Object (File)
Tue, May 26, 4:12 AM
Unknown Object (File)
Mon, May 25, 9:27 PM
Unknown Object (File)
Mon, May 25, 9:23 PM
Subscribers

Details

Summary

When processing mtree(5) MANIFEST files, makefs(8) throws will throw an
error if it encounters an entry whose "time" attribute contains a
non-zero subsecond component (e.g. time=1551620152.987220000).

Update the handling logic to properly assign the subsecond component if
built with nanosecond support, or silently discard it otherwise.

Also, re-enable the time attribute for the kyua tests.

PR: 194703

Test Plan

Ran makefs using METALOG, which contains timestamps for the kernel.

Ran the kyua tests.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

usr.sbin/makefs/mtree.c
656 ↗(On Diff #55205)

makefs is built without HAVE_STRUCT_STAT_ST_MTIMENSEC, and fails to compile with it defined. D19626 makes the change required to fix this, and I have tested that with both of these changes nanoseconds are handled properly for a generated UFS image.

This revision is now accepted and ready to land.Mar 18 2019, 6:22 PM
This revision was automatically updated to reflect the committed changes.