Skip to content

Commit

Permalink
rust: Accept 64 bit values for rdev
Browse files Browse the repository at this point in the history
Pairs with containers#329
which adapts the C side to properly accept these too.

This breaks semver, we'll need to bump that.

Signed-off-by: Colin Walters <walters@verbum.org>
  • Loading branch information
cgwalters committed Sep 4, 2024
1 parent 47042e8 commit 30aabdf
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rust/composefs/src/dumpfile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub enum Item<'p> {
/// Number of links
nlink: u32,
/// The device number
rdev: u32,
rdev: u64,
},
/// A symbolic link
Symlink {
Expand Down Expand Up @@ -324,7 +324,7 @@ impl<'p> Entry<'p> {
let nlink = u32::from_str(next("nlink")?)?;
let uid = u32::from_str(next("uid")?)?;
let gid = u32::from_str(next("gid")?)?;
let rdev = u32::from_str(next("rdev")?)?;
let rdev = u64::from_str(next("rdev")?)?;
let mtime = Mtime::from_str(next("mtime")?)?;
let payload = optional_str(next("payload")?);
let content = optional_str(next("content")?);
Expand Down Expand Up @@ -410,7 +410,7 @@ impl<'p> Item<'p> {
}
}

pub(crate) fn rdev(&self) -> u32 {
pub(crate) fn rdev(&self) -> u64 {
match self {
Item::Device { rdev, .. } => *rdev,
_ => 0,
Expand Down

0 comments on commit 30aabdf

Please sign in to comment.