Skip to content

Commit 8e498f8

Browse files
committed
Clean up bits for crucible in propolis-standalone
1 parent 7f1e213 commit 8e498f8

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

bin/propolis-standalone/src/config.rs

+11-3
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,7 @@ pub fn block_backend(
4545
let creg = ChildRegister::new(&be, Some(path.to_string()));
4646
(be, creg)
4747
}
48-
#[cfg(feature = "crucible")]
4948
"crucible" => create_crucible_backend(log, be),
50-
#[cfg(not(feature = "crucible"))]
51-
"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"),
5249
_ => {
5350
panic!("unrecognized block dev type {}!", be.bdtype);
5451
}
@@ -202,3 +199,14 @@ fn create_crucible_backend(
202199
ChildRegister::new(&be, Some(be.get_uuid().unwrap().to_string()));
203200
(be, creg)
204201
}
202+
203+
#[cfg(not(feature = "crucible"))]
204+
fn create_crucible_backend(
205+
_log: &slog::Logger,
206+
_be: &propolis_standalone_config::BlockDevice,
207+
) -> (Arc<dyn block::Backend>, ChildRegister) {
208+
panic!(
209+
"Rebuild propolis-standalone with 'crucible' feature enabled in \
210+
order to use the crucible block backend"
211+
);
212+
}

xtask/src/task_clippy.rs

+4
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ pub(crate) fn cmd_clippy(strict: bool) -> Result<()> {
3939
failed |=
4040
run_clippy(&["-p", "propolis-server", "--features", "mock-only"])?;
4141

42+
// Check standalone with crucible enabled
43+
failed |=
44+
run_clippy(&["-p", "propolis-standalone", "--features", "crucible"])?;
45+
4246
if failed {
4347
bail!("Clippy failures detected")
4448
}

0 commit comments

Comments
 (0)