fix: make kernel verbose with --kernel -v
This commit is contained in:
+11
-5
@@ -88,18 +88,24 @@ pub fn launch_qemu(config: QemuConfig) -> Result<()> {
|
||||
// Build kernel command line
|
||||
// For initramfs boot, use rdinit= instead of init=
|
||||
// No root= needed as initramfs becomes the rootfs
|
||||
// 'quiet' suppresses kernel log messages for a cleaner console
|
||||
// 'quiet' suppresses kernel log messages for a cleaner console (removed with -v)
|
||||
// The init script (added to initramfs) handles hostname, shell, and poweroff
|
||||
let quiet_flag = if crate::verbose::is_verbose() {
|
||||
""
|
||||
} else {
|
||||
" quiet"
|
||||
};
|
||||
|
||||
let kernel_append = if let Some(ref cmd) = config.command {
|
||||
let cmd_str = cmd.join(" ");
|
||||
format!(
|
||||
"console=ttyS0 quiet ECR_SHELL={} ECR_CMD=\"{}\" ECR_HOSTNAME={}",
|
||||
shell, cmd_str, hostname
|
||||
"console=ttyS0{} ECR_SHELL={} ECR_CMD=\"{}\" ECR_HOSTNAME={}",
|
||||
quiet_flag, shell, cmd_str, hostname
|
||||
)
|
||||
} else {
|
||||
format!(
|
||||
"console=ttyS0 quiet ECR_SHELL={} ECR_HOSTNAME={}",
|
||||
shell, hostname
|
||||
"console=ttyS0{} ECR_SHELL={} ECR_HOSTNAME={}",
|
||||
quiet_flag, shell, hostname
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user