Skip to content

Commit 24abc39

Browse files
committed
Fix: Account for newline in dgpu status
1 parent 6e8756c commit 24abc39

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sys/dgpu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl Device {
7474
.open(self.path.as_path().join("dgpu_power"))
7575
.context(ErrorKind::DeviceAccess)?;
7676

77-
let mut buf = [0; 4];
77+
let mut buf = [0; 5];
7878
let len = file.read(&mut buf).context(ErrorKind::Io)?;
7979
let len = std::cmp::min(len + 1, buf.len());
8080

0 commit comments

Comments
 (0)