mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-07 19:34:56 +00:00
vfs/rtc: return timestamp size on stat()
This commit is contained in:
parent
99bdfbe36f
commit
0977574372
@ -27,6 +27,9 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
{
|
||||
private:
|
||||
|
||||
/* "1970-01-01 00:00\n" */
|
||||
enum { TIMESTAMP_LEN = 17 };
|
||||
|
||||
class Rtc_vfs_handle : public Single_vfs_handle
|
||||
{
|
||||
private:
|
||||
@ -51,8 +54,6 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
Read_result read(char *dst, file_size count,
|
||||
file_size &out_count) override
|
||||
{
|
||||
enum { TIMESTAMP_LEN = 17 };
|
||||
|
||||
if (seek() >= TIMESTAMP_LEN) {
|
||||
out_count = 0;
|
||||
return READ_OK;
|
||||
@ -137,7 +138,13 @@ class Vfs::Rtc_file_system : public Single_file_system
|
||||
|
||||
Stat_result stat(char const *path, Stat &out) override
|
||||
{
|
||||
return Single_file_system::stat(path, out);
|
||||
Stat_result result = Single_file_system::stat(path, out);
|
||||
|
||||
if (result == STAT_OK) {
|
||||
out.size = TIMESTAMP_LEN;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
Watch_result watch(char const *path,
|
||||
|
Loading…
x
Reference in New Issue
Block a user