zonename

Function getzonename

Source
pub fn getzonename() -> Result<String>
Expand description

Returns the current zones name for the calling process.

ยงExample

let zid = zonename::getzoneid().expect("failed to get zoneid");
let zname = zonename::getzonenamebyid(zid).expect("failed to get zonename");
let zonename = zonename::getzonename().expect("failed to get zonename");
assert_eq!(zname, zonename);