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
|
struct Timestamp
|
||||||
{
|
{
|
||||||
static constexpr long long INVALID = (1LL << 63) + 1;
|
static constexpr Genode::int64_t INVALID = 0x7fffffffffffffffLL;
|
||||||
long long value;
|
Genode::int64_t value;
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class Node_type {
|
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_ino = src.inode;
|
||||||
buf->st_dev = src.device;
|
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;
|
buf->st_mtime = src.modification_time.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue