mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-27 09:12:32 +00:00
parent
7b0771659e
commit
ba9b612c4f
@ -1242,8 +1242,10 @@ namespace {
|
||||
Libc::Plugin_context *context = noux_context(sysio()->open_out.fd);
|
||||
Libc::File_descriptor *fd =
|
||||
Libc::file_descriptor_allocator()->alloc(this, context, sysio()->open_out.fd);
|
||||
if ((flags & O_TRUNC) && (ftruncate(fd, 0) == -1))
|
||||
if ((flags & O_TRUNC) && (ftruncate(fd, 0) == -1)) {
|
||||
Plugin::close(fd);
|
||||
return 0;
|
||||
}
|
||||
return fd;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user