summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/os/cgroup.zig4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/os/cgroup.zig b/src/os/cgroup.zig
index 761386a2f..4b5ccc4d3 100644
--- a/src/os/cgroup.zig
+++ b/src/os/cgroup.zig
@@ -185,9 +185,7 @@ pub fn controllers(alloc: Allocator, cgroup: []const u8) ![]const u8 {
// Read it all into memory -- we don't expect this file to ever
// be that large.
- var reader_buf: [4096]u8 = undefined;
- var reader = file.reader(&reader_buf);
- const contents = try reader.interface.readAlloc(
+ const contents = try file.readToEndAlloc(
alloc,
1 * 1024 * 1024, // 1MB
);