pub fn new(system_dir: Option<&str>) -> LvmResult<Self> {
        match system_dir {
            Some(s) => {
                let d = CString::new(s)?;

                unsafe {
                    let handle = lvm_init(d.as_ptr());
                    Ok(Lvm { handle })
                }
            }
            None => {
                let p = ptr::null();
                unsafe {
                    let handle = lvm_init(p);
                    Ok(Lvm { handle })
                }
            }
        }
    }
/// use system_dir to set an alternative LVM system directory
use system_dir to set an alternative LVM system directory
use system_dir to set an alternative LVM system directory
pub fn new(system_dir: Option<&str>) -> LvmResult<Self> {
        match system_dir {
            Some(s) => {
                let d = CString::new(s)?;
                unsafe {
                    let handle = lvm_init(d.as_ptr());
                    Ok(Lvm { handle })
                }
            }
            None => {
                let p = ptr::null();
                unsafe {
                    let handle = lvm_init(p);
                    Ok(Lvm { handle })
                }
            }
        }
    }
pub fn new ( system_dir : Option < & str > ) -> LvmResult < Self > { match system_dir { Some ( s ) => { let d = CString :: new ( s ) ? ; unsafe { let handle = lvm_init ( d . as_ptr ( ) ) ; Ok ( Lvm { handle } ) } } None => { let p = ptr :: null ( ) ; unsafe { let handle = lvm_init ( p ) ; Ok ( Lvm { handle } ) } } } }
use system_dir to set an alternative LVM system directory
use system_dir to set an alternative LVM system directory
system_dir
Option<&str>
system_dir
Option<&str>