Skip to content

Commit

Permalink
fix/proc: fd flags should be parsed as octal number
Browse files Browse the repository at this point in the history
  • Loading branch information
kxxt committed May 4, 2024
1 parent efafa8d commit a98a6fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/proc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ pub fn read_fdinfo(pid: Pid, fd: i32) -> color_eyre::Result<FileDescriptorInfo>
let value = parts.next().unwrap_or("");
match key {
"pos:" => info.pos = value.parse()?,
"flags:" => info.flags = OFlag::from_bits_truncate(value.parse()?),
"flags:" => info.flags = OFlag::from_bits_truncate(c_int::from_str_radix(value, 8)?),
"mnt_id:" => info.mnt_id = value.parse()?,
"ino:" => info.ino = value.parse()?,
_ => info.extra.push(line),
Expand Down

0 comments on commit a98a6fd

Please sign in to comment.