From d7a46dcaaf7fc83bcae120d8bb089471e31f0d76 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Mon, 18 Sep 2023 16:45:48 -0400 Subject: [PATCH] Print status and warning messages to stderr Also, fix warning!() to allow 0 arguments to match status!() and println!(). Signed-off-by: Andrew Gunnerson --- avbroot/src/cli/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/avbroot/src/cli/mod.rs b/avbroot/src/cli/mod.rs index 053e66b..f3d4ba9 100644 --- a/avbroot/src/cli/mod.rs +++ b/avbroot/src/cli/mod.rs @@ -14,13 +14,13 @@ pub mod ramdisk; macro_rules! status { ($($arg:tt)*) => { - println!("\x1b[1m[*] {}\x1b[0m", format!($($arg)*)) + eprintln!("\x1b[1m[*] {}\x1b[0m", format!($($arg)*)) } } macro_rules! warning { ($($arg:tt)*) => { - println!("\x1b[1;31m[WARNING] {}\x1b[0m", format!($($arg)+)) + eprintln!("\x1b[1;31m[WARNING] {}\x1b[0m", format!($($arg)*)) } }