Fix issues with buffer length when getting brand name

* Specifically, address case when brand name is longer than buffer
provided

* Also, slightly modify prototype to match similar, existing APIs.

* Address some cpplint issues.

Change-Id: Iaf77304e23085123e88f301e4b33bc4e6be2a225
This commit is contained in:
Chris Freehill committed 2019-08-26 07:21:02 -04:00
1 förälder 7f2d970a80
incheckning 01e0800741
2 files changed
+12 -7

No files matched your search

+1 -1
Visa fil
@@ -806,7 +806,7 @@ rsmi_status_t rsmi_dev_name_get(uint32_t dv_ind, char *name, size_t len);
* @retval ::RSMI_STATUS_SUCCESS is returned upon successful call.
*
*/
rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, size_t len);
rsmi_status_t rsmi_dev_brand_get(uint32_t dv_ind, char *brand, uint32_t len);
/**
* @brief Get the name string for a give vendor ID