Skip to content

Commit

Permalink
ndctl_cmd_submit
Browse files Browse the repository at this point in the history
  • Loading branch information
osalyk committed Jul 25, 2024
1 parent 94e0ae0 commit 3a1582e
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/tests/ras/utils/dimm/dimm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ const int USC_VALID_FLAG = 1 << 5;
int Dimm::GetShutdownCount() const {
struct ndctl_cmd *cmd = ndctl_dimm_cmd_new_smart(dimm_);

if (ndctl_cmd_submit(cmd)) {
int ret = 0;
ret = ndctl_cmd_submit(cmd);
if (ret) {
return -1;
}

Expand All @@ -57,7 +59,9 @@ int Dimm::GetShutdownCount() const {
int Dimm::InjectUnsafeShutdown() const {
struct ndctl_cmd *cmd = ndctl_dimm_cmd_new_ack_shutdown_count(dimm_);

if (ndctl_cmd_submit(cmd)) {
int ret = 0;
ret = ndctl_cmd_submit(cmd);
if (ret) {
return -1;
}

Expand All @@ -73,7 +77,8 @@ int Dimm::InjectUnsafeShutdown() const {
return -1;
}

if (ndctl_cmd_submit(cmd)) {
ret = ndctl_cmd_submit(cmd);
if (ret) {
return -1;
}

Expand Down

0 comments on commit 3a1582e

Please sign in to comment.