Skip to content

Commit

Permalink
fix: use major-minor c_uint equivalent
Browse files Browse the repository at this point in the history
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
  • Loading branch information
cafkafk committed Jul 30, 2023
1 parent 90563c2 commit b1e642c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ name = "eza"
ansi_term = "0.12"
glob = "0.3"
lazy_static = "1.3"
# ensure https://github.com/cafkafk/eza/pull/13 hasn't changed before updating libc
libc = "0.2.135"
locale = "0.2"
log = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/fs/fields.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ pub enum Size {
/// - <http://www.lanana.org/docs/device-list/devices-2.6+.txt>
#[derive(Copy, Clone)]
pub struct DeviceIDs {
pub major: i64,
pub minor: i64,
pub major: u32,
pub minor: u32,
}


Expand Down
4 changes: 2 additions & 2 deletions src/fs/file.rs
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ impl<'dir> File<'dir> {
// SAFETY: `major()` and `minor()` can return an unsigned integer
// of at most 32bits, so an `i64` is going to accomodate them well
f::Size::DeviceIDs(f::DeviceIDs {
major: unsafe { major(device_ids) as i64 },
minor: unsafe { minor(device_ids) as i64 },
major: unsafe { major(device_ids) },
minor: unsafe { minor(device_ids) },
})
}
else {
Expand Down

0 comments on commit b1e642c

Please sign in to comment.