vasilito 5bb745ec6f libredox: Fd::ftruncate and Fd::futimens take &self, not self
POSIX ftruncate(2) and futimens(2) do not close the file descriptor.
The previous 'self' (by-value) signature consumed the Fd on call, which
would trigger Fd::drop and close the fd as a side effect. After a
successful ftruncate the user could no longer use the fd, which is
the opposite of the intended semantics.

Change to '&self' to match the surrounding methods (fsync, fdatasync
both already use &self) and to match POSIX behaviour. The drop-on-
failure semantics is preserved by Rust's normal borrow checker: if
ftruncate returns Err, the caller's borrow is still valid and the
fd stays open.
2026-07-27 17:05:08 +09:00
2023-09-28 16:32:39 +02:00
2023-10-12 20:17:57 +02:00
S
Description
RedBear Operating System, based on RedoxOS. Licenced under MIT license.
https://redbearos.org
MIT 18 GiB
Languages
C 37.5%
C++ 37.2%
JavaScript 6.7%
QML 3.4%
HTML 3.2%
Other 11.4%