Kernel: Use TRY() in sys$write()

This commit is contained in:
Andreas Kling 2021-09-05 18:10:27 +02:00
parent 17933b193a
commit afc5bbd56b
Notes: sideshowbarker 2024-07-18 04:41:05 +09:00

View file

@ -62,9 +62,7 @@ KResultOr<FlatPtr> Process::do_write(FileDescription& description, const UserOrK
size_t total_nwritten = 0;
if (description.should_append() && description.file().is_seekable()) {
auto seek_result = description.seek(0, SEEK_END);
if (seek_result.is_error())
return seek_result.error();
TRY(description.seek(0, SEEK_END));
}
while (total_nwritten < data_size) {