The value of NVME_FEAT_FID_TIMESTAMP cannot be set
to 0 through 'set-feature /dev/nvmeX -f 0xe -v 0'.
using argconfig_parse_seen() can fix this issue.
Signed-off-by: Xiaoyuan Zhang <zhxiaoy@outlook.com>
* should use the buffer method if the value exceeds this
* length.
*/
- if (cfg.feature_id == NVME_FEAT_FID_TIMESTAMP && cfg.value) {
+ if (cfg.feature_id == NVME_FEAT_FID_TIMESTAMP &&
+ argconfig_parse_seen(opts, "value")) {
memcpy(buf, &cfg.value, NVME_FEAT_TIMESTAMP_DATA_SIZE);
} else {
if (strlen(cfg.file))