summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeffrey C. Ollie <jeff@ocjtech.us>2025-10-05 20:55:12 -0500
committerJeffrey C. Ollie <jeff@ocjtech.us>2025-10-05 21:03:14 -0500
commitd9de5909d9b3f95c3a91ed008d2246eb1aebcd99 (patch)
treebb197d8703fd9898f5d5c92fd87dd32a12db4a63 /src
parenta249b3da3a1c84de94d26dd83aa0b190bdd29739 (diff)
linux cgroup: also fix controllers()
This fix was found by Claude Code, but I manually reviewed this change and removed extraneous changes made by the AI tool. Co-authored-by: moderation <michael@sooper.org>
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
);