Skip to content

Commit

Permalink
posix: Fix incorrect return in GET_RESOURCE_USAGE
Browse files Browse the repository at this point in the history
  • Loading branch information
Dennisbonke committed Feb 18, 2024
1 parent 91224a7 commit 5fdaa41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion posix/subsystem/src/requests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,14 +341,15 @@ async::result<void> serveRequests(std::shared_ptr<Process> self,
}else{
std::cout << "\e[31mposix: GET_RESOURCE_USAGE mode is not supported\e[39m"
<< std::endl;
user_time = 0;
// TODO: Return an error response.
}

helix::SendBuffer send_resp;

managarm::posix::SvrResponse resp;
resp.set_error(managarm::posix::Errors::SUCCESS);
resp.set_ru_user_time(stats.userTime);
resp.set_ru_user_time(user_time);

auto ser = resp.SerializeAsString();
auto &&transmit = helix::submitAsync(conversation, helix::Dispatcher::global(),
Expand Down

0 comments on commit 5fdaa41

Please sign in to comment.