Skip to content

Commit

Permalink
ocp: fix option handling in internal-log
Browse files Browse the repository at this point in the history
When the noraml format is specified without -t option to
ocp internal-log command, the command ends abnormally with
segmentation fault.
This commit fixes the option handling.

Signed-off-by: Tetsuya TAKAHASHI <[email protected]>
  • Loading branch information
Ted1642 authored and igaw committed Oct 2, 2024
1 parent bed5550 commit 2371a4f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugins/ocp/ocp-nvme.c
Original file line number Diff line number Diff line change
Expand Up @@ -1775,6 +1775,9 @@ static int ocp_telemetry_log(int argc, char **argv, struct command *cmd,
if (err)
return err;

if (opt.telemetry_type == 0)
opt.telemetry_type = "host";

err = fstat(dev_fd(dev), &nvme_stat);
if (err < 0)
return err;
Expand Down

0 comments on commit 2371a4f

Please sign in to comment.