From: Randy Date: Fri, 20 Mar 2020 13:50:09 +0000 (-0500) Subject: TP-4574 - fix invalid type option X-Git-Tag: v1.11~8^2~3 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=262be2228a7f89065f8ea7c48c6d1076a23eddb8;p=users%2Fhch%2Fnvme-cli.git TP-4574 - fix invalid type option --- diff --git a/plugins/wdc/wdc-nvme.c b/plugins/wdc/wdc-nvme.c index c80c65d..458e87c 100644 --- a/plugins/wdc/wdc-nvme.c +++ b/plugins/wdc/wdc-nvme.c @@ -2220,6 +2220,9 @@ static int wdc_vs_internal_fw_log(int argc, char **argv, struct command *command (!strcmp(cfg.type, "controller"))) { telemetry_type = WDC_TELEMETRY_TYPE_CONTROLLER; telemetry_data_area = cfg.data_area; + } else { + fprintf(stderr, "ERROR : WDC: Invalid type - Must be NONE, HOST or CONTROLLER\n"); + return -1; } return wdc_do_cap_diag(fd, f, xfer_size, telemetry_type, telemetry_data_area);