Skip to content

ocp: print the C6h Born on Date as a string - #4490

Open
brgoing wants to merge 2 commits into
linux-nvme:masterfrom
Micron-ITP-OSS:bgoing/ocp-hwcomp-born-on-date
Open

brgoing wants to merge 2 commits into
linux-nvme:masterfrom
Micron-ITP-OSS:bgoing/ocp-hwcomp-born-on-date

Conversation

@brgoing

@brgoing brgoing commented Dec 3, 2026

Copy link
Copy Markdown
Collaborator

OCP 2.6 and 2.7 define the Hardware Component log's Born on Date (000Ch) Additional Information as an ASCII MMDDYYYY string, but nvme ocp hardware-component-log printed it as a little-endian hex number. Born on Date now prints as a string in text and JSON output, the same as Country of Origin.

  • Print a string field as a string only when it is present: a Country of Origin with Additional Information Size 0h printed an empty line in text and an empty string in JSON, and passed a NULL pointer to %s. It is now left out like any other empty field.
  • List born-on-date (000Ch) in the --comp-id table of the man page, which still showed 000Ch as reserved.

Adds Country of Origin and Born on Date coverage, including padding and empty fields, to tests/cli/cmds_ocp/ocp_hwcomp_log_mock_test.py.

OCP 2.6 CITYPE-15 defines the Born on Date Additional Information as
an ASCII string in MMDDYYYY format. Print it as a string in text and
JSON output, as Country of Origin is. It was printed as a little-endian
hex number, which reversed its bytes.

Print a string field as a string only when it exists. With Additional
Information Size 0h, Country of Origin printed an empty line in text
and an empty string in JSON, and passed a NULL pointer to %s; it is
now left out like any other empty field.

Signed-off-by: Broc Going <bgoing@micron.com>
List 000Ch 'born-on-date' in the --comp-id table and narrow the
reserved range to 000Dh-7FFFh, as OCP 2.6 CITYPE-13 and CITYPE-15
define them. The option has accepted born-on-date since commit
1e842b6, but the table still showed 000Ch as reserved.

Signed-off-by: Broc Going <bgoing@micron.com>

This branch has not been deployed

No deployments
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.

1 participant