Re: [PATCH] vmware: Improve output when we fail to read vmware 'vmsn' file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://listman.redhat.com/mailman/listinfo/crash-utility
Contribution Guidelines: https://github.com/crash-utility/crash/wiki




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux