0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-19 19:33:45 +02:00

modules/console: Use incremental reads from proc anyway.

This commit is contained in:
Jason Volk 2018-12-19 12:29:44 -08:00
parent eaea2c40a4
commit 7137280b05

View file

@ -686,17 +686,21 @@ console_cmd__proc(opt &out, const string_view &line)
fs::read_opts opts;
opts.aio = false;
opts.offset = 0;
const unique_buffer<mutable_buffer> buf
{
64_KiB
info::page_size
};
const string_view read
string_view read; do
{
fs::read(fd, buf, opts)
};
read = fs::read(fd, buf, opts);
opts.offset += size(read);
out << read;
}
while(!empty(read));
out << read << std::endl;
out << std::endl;
return true;
}