@@ -23,7 +23,16 @@ mod print_file;
2323mod read_stdin;
2424mod replace_file_content;
2525mod rm;
26+ #[ cfg( target_os = "linux" ) ]
27+ mod small_dev_shm;
28+ #[ cfg( not( target_os = "linux" ) ) ]
29+ mod small_dev_shm {
30+ pub fn run ( _args : & [ String ] ) -> anyhow:: Result < ( ) > {
31+ anyhow:: bail!( "vtt small_dev_shm is only supported on Linux" )
32+ }
33+ }
2634mod stat_file;
35+ mod stat_long_filename;
2736mod touch_file;
2837mod write_file;
2938
@@ -32,7 +41,7 @@ fn main() {
3241 if args. len ( ) < 2 {
3342 eprintln ! ( "Usage: vtt <subcommand> [args...]" ) ;
3443 eprintln ! (
35- "Subcommands: barrier, check-tty, cp, exit, exit-on-ctrlc, grep-file, list-dir, mkdir, pipe-stdin, print, print-color, print-cwd, print-env, print-file, read-stdin, replace-file-content, rm, stat-file, touch-file, write-file"
44+ "Subcommands: barrier, check-tty, cp, exit, exit-on-ctrlc, grep-file, list-dir, mkdir, pipe-stdin, print, print-color, print-cwd, print-env, print-file, read-stdin, replace-file-content, rm, small_dev_shm, stat-file, stat_long_filename , touch-file, write-file"
3645 ) ;
3746 std:: process:: exit ( 1 ) ;
3847 }
@@ -64,10 +73,12 @@ fn main() {
6473 "read-stdin" => read_stdin:: run ( ) ,
6574 "replace-file-content" => replace_file_content:: run ( & args[ 2 ..] ) ,
6675 "rm" => rm:: run ( & args[ 2 ..] ) ,
76+ "small_dev_shm" => small_dev_shm:: run ( & args[ 2 ..] ) . map_err ( Into :: into) ,
6777 "stat-file" => {
6878 stat_file:: run ( & args[ 2 ..] ) ;
6979 Ok ( ( ) )
7080 }
81+ "stat_long_filename" => stat_long_filename:: run ( & args[ 2 ..] ) ,
7182 "touch-file" => touch_file:: run ( & args[ 2 ..] ) ,
7283 "write-file" => write_file:: run ( & args[ 2 ..] ) ,
7384 other => {
0 commit comments