Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvme: use argconfig_parse_seen to check the parameter #2430

Merged
merged 1 commit into from Jul 19, 2024
Merged

nvme: use argconfig_parse_seen to check the parameter #2430

merged 1 commit into from Jul 19, 2024

Conversation

ghost
Copy link

@ghost ghost commented Jul 18, 2024

The value of NVME_FEAT_FID_TIMESTAMP cannot be set to 0 through 'set-feature -f 0xe -v 0'
Using argconfig_parse_seen() can fix this issue

@ghost
Copy link
Author

ghost commented Jul 18, 2024

When the command "set-feature /dev/nvmeX -f 0xe -v 0" is used, the command should be executed immediately, and the value of FID_TIMESTAMP should be set to 0.
The current situation, is that the command waits to read data from stdin, and then, sets the read data to FID_TIMESTAMP

@igaw
Copy link
Collaborator

igaw commented Jul 18, 2024

The line is a bit long. Could you move condition to the next line and align it with (.

WARNING: line length of 103 exceeds 100 columns
#22: FILE: nvme.c:6418:
+ if (cfg.feature_id == NVME_FEAT_FID_TIMESTAMP && argconfig_parse_seen(opts, "value")) {

@ghost
Copy link
Author

ghost commented Jul 19, 2024

the parameter check code has been moved to the next line

@ghost
Copy link
Author

ghost commented Jul 19, 2024

modified the commit description

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 <[email protected]>
@igaw igaw merged commit 0979f22 into linux-nvme:master Jul 19, 2024
15 of 16 checks passed
@igaw
Copy link
Collaborator

igaw commented Jul 19, 2024

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants