mirror of
https://gitlab.freedesktop.org/emersion/libdisplay-info.git
synced 2024-11-16 19:48:30 +01:00
di-edid-decode: only print serial number if non-zero
Upstream edid-decode hides the serial number in this case. The spec says that it's optional, and set to zero when unused. Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
parent
10435a83e8
commit
742697cb98
2 changed files with 4 additions and 2 deletions
|
@ -168,7 +168,9 @@ main(void)
|
|||
printf(" Vendor & Product Identification:\n");
|
||||
printf(" Manufacturer: %.3s\n", vendor_product->manufacturer);
|
||||
printf(" Model: %" PRIu16 "\n", vendor_product->product);
|
||||
printf(" Serial Number: %" PRIu32 "\n", vendor_product->serial);
|
||||
if (vendor_product->serial != 0) {
|
||||
printf(" Serial Number: %" PRIu32 "\n", vendor_product->serial);
|
||||
}
|
||||
if (vendor_product->model_year != 0) {
|
||||
printf(" Model year: %d\n", vendor_product->model_year);
|
||||
} else {
|
||||
|
|
|
@ -36,7 +36,7 @@ di_edid_get_revision(const struct di_edid *edid);
|
|||
struct di_edid_vendor_product {
|
||||
char manufacturer[3];
|
||||
uint16_t product;
|
||||
uint32_t serial;
|
||||
uint32_t serial; /* zero if unset */
|
||||
|
||||
/* These fields are zero if unset */
|
||||
int manufacture_week;
|
||||
|
|
Loading…
Reference in a new issue