[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Two Small Patches (x86 VolId & Sun Label Checking)
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: Two Small Patches (x86 VolId & Sun Label Checking) |
Date: |
Sun, 26 Dec 2010 11:41:00 +0100 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.16) Gecko/20101211 Icedove/3.0.11 |
On 12/26/2010 06:29 AM, address@hidden wrote:
>
>>> stage. Second, perhaps minor, but I'm surprised someone chose to break
>>> the checksum verification code in grub-core/partmap/sun.c and didn't
>>> didn't keep the magic number check with it.
>>>
>
>> This seems to be just moving the code around. There are many different
>> coding styles. Changing from one of them to another is waste of effort
>> unless it's done to uniformise with rest of codebase. I don't have
>> strong preference to one or another style so I prefer not to touch anything.
>>
> Leaving it alone for now is fine by me. I just found it rather strange to
> see two distinct styles in the exact same bit of code. I'd expect either
> all of the verification or none of the verification broken into a
> distinct function.
>
>
checking magic number is a simple check (a == b) whereas checksum check
is a composite (you need to compute checksum first) so moving checksum
out in a separate function makes sense
> I will in fact be implementing breaking detection functions into distinct
> functions uniformly,
I'm not fond of "let's change it just because we can". There are much
more real tasks on the project. Come to #grub and I'm sure will find
something for you.
> because there is a deeper issue lurking here. Looks
> to be pure luck no one ran into an unpleasant bug lurking in the existing
> design.
>
>
Please show me the real problem then.
> (I can readily provide an illustration of the lurking landmine, later
> though)
>
>
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
- Two Small Patches (x86 VolId & Sun Label Checking), ehem+grub, 2010/12/17
- Re: Two Small Patches (x86 VolId & Sun Label Checking), Vladimir 'φ-coder/phcoder' Serbinenko, 2010/12/25
- Re: Two Small Patches (x86 VolId & Sun Label Checking), ehem+grub, 2010/12/26
- Re: Two Small Patches (x86 VolId & Sun Label Checking),
Vladimir 'φ-coder/phcoder' Serbinenko <=
- Re: Two Small Patches (x86 VolId & Sun Label Checking), ehem+grub, 2010/12/26
- Re: Two Small Patches (x86 VolId & Sun Label Checking), ehem+grub, 2010/12/26
- Re: Two Small Patches (x86 VolId & Sun Label Checking), Vladimir 'φ-coder/phcoder' Serbinenko, 2010/12/26
- Re: Two Small Patches (x86 VolId & Sun Label Checking), ehem+grub, 2010/12/29
- Re: Two Small Patches (x86 VolId & Sun Label Checking), Vladimir 'φ-coder/phcoder' Serbinenko, 2010/12/29
- Re: Two Small Patches (x86 VolId & Sun Label Checking), ehem+grub, 2010/12/30
- Re: Two Small Patches (x86 VolId & Sun Label Checking), Brendan Trotter, 2010/12/29