From 3422a332ef03b8766d85836676e66beb8f16ca47 Mon Sep 17 00:00:00 2001 From: Michael Daffin Date: Tue, 30 Mar 2021 22:25:56 +0100 Subject: [PATCH] Make loop_info64 private 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. --- src/lib.rs | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index f9513f4..eeeab20 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -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>( + fn attach_with_loop_info>( &self, backing_file: P, loop_info: loop_info64, @@ -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,