MCPcopy Create free account
hub / github.com/Starry-OS/StarryOS / get_info

Method get_info

api/src/vfs/dev/loop.rs:43–51  ·  view source on GitHub ↗

Get information about the loop device.

(&self)

Source from the content-addressed store, hash-verified

41
42 /// Get information about the loop device.
43 pub fn get_info(&self) -> AxResult<loop_info> {
44 if self.file.lock().is_none() {
45 return Err(AxError::from(LinuxError::ENXIO));
46 }
47 let mut res: loop_info = unsafe { core::mem::zeroed() };
48 res.lo_number = self.number as _;
49 res.lo_rdevice = self.dev_id.0 as _;
50 Ok(res)
51 }
52
53 /// Set information for the loop device.
54 pub fn set_info(&self, _src: loop_info) -> AxResult<()> {

Callers 1

ioctlMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected