-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
analyze: add new verb "smbios11" for listing passed smbios type #11 strings #32810
base: main
Are you sure you want to change the base?
Conversation
Would it make sense to have the tool optionally emit machine parsable output (ie omit the trailing log message)? |
that goes to stderr anyway (unlike the strings themselves) and you can always use SYSTEMD_LOG_TARGET=null... |
Right. I didn't pay attention to how the command is implemented, I just inferred from the documentation. Thanks! |
Important An -rc1 tag has been created and a release is being prepared, so please note that PRs introducing new features and APIs will be held back until the new version has been released. |
82d1206
to
12600ef
Compare
new version pushed, ptal |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Please add simple coverage tests for the new command.
btw, the message is now also suppressed if you add "-q" or "--quiet" to the cmdline |
I find myself wanting to check this data with a quick command, and browsing through /sys/ manually getting binary data sucks. Hence let's do add a nice little analysis tool.
done |
12600ef
to
1e6a0c5
Compare
p, | ||
max_size >= SIZE_MAX - offsetof(struct dmi_field_header, contents) ? SIZE_MAX : | ||
sizeof(dmi_field_header) + max_size, | ||
(char**) &data, &size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why not directly read into dmi_field_header
?
uint16_t handle; | ||
uint8_t count; | ||
char contents[]; | ||
} _packed_ *dmi_field_header; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i.e.:
} _packed_ *dmi_field_header; | |
} _packed_ * _cleanup_free_ dmi_field_header; |
There's no nice way to query this otherwise with default distro tools