[Crash-utility] [PATCH] vmware: Improve output when we fail to read vmware 'vmsn' file
HAGIO KAZUHITO(萩尾 一仁)
k-hagio-ab at nec.com
Wed Jul 12 00:45:12 UTC 2023
On 2023/07/10 15:28, lijiang wrote:
>> @@ -112,8 +112,8 @@ vmware_vmss_init(char *filename, FILE *ofp)
>> }
>>
>> if (fread(grps, sizeof(cptgroupdesc), grpsize, fp) != grpsize) {
>> - error(INFO, LOGPRX"Failed to read '%s': [Error %d] %s\n",
>> - filename, errno, strerror(errno));
>> + error(INFO, LOGPRX"Failed to read '%s' from file '%s':
>> [Error %d] %s\n",
>> + "cptgroupdesc", filename, errno, strerror(errno));
>>
> ^^^^^^^^^^^^
>
> Although the above code is good, I tend to output constant strings directly
> rather than using the '%s' to print.
>
> Anyway, the other changes still look fine to me. So: Ack.
Well, maybe it's grep-friendly, maybe it's a bit strange to expand the
existing 'name' variable for code consistency. Let's take the patch as
it is in this case.
https://github.com/crash-utility/crash/commit/b76e116c50ffc228ebc08eb8de35019320679257
Thanks,
Kazu
More information about the Crash-utility
mailing list