current logic ignore given data by user
so make priority to use user argument first
this change make available vendor specific command on set-feature, get-feature with data_len
Signed-off-by: Steven Seungcheol Lee <sc108.lee@samsung.com>
static int get_feature_id(int fd, struct feat_cfg *cfg, void **buf,
__u32 *result)
{
- nvme_get_feature_length(cfg->feature_id, cfg->cdw11, &cfg->data_len);
+ if (!cfg->data_len)
+ nvme_get_feature_length(cfg->feature_id, cfg->cdw11,
+ &cfg->data_len);
/* check for Extended Host Identifier */
if (cfg->feature_id == NVME_FEAT_FID_HOST_ID && (cfg->cdw11 & 0x1))