File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -59,22 +59,23 @@ pub enum OutputMode {
5959 /// The format of the default output from df is unspecified,
6060 /// but all space figures are reported in 512-byte units
6161 Unspecified ,
62+ Unspecified1K ,
6263}
6364
6465impl OutputMode {
6566 pub fn new ( kilo : bool , portable : bool ) -> Self {
6667 match ( kilo, portable) {
6768 ( true , true ) => Self :: Posix ,
69+ ( true , false ) => Self :: Unspecified1K ,
6870 ( false , true ) => Self :: PosixLegacy ,
69- _ => Self :: Unspecified ,
71+ ( false , false ) => Self :: Unspecified ,
7072 }
7173 }
7274
7375 pub fn get_block_size ( & self ) -> u64 {
7476 match self {
75- OutputMode :: Posix => 1024 ,
76- OutputMode :: PosixLegacy => 512 ,
77- OutputMode :: Unspecified => 512 ,
77+ OutputMode :: Posix | OutputMode :: Unspecified1K => 1024 ,
78+ OutputMode :: PosixLegacy | OutputMode :: Unspecified => 512 ,
7879 }
7980 }
8081}
You can’t perform that action at this time.
0 commit comments