fix(linux-kernel): fix kernel info parsing by trimming null bytes
This commit is contained in:
1 parent
7669da5ae8
commit
0beec60a8a
1 file changed
+2
-2
@@ -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)),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user