xref: /DADK/dadk/src/actions/mod.rs (revision a013ae121c339d37b6fa5273770148fa161c730b)
1 use crate::context::DADKExecContext;
2 
3 pub mod rootfs;
4 pub mod user;
5 
6 pub fn run(ctx: DADKExecContext) {
7     match &ctx.command.action {
8         crate::console::Action::Kernel => {
9             unimplemented!("kernel command has not implemented for run yet.")
10         }
11         crate::console::Action::Rootfs(rootfs_command) => {
12             rootfs::run(&ctx, rootfs_command).expect("Run rootfs action error.")
13         }
14         crate::console::Action::User(user_command) => {
15             user::run(&ctx, user_command).expect("Run user action error.")
16         }
17     }
18 }
19