fix(linux-kernel): fix kernel info parsing by trimming null bytes

This commit is contained in:
utox39
2025-08-01 06:25:30 +02:00
parent 7669da5ae8
commit 0beec60a8a

View File

@@ -70,8 +70,8 @@ pub fn getKernelInfo(allocator: std.mem.Allocator) !KernelInfo {
}
return KernelInfo{
.kernel_name = try allocator.dupe(u8, &uts.sysname),
.kernel_release = try allocator.dupe(u8, &uts.release),
.kernel_name = try allocator.dupe(u8, std.mem.sliceTo(&uts.sysname, 0)),
.kernel_release = try allocator.dupe(u8, std.mem.sliceTo(&uts.release, 0)),
};
}