File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ pub enum LsnsError {
1717 /// Invalid namespace type index
1818 InvalidNamespaceType ( usize ) ,
1919 /// Unsupported platform
20- #[ allow ( dead_code ) ]
20+ #[ cfg ( not ( target_os = "linux" ) ) ]
2121 UnsupportedPlatform ,
2222 /// Invalid namespace inode format
2323 InvalidNamespaceInodeFormat ( String ) ,
@@ -57,6 +57,7 @@ impl fmt::Display for LsnsError {
5757 Self :: IOError ( message, err) => write ! ( f, "{message}: {err}" ) ,
5858 Self :: NulError ( message, err) => write ! ( f, "{message}: {err}" ) ,
5959 Self :: InvalidNamespaceType ( idx) => write ! ( f, "Invalid namespace type index: {}" , idx) ,
60+ #[ cfg( not( target_os = "linux" ) ) ]
6061 Self :: UnsupportedPlatform => write ! ( f, "lsns is only supported on Linux" ) ,
6162 Self :: InvalidNamespaceInodeFormat ( s) => {
6263 write ! ( f, "Invalid namespace inode format: {}" , s)
You can’t perform that action at this time.
0 commit comments