diff --git a/bin/propolis-standalone/src/config.rs b/bin/propolis-standalone/src/config.rs index daec8219d..a9eeffacc 100644 --- a/bin/propolis-standalone/src/config.rs +++ b/bin/propolis-standalone/src/config.rs @@ -45,10 +45,7 @@ pub fn block_backend( let creg = ChildRegister::new(&be, Some(path.to_string())); (be, creg) } - #[cfg(feature = "crucible")] "crucible" => create_crucible_backend(log, be), - #[cfg(not(feature = "crucible"))] - "crucible" => panic!("crucible device specified in VM config, but propolis-standalone was not built with crucible support. rebuild propolis-standalone with the `crucible` feature enabled, or remove all crucible devices from your VM config"), _ => { panic!("unrecognized block dev type {}!", be.bdtype); } @@ -202,3 +199,14 @@ fn create_crucible_backend( ChildRegister::new(&be, Some(be.get_uuid().unwrap().to_string())); (be, creg) } + +#[cfg(not(feature = "crucible"))] +fn create_crucible_backend( + _log: &slog::Logger, + _be: &propolis_standalone_config::BlockDevice, +) -> (Arc, ChildRegister) { + panic!( + "Rebuild propolis-standalone with 'crucible' feature enabled in \ + order to use the crucible block backend" + ); +} diff --git a/xtask/src/task_clippy.rs b/xtask/src/task_clippy.rs index d9b542a78..9857bff46 100644 --- a/xtask/src/task_clippy.rs +++ b/xtask/src/task_clippy.rs @@ -39,6 +39,10 @@ pub(crate) fn cmd_clippy(strict: bool) -> Result<()> { failed |= run_clippy(&["-p", "propolis-server", "--features", "mock-only"])?; + // Check standalone with crucible enabled + failed |= + run_clippy(&["-p", "propolis-standalone", "--features", "crucible"])?; + if failed { bail!("Clippy failures detected") }