Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F158225649
D19627.id55209.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D19627.id55209.diff
View Options
Index: head/usr.sbin/makefs/mtree.c
===================================================================
--- head/usr.sbin/makefs/mtree.c
+++ head/usr.sbin/makefs/mtree.c
@@ -644,14 +644,17 @@
st->st_atime = num;
st->st_ctime = num;
st->st_mtime = num;
+#if HAVE_STRUCT_STAT_ST_MTIMENSEC
if (p == NULL)
break;
error = read_number(p, 10, &num, 0,
INTMAX_MAX);
if (error)
break;
- if (num != 0)
- error = EINVAL;
+ st->st_atimensec = num;
+ st->st_ctimensec = num;
+ st->st_mtimensec = num;
+#endif
} else if (strcmp(keyword, "type") == 0) {
if (value == NULL) {
error = ENOATTR;
Index: head/usr.sbin/makefs/tests/makefs_tests_common.sh
===================================================================
--- head/usr.sbin/makefs/tests/makefs_tests_common.sh
+++ head/usr.sbin/makefs/tests/makefs_tests_common.sh
@@ -29,13 +29,7 @@
KB=1024
: ${TMPDIR=/tmp}
-# TODO: add mtree `time` support; get a lot of errors like this right now when
-# passing generating disk images with keyword mtree support, like:
-#
-# `[...]/mtree.spec:8: error: time: invalid value '1446458503'`
-#
-#DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link,time"
-DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link"
+DEFAULT_MTREE_KEYWORDS="type,mode,gid,uid,size,link,time"
TEST_IMAGE="$TMPDIR/test.img"
TEST_INPUTS_DIR="$TMPDIR/inputs"
TEST_MD_DEVICE_FILE="$TMPDIR/md.output"
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, May 31, 1:13 AM (18 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33619310
Default Alt Text
D19627.id55209.diff (1 KB)
Attached To
Mode
D19627: makefs: Fix "time" mtree attribute handling
Attached
Detach File
Event Timeline
Log In to Comment