|
|
fc71ac |
From 61f3f163b98b271c6613b9744128b99f33e6e19e Mon Sep 17 00:00:00 2001
|
|
|
fc71ac |
From: Jean Delvare <jdelvare@suse.de>
|
|
|
fc71ac |
Date: Mon, 23 Mar 2020 16:47:37 +0100
|
|
|
fc71ac |
Subject: [PATCH 06/23] dmidecode: Reduce the indentation of type 42 structures
|
|
|
fc71ac |
|
|
|
fc71ac |
There is no reason to indent the device information that much in type
|
|
|
fc71ac |
42 structures. Remove the extra level of indentation for consistency
|
|
|
fc71ac |
and readability.
|
|
|
fc71ac |
|
|
|
fc71ac |
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
fc71ac |
---
|
|
|
fc71ac |
dmidecode.c | 40 ++++++++++++++++++++--------------------
|
|
|
fc71ac |
1 file changed, 20 insertions(+), 20 deletions(-)
|
|
|
fc71ac |
|
|
|
fc71ac |
diff --git a/dmidecode.c b/dmidecode.c
|
|
|
fc71ac |
index 0d95cf9d8f7b..fc140e7e36a9 100644
|
|
|
fc71ac |
--- a/dmidecode.c
|
|
|
fc71ac |
+++ b/dmidecode.c
|
|
|
fc71ac |
@@ -3545,7 +3545,7 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
|
|
|
fc71ac |
/* DSP0270: 8.5: Protocol Record Data */
|
|
|
fc71ac |
rdata = &rec[0x2];
|
|
|
fc71ac |
|
|
|
fc71ac |
- printf("%s\tProtocol ID: %02x (%s)\n", prefix, rid,
|
|
|
fc71ac |
+ printf("%sProtocol ID: %02x (%s)\n", prefix, rid,
|
|
|
fc71ac |
dmi_protocol_record_type(rid));
|
|
|
fc71ac |
|
|
|
fc71ac |
/*
|
|
|
fc71ac |
@@ -3575,7 +3575,7 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
|
|
|
fc71ac |
* endianess of the field is always little after version 2.6.0
|
|
|
fc71ac |
* we can just pick a sufficiently recent version here.
|
|
|
fc71ac |
*/
|
|
|
fc71ac |
- printf("%s\t\tService UUID: ", prefix);
|
|
|
fc71ac |
+ printf("%s\tService UUID: ", prefix);
|
|
|
fc71ac |
dmi_system_uuid(&rdata[0], 0x311);
|
|
|
fc71ac |
printf("\n");
|
|
|
fc71ac |
|
|
|
fc71ac |
@@ -3585,13 +3585,13 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
|
|
|
fc71ac |
* uses decimal, so as to make it more comparable
|
|
|
fc71ac |
*/
|
|
|
fc71ac |
assign_val = rdata[16];
|
|
|
fc71ac |
- printf("%s\t\tHost IP Assignment Type: %s\n", prefix,
|
|
|
fc71ac |
+ printf("%s\tHost IP Assignment Type: %s\n", prefix,
|
|
|
fc71ac |
dmi_protocol_assignment_type(assign_val));
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Redfish Over IP Host Address format */
|
|
|
fc71ac |
addrtype = rdata[17];
|
|
|
fc71ac |
addrstr = dmi_address_type(addrtype);
|
|
|
fc71ac |
- printf("%s\t\tHost IP Address Format: %s\n", prefix,
|
|
|
fc71ac |
+ printf("%s\tHost IP Address Format: %s\n", prefix,
|
|
|
fc71ac |
addrstr);
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6 IP Assignment types */
|
|
|
fc71ac |
@@ -3599,24 +3599,24 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
|
|
|
fc71ac |
if (assign_val == 0x1 || assign_val == 0x3)
|
|
|
fc71ac |
{
|
|
|
fc71ac |
/* DSP0270: 8.6: the Host IPv[4|6] Address */
|
|
|
fc71ac |
- printf("%s\t\t%s Address: %s\n", prefix, addrstr,
|
|
|
fc71ac |
+ printf("%s\t%s Address: %s\n", prefix, addrstr,
|
|
|
fc71ac |
dmi_address_decode(&rdata[18], buf, addrtype));
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Prints the Host IPv[4|6] Mask */
|
|
|
fc71ac |
- printf("%s\t\t%s Mask: %s\n", prefix, addrstr,
|
|
|
fc71ac |
+ printf("%s\t%s Mask: %s\n", prefix, addrstr,
|
|
|
fc71ac |
dmi_address_decode(&rdata[34], buf, addrtype));
|
|
|
fc71ac |
}
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Get the Redfish Service IP Discovery Type */
|
|
|
fc71ac |
assign_val = rdata[50];
|
|
|
fc71ac |
/* Redfish Service IP Discovery type mirrors Host IP Assignment type */
|
|
|
fc71ac |
- printf("%s\t\tRedfish Service IP Discovery Type: %s\n", prefix,
|
|
|
fc71ac |
+ printf("%s\tRedfish Service IP Discovery Type: %s\n", prefix,
|
|
|
fc71ac |
dmi_protocol_assignment_type(assign_val));
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Get the Redfish Service IP Address Format */
|
|
|
fc71ac |
addrtype = rdata[51];
|
|
|
fc71ac |
addrstr = dmi_address_type(addrtype);
|
|
|
fc71ac |
- printf("%s\t\tRedfish Service IP Address Format: %s\n", prefix,
|
|
|
fc71ac |
+ printf("%s\tRedfish Service IP Address Format: %s\n", prefix,
|
|
|
fc71ac |
addrstr);
|
|
|
fc71ac |
|
|
|
fc71ac |
if (assign_val == 0x1 || assign_val == 0x3)
|
|
|
fc71ac |
@@ -3625,20 +3625,20 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
|
|
|
fc71ac |
u32 vlan;
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Prints the Redfish IPv[4|6] Service Address */
|
|
|
fc71ac |
- printf("%s\t\t%s Redfish Service Address: %s\n", prefix,
|
|
|
fc71ac |
+ printf("%s\t%s Redfish Service Address: %s\n", prefix,
|
|
|
fc71ac |
addrstr, dmi_address_decode(&rdata[52], buf,
|
|
|
fc71ac |
addrtype));
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Prints the Redfish IPv[4|6] Service Mask */
|
|
|
fc71ac |
- printf("%s\t\t%s Redfish Service Mask: %s\n", prefix,
|
|
|
fc71ac |
+ printf("%s\t%s Redfish Service Mask: %s\n", prefix,
|
|
|
fc71ac |
addrstr, dmi_address_decode(&rdata[68], buf,
|
|
|
fc71ac |
addrtype));
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Redfish vlan and port info */
|
|
|
fc71ac |
port = WORD(&rdata[84]);
|
|
|
fc71ac |
vlan = DWORD(&rdata[86]);
|
|
|
fc71ac |
- printf("%s\t\tRedfish Service Port: %hu\n", prefix, port);
|
|
|
fc71ac |
- printf("%s\t\tRedfish Service Vlan: %u\n", prefix, vlan);
|
|
|
fc71ac |
+ printf("%s\tRedfish Service Port: %hu\n", prefix, port);
|
|
|
fc71ac |
+ printf("%s\tRedfish Service Vlan: %u\n", prefix, vlan);
|
|
|
fc71ac |
}
|
|
|
fc71ac |
|
|
|
fc71ac |
/* DSP0270: 8.6: Redfish host length and name */
|
|
|
fc71ac |
@@ -3655,7 +3655,7 @@ static void dmi_parse_protocol_record(const char *prefix, u8 *rec)
|
|
|
fc71ac |
hname = out_of_spec;
|
|
|
fc71ac |
hlen = strlen(out_of_spec);
|
|
|
fc71ac |
}
|
|
|
fc71ac |
- printf("%s\t\tRedfish Service Hostname: %.*s\n", prefix, hlen, hname);
|
|
|
fc71ac |
+ printf("%s\tRedfish Service Hostname: %.*s\n", prefix, hlen, hname);
|
|
|
fc71ac |
}
|
|
|
fc71ac |
|
|
|
fc71ac |
/*
|
|
|
fc71ac |
@@ -3728,10 +3728,10 @@ static void dmi_parse_controller_structure(const struct dmi_header *h,
|
|
|
fc71ac |
/* USB Device Type - need at least 6 bytes */
|
|
|
fc71ac |
u8 *usbdata = &data[0x7];
|
|
|
fc71ac |
/* USB Device Descriptor: idVendor */
|
|
|
fc71ac |
- printf("%s\tidVendor: 0x%04x\n", prefix,
|
|
|
fc71ac |
+ printf("%sidVendor: 0x%04x\n", prefix,
|
|
|
fc71ac |
WORD(&usbdata[0x0]));
|
|
|
fc71ac |
/* USB Device Descriptor: idProduct */
|
|
|
fc71ac |
- printf("%s\tidProduct: 0x%04x\n", prefix,
|
|
|
fc71ac |
+ printf("%sidProduct: 0x%04x\n", prefix,
|
|
|
fc71ac |
WORD(&usbdata[0x2]));
|
|
|
fc71ac |
/*
|
|
|
fc71ac |
* USB Serial number is here, but its useless, don't
|
|
|
fc71ac |
@@ -3743,16 +3743,16 @@ static void dmi_parse_controller_structure(const struct dmi_header *h,
|
|
|
fc71ac |
/* PCI Device Type - Need at least 8 bytes */
|
|
|
fc71ac |
u8 *pcidata = &data[0x7];
|
|
|
fc71ac |
/* PCI Device Descriptor: VendorID */
|
|
|
fc71ac |
- printf("%s\tVendorID: 0x%04x\n", prefix,
|
|
|
fc71ac |
+ printf("%sVendorID: 0x%04x\n", prefix,
|
|
|
fc71ac |
WORD(&pcidata[0x0]));
|
|
|
fc71ac |
/* PCI Device Descriptor: DeviceID */
|
|
|
fc71ac |
- printf("%s\tDeviceID: 0x%04x\n", prefix,
|
|
|
fc71ac |
+ printf("%sDeviceID: 0x%04x\n", prefix,
|
|
|
fc71ac |
WORD(&pcidata[0x2]));
|
|
|
fc71ac |
/* PCI Device Descriptor: PCI SubvendorID */
|
|
|
fc71ac |
- printf("%s\tSubVendorID: 0x%04x\n", prefix,
|
|
|
fc71ac |
+ printf("%sSubVendorID: 0x%04x\n", prefix,
|
|
|
fc71ac |
WORD(&pcidata[0x4]));
|
|
|
fc71ac |
/* PCI Device Descriptor: PCI SubdeviceID */
|
|
|
fc71ac |
- printf("%s\tSubDeviceID: 0x%04x\n", prefix,
|
|
|
fc71ac |
+ printf("%sSubDeviceID: 0x%04x\n", prefix,
|
|
|
fc71ac |
WORD(&pcidata[0x6]));
|
|
|
fc71ac |
}
|
|
|
fc71ac |
else if (type == 0x4 && len >= 5)
|
|
|
fc71ac |
@@ -3760,7 +3760,7 @@ static void dmi_parse_controller_structure(const struct dmi_header *h,
|
|
|
fc71ac |
/* OEM Device Type - Need at least 4 bytes */
|
|
|
fc71ac |
u8 *oemdata = &data[0x7];
|
|
|
fc71ac |
/* OEM Device Descriptor: IANA */
|
|
|
fc71ac |
- printf("%s\tVendor ID: 0x%02x:0x%02x:0x%02x:0x%02x\n",
|
|
|
fc71ac |
+ printf("%sVendor ID: 0x%02x:0x%02x:0x%02x:0x%02x\n",
|
|
|
fc71ac |
prefix, oemdata[0x0], oemdata[0x1],
|
|
|
fc71ac |
oemdata[0x2], oemdata[0x3]);
|
|
|
fc71ac |
}
|
|
|
fc71ac |
--
|
|
|
fc71ac |
2.17.1
|
|
|
fc71ac |
|