fix: use u32 for parsing Linux partition blocks (#2234)

This commit is contained in:
Filipe Paniguel 2025-01-22 09:37:18 -03:00 committed by GitHub
parent 1f4d0eafb5
commit 456935658a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -117,7 +117,7 @@ impl Partitions {
let mut it = line.split_whitespace();
let Some(Ok(_major)) = it.next().map(|s| s.parse::<u16>()) else { continue };
let Some(Ok(_minor)) = it.next().map(|s| s.parse::<u16>()) else { continue };
let Some(Ok(_blocks)) = it.next().map(|s| s.parse::<u16>()) else { continue };
let Some(Ok(_blocks)) = it.next().map(|s| s.parse::<u32>()) else { continue };
if let Some(name) = it.next() {
set.insert(Self::unmangle_octal(name).into_owned());
}