svn commit: r330663 - head/sys/kern

Conrad Meyer cem at freebsd.org
Fri Mar 9 06:51:05 UTC 2018


On Thu, Mar 8, 2018 at 8:42 PM, Bruce Evans <brde at optusnet.com.au> wrote:
> On Thu, 8 Mar 2018, Mark Johnston wrote:
>> ...
>> +++ head/sys/kern/kern_shutdown.c       Thu Mar  8 17:04:36 2018
>> (r330663)
>> @@ -1115,6 +1115,12 @@ dump_check_bounds(struct dumperinfo *di, off_t
>> offset,
>>
>>         if (length != 0 && (offset < di->mediaoffset ||
>>             offset - di->mediaoffset + length > di->mediasize)) {
>> +               if (di->kdcomp != NULL && offset >= di->mediaoffset) {
>> +                       printf(
>> +                   "Compressed dump failed to fit in device
>> boundaries.\n");
>> +                       return (E2BIG);
>> +               }
>> +
>
> Style bug: extra blank line.  Even the outer if statements in this function
> are missing this error.

No.  Style(9) does not and should not require the complete absence of
blank lines.  Committers are free to use their best judgement on how
to separate blocks of code.  I think Mark's decision is eminently
reasonable.

>>                 printf("Attempt to write outside dump device
>> boundaries.\n"
>>             "offset(%jd), mediaoffset(%jd), length(%ju),
>> mediasize(%jd).\n",
>>                     (intmax_t)offset, (intmax_t)di->mediaoffset,
> ...
>
> Other style bugs:
> - capitalization of error messages
> - termination of error messages with a period

Why do you think these are style bugs?

Conrad


More information about the svn-src-all mailing list