MCPcopy Create free account
hub / github.com/bootc-dev/bootc / refresh

Method refresh

crates/blockdev/src/blockdev.rs:308–313  ·  view source on GitHub ↗

Re-query this device's information from lsblk, updating all fields. This is useful after partitioning when the device's children have changed.

(&mut self)

Source from the content-addressed store, hash-verified

306 /// Re-query this device's information from lsblk, updating all fields.
307 /// This is useful after partitioning when the device's children have changed.
308 pub fn refresh(&mut self) -> Result<()> {
309 let path = self.path();
310 let new_device = list_dev(Utf8Path::new(&path))?;
311 *self = new_device;
312 Ok(())
313 }
314
315 /// Read a sysfs property for this device and parse it as the target type.
316 fn read_sysfs_property<T>(&self, property: &str) -> Result<Option<T>>

Callers 1

install_create_rootfsFunction · 0.80

Calls 2

list_devFunction · 0.85
pathMethod · 0.45

Tested by

no test coverage detected