Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
uweseimet committed Sep 22, 2023
1 parent 2e82ef1 commit c01242a
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cpp/piscsi/piscsi_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -485,11 +485,13 @@ int Piscsi::run(span<char *> args)
return EXIT_FAILURE;
}

// Attach all specified devices
command.set_operation(ATTACH);
if (command.devices_size()) {
// Attach all specified devices
command.set_operation(ATTACH);

if (const CommandContext context(command, locale); !executor->ProcessCmd(context)) {
throw parser_exception("Can't execute " + PbOperation_Name(command.operation()));
if (const CommandContext context(command, locale); !executor->ProcessCmd(context)) {
throw parser_exception("Can't execute " + PbOperation_Name(command.operation()));
}
}

// Display and log the device list
Expand Down

0 comments on commit c01242a

Please sign in to comment.