Skip to content

Commit

Permalink
Make loop_info64 private
Browse files Browse the repository at this point in the history
It should not be public, it is internally passed to the ioctl but users of the library should not need to know about its internal details.
  • Loading branch information
mdaffin committed Mar 30, 2021
1 parent b063c2b commit 3422a33
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,7 @@ impl LoopDevice {
}

/// Attach the loop device to a file with loop_info.
///
/// # Examples
///
/// Attach the device with default loop_info values.
///
/// ```rust
/// use loopdev::{LoopDevice, loop_info64};
/// let ld = LoopDevice::open("/dev/loop5").unwrap();
/// ld.attach_with_loop_info("test.img", loop_info64::default()).unwrap();
/// # ld.detach().unwrap();
/// ```
pub fn attach_with_loop_info<P: AsRef<Path>>(
fn attach_with_loop_info<P: AsRef<Path>>(
&self,
backing_file: P,
loop_info: loop_info64,
Expand Down Expand Up @@ -280,7 +269,7 @@ impl LoopDevice {
}

#[repr(C)]
pub struct loop_info64 {
struct loop_info64 {
pub lo_device: u64,
pub lo_inode: u64,
pub lo_rdevice: u64,
Expand Down

0 comments on commit 3422a33

Please sign in to comment.