diff options
author | Andreas Kling <kling@serenityos.org> | 2020-11-14 10:44:47 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-11-14 10:44:47 +0100 |
commit | abe9cec612bf95f76451beb8e7bdc7f9c7edb0b3 (patch) | |
tree | 1cfacef7ccc85e2a85a8049b1530e4f546ff62ba /Kernel/FileSystem | |
parent | 117274663390395d9ac990b1b69a08f4a8eafba5 (diff) | |
download | serenity-abe9cec612bf95f76451beb8e7bdc7f9c7edb0b3.zip |
TmpFS: Set the root inode's timestamp to the current time
cc @bcoles :^)
Diffstat (limited to 'Kernel/FileSystem')
-rw-r--r-- | Kernel/FileSystem/TmpFS.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Kernel/FileSystem/TmpFS.cpp b/Kernel/FileSystem/TmpFS.cpp index 54f2b77d09..4b3de115e3 100644 --- a/Kernel/FileSystem/TmpFS.cpp +++ b/Kernel/FileSystem/TmpFS.cpp @@ -114,6 +114,10 @@ NonnullRefPtr<TmpFSInode> TmpFSInode::create(TmpFS& fs, InodeMetadata metadata, NonnullRefPtr<TmpFSInode> TmpFSInode::create_root(TmpFS& fs) { InodeMetadata metadata; + auto now = kgettimeofday(); + metadata.atime = now.tv_sec; + metadata.ctime = now.tv_sec; + metadata.mtime = now.tv_sec; metadata.mode = S_IFDIR | S_ISVTX | 0777; return create(fs, metadata, { fs.fsid(), 1 }); } |