@@ -23,10 +23,7 @@ use hyperion_scheduler::{
23
23
spawn,
24
24
task:: { processes, Pid , TASKS_READY , TASKS_RUNNING , TASKS_SLEEPING } ,
25
25
} ;
26
- use hyperion_vfs:: {
27
- self ,
28
- path:: { Path , PathBuf } ,
29
- } ;
26
+ use hyperion_vfs:: { self , path:: PathBuf } ;
30
27
use spin:: Mutex ;
31
28
32
29
use super :: { term:: Term , * } ;
@@ -106,7 +103,11 @@ impl Shell {
106
103
}
107
104
108
105
pub fn init ( & mut self ) {
109
- _ = self . splash_cmd ( None ) ;
106
+ use hyperion_kernel_info:: { BUILD_REV , BUILD_TIME , NAME , VERSION } ;
107
+ _ = writeln ! (
108
+ self . term,
109
+ "Welcome to {NAME} - {VERSION} (built {BUILD_TIME} build [{BUILD_REV}])"
110
+ ) ;
110
111
self . prompt ( ) ;
111
112
self . term . flush ( ) ;
112
113
}
@@ -201,9 +202,6 @@ impl Shell {
201
202
. unwrap_or ( ( line, None ) ) ;
202
203
203
204
match cmd {
204
- "splash" => self . splash_cmd ( args) ?,
205
- "pwd" => self . pwd_cmd ( args) ?,
206
- "cd" => self . cd_cmd ( args) ?,
207
205
"kbl" => self . kbl_cmd ( args) ?,
208
206
"help" => self . help_cmd ( args) ?,
209
207
"ps" => self . ps_cmd ( args) ?,
@@ -372,28 +370,6 @@ impl Shell {
372
370
Ok ( ( ) )
373
371
}
374
372
375
- fn splash_cmd ( & mut self , _: Option < & str > ) -> Result < ( ) > {
376
- use hyperion_kernel_info:: { BUILD_REV , BUILD_TIME , NAME , VERSION } ;
377
- // _ = writeln!(self.term, "{SPLASH}");
378
- _ = writeln ! (
379
- self . term,
380
- "Welcome to {NAME} - {VERSION} (built {BUILD_TIME} build [{BUILD_REV}])"
381
- ) ;
382
- Ok ( ( ) )
383
- }
384
-
385
- fn pwd_cmd ( & mut self , _: Option < & str > ) -> Result < ( ) > {
386
- _ = writeln ! ( self . term, "{}" , self . current_dir. as_str( ) ) ;
387
- Ok ( ( ) )
388
- }
389
-
390
- fn cd_cmd ( & mut self , args : Option < & str > ) -> Result < ( ) > {
391
- let resource = Path :: from_str ( args. unwrap_or ( "/" ) ) . to_absolute ( & self . current_dir ) ;
392
- self . current_dir = resource. into_owned ( ) ;
393
-
394
- Ok ( ( ) )
395
- }
396
-
397
373
fn kbl_cmd ( & mut self , args : Option < & str > ) -> Result < ( ) > {
398
374
let name = args. unwrap_or ( "us" ) ;
399
375
if set_layout ( name) . is_none ( ) {
@@ -405,7 +381,10 @@ impl Shell {
405
381
}
406
382
407
383
fn help_cmd ( & mut self , _: Option < & str > ) -> Result < ( ) > {
408
- _ = writeln ! ( self . term, "available built-in shell commands:\n splash, pwd, cd, kbl, snake, help, ps, top, kill, exit, clear, lspci" ) ;
384
+ _ = writeln ! (
385
+ self . term,
386
+ "available built-in shell commands:\n kbl, help, ps, top, kill, exit, clear, lspci"
387
+ ) ;
409
388
410
389
Ok ( ( ) )
411
390
}
0 commit comments