mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
Streamline Timestamp::INVALID values
This is a follow-up patch for issue #1784 that solves two inconsistencies. - The Vfs::Timestamp::INVALID matches File_system::Timestamp::INVALID - The Noux libc plugin tests for Timestamp::INVALID instead of a positive value. The patch fixes the mtime info as shown in directory listings in Sculpt's inspect window.
This commit is contained in:
parent
3aaed7188f
commit
3ac970ac1d
@ -51,8 +51,8 @@ namespace Vfs {
|
||||
|
||||
struct Timestamp
|
||||
{
|
||||
static constexpr long long INVALID = (1LL << 63) + 1;
|
||||
long long value;
|
||||
static constexpr Genode::int64_t INVALID = 0x7fffffffffffffffLL;
|
||||
Genode::int64_t value;
|
||||
};
|
||||
|
||||
enum class Node_type {
|
||||
|
@ -419,7 +419,7 @@ static void _sysio_to_stat_struct(Noux::Sysio const *sysio, struct stat *buf)
|
||||
buf->st_ino = src.inode;
|
||||
buf->st_dev = src.device;
|
||||
|
||||
if (src.modification_time.value >= 0)
|
||||
if (src.modification_time.value != Vfs::Timestamp::INVALID)
|
||||
buf->st_mtime = src.modification_time.value;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user