pub fn lookup(name: &str) -> Option<Self> {
        let name = CString::new(name).unwrap();
        let lvs_ptr = unsafe { vbdev_get_lvol_store_by_name(name.as_ptr()) };
        if lvs_ptr.is_null() {
            return None;
        }
        let lvs_bdev_ptr = unsafe { vbdev_get_lvs_bdev_by_lvs(lvs_ptr) };
        if lvs_bdev_ptr.is_null() {
            // can happen if lvs is being destroyed
            return None;
        }
        Some(Self {
            lvs_ptr,
            lvs_bdev_ptr,
        })
    }
/// Look up existing pool by name
Look up existing pool by name
Look up existing pool by name
pub fn lookup(name: &str) -> Option<Self> {
        let name = CString::new(name).unwrap();
        let lvs_ptr = unsafe { vbdev_get_lvol_store_by_name(name.as_ptr()) };
        if lvs_ptr.is_null() {
            return None;
        }
        let lvs_bdev_ptr = unsafe { vbdev_get_lvs_bdev_by_lvs(lvs_ptr) };
        if lvs_bdev_ptr.is_null() {
            // can happen if lvs is being destroyed
            return None;
        }
        Some(Self {
            lvs_ptr,
            lvs_bdev_ptr,
        })
    }
pub fn lookup ( name : & str ) -> Option < Self > { let name = CString :: new ( name ) . unwrap ( ) ; let lvs_ptr = unsafe { vbdev_get_lvol_store_by_name ( name . as_ptr ( ) ) } ; if lvs_ptr . is_null ( ) { return None ; } let lvs_bdev_ptr = unsafe { vbdev_get_lvs_bdev_by_lvs ( lvs_ptr ) } ; if lvs_bdev_ptr . is_null ( ) { // can happen if lvs is being destroyed return None ; } Some ( Self { lvs_ptr , lvs_bdev_ptr , } ) }
Look up existing pool by name
Look up existing pool by name
name
&str
name
&str