Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F102199879
D31633.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D31633.diff
View Options
diff --git a/sys/dev/ixgbe/if_ix.c b/sys/dev/ixgbe/if_ix.c
--- a/sys/dev/ixgbe/if_ix.c
+++ b/sys/dev/ixgbe/if_ix.c
@@ -4694,27 +4694,33 @@
struct ixgbe_nvm_version nvm_ver = {0};
uint16_t phyfw = 0;
int status;
+ const char *space = "";
ixgbe_get_oem_prod_version(hw, &nvm_ver); /* OEM's NVM version */
ixgbe_get_orom_version(hw, &nvm_ver); /* Option ROM */
ixgbe_get_etk_id(hw, &nvm_ver); /* eTrack identifies a build in Intel's SCM */
status = ixgbe_get_phy_firmware_version(hw, &phyfw);
- if (nvm_ver.oem_valid)
- sbuf_printf(buf, "NVM OEM V%d.%d R%d ", nvm_ver.oem_major,
+ if (nvm_ver.oem_valid) {
+ sbuf_printf(buf, "NVM OEM V%d.%d R%d", nvm_ver.oem_major,
nvm_ver.oem_minor, nvm_ver.oem_release);
+ space = " ";
+ }
- if (nvm_ver.or_valid)
- sbuf_printf(buf, "Option ROM V%d-b%d-p%d ", nvm_ver.or_major,
- nvm_ver.or_build, nvm_ver.or_patch);
+ if (nvm_ver.or_valid) {
+ sbuf_printf(buf, "%sOption ROM V%d-b%d-p%d",
+ space, nvm_ver.or_major, nvm_ver.or_build, nvm_ver.or_patch);
+ space = " ";
+ }
- if (nvm_ver.etk_id != ((NVM_VER_INVALID << NVM_ETK_SHIFT) | NVM_VER_INVALID))
- sbuf_printf(buf, "eTrack 0x%08x ", nvm_ver.etk_id);
+ if (nvm_ver.etk_id != ((NVM_VER_INVALID << NVM_ETK_SHIFT) |
+ NVM_VER_INVALID)) {
+ sbuf_printf(buf, "%seTrack 0x%08x", space, nvm_ver.etk_id);
+ space = " ";
+ }
if (phyfw != 0 && status == IXGBE_SUCCESS)
- sbuf_printf(buf, "PHY FW V%d ", phyfw);
-
- sbuf_trim(buf);
+ sbuf_printf(buf, "%sPHY FW V%d", space, phyfw);
} /* ixgbe_sbuf_fw_version */
/************************************************************************
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 9, 9:02 PM (19 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14565782
Default Alt Text
D31633.diff (1 KB)
Attached To
Mode
D31633: ixgbe: Avoid sbuf_trim in sysctl handler
Attached
Detach File
Event Timeline
Log In to Comment