noux: don't update mtimes for read-only files

The VFS server as reworked in issue #3547 responds to such an attempt
with a failure as acknowledgement, triggering the client-side error
"Error: packet operation=2 failed" at noux.
This commit is contained in:
Norman Feske 2019-11-07 22:16:03 +01:00 committed by Christian Helmuth
parent 65d72fb07a
commit 1485cd9d24

View File

@ -88,12 +88,14 @@ struct Noux::Vfs_io_channel : Io_channel
Registered_no_delete<Vfs_io_waiter>
vfs_io_waiter(_vfs_io_waiter_registry);
for (;;) {
if (_fh.fs().update_modification_timestamp(&_fh, ts)) {
break;
} else {
Genode::error("_sync: update_modification_timestamp failed");
vfs_io_waiter.wait_for_io();
if (_fh.status_flags() != Sysio::OPEN_MODE_RDONLY) {
for (;;) {
if (_fh.fs().update_modification_timestamp(&_fh, ts)) {
break;
} else {
Genode::error("_sync: update_modification_timestamp failed");
vfs_io_waiter.wait_for_io();
}
}
}