On Thu, Jan 24, 2019 at 10:22:19PM +0200, Andy Shevchenko wrote: > Instead of magic number use pre-defined constant for UUID binary and > string representations. > > While here, drop the implementation details of guid_t type.
> - return snprintf(buf, 38, "%pUl\n", guid.b); > + return snprintf(buf, UUID_STRING_LEN + 1 + 1, "%pUl\n", &guid); I have a second thought here, since kernelfs guarantees a PAGE_SIZE to be available, using snprintf() here is oddy. Perhaps, just sprintf() would be enough. > - if (msg->msg.data_len < 17) { > + if (msg->msg.data_len < UUID_SIZE + 1) { > "The GUID response from the BMC was too short, it was > %d but should have been 17. Assuming GUID is not available.\n", It seems hard coded 17 is left in the message... -- With Best Regards, Andy Shevchenko _______________________________________________ Openipmi-developer mailing list Openipmi-developer@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openipmi-developer