vmm: fix HANDLED_SIGNALS build error

The error was:

	borrow the array with `&` or call `.iter()` on it to iterate
	over it

Fixes #3348
Signed-off-by: Barret Rhoden <brho@google.com>
This commit is contained in:
Barret Rhoden 2021-12-03 16:24:27 -05:00 committed by Sebastien Boeuf
parent b519975fc8
commit e08c747638
2 changed files with 4 additions and 4 deletions

View File

@ -513,8 +513,8 @@ fn start_vmm(cmd_arguments: ArgMatches) -> Result<Option<String>, Error> {
// Before we start any threads, mask the signals we'll be // Before we start any threads, mask the signals we'll be
// installing handlers for, to make sure they only ever run on the // installing handlers for, to make sure they only ever run on the
// dedicated signal handling thread we'll start in a bit. // dedicated signal handling thread we'll start in a bit.
for sig in vmm::vm::HANDLED_SIGNALS { for sig in &vmm::vm::HANDLED_SIGNALS {
if let Err(e) = block_signal(sig) { if let Err(e) = block_signal(*sig) {
eprintln!("Error blocking signals: {}", e); eprintln!("Error blocking signals: {}", e);
} }
} }

View File

@ -1654,8 +1654,8 @@ impl Vm {
on_tty: bool, on_tty: bool,
exit_evt: &EventFd, exit_evt: &EventFd,
) { ) {
for sig in HANDLED_SIGNALS { for sig in &HANDLED_SIGNALS {
unblock_signal(sig).unwrap(); unblock_signal(*sig).unwrap();
} }
for signal in signals.forever() { for signal in signals.forever() {