Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1PWk5y-0003Q7-Ff for mharc-grub-devel@gnu.org; Sun, 26 Dec 2010 01:28:42 -0500 Received: from [140.186.70.92] (port=34909 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PWk5w-0003Py-B4 for grub-devel@gnu.org; Sun, 26 Dec 2010 01:28:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PWk5u-0002Jx-TF for grub-devel@gnu.org; Sun, 26 Dec 2010 01:28:40 -0500 Received: from 207-172-210-101.c3-0.hdp-ubr1.sbo-hdp.ma.static.cable.rcn.com ([207.172.210.101]:59962 helo=mailhost.m5p.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PWk5u-0002IG-Ln for grub-devel@gnu.org; Sun, 26 Dec 2010 01:28:38 -0500 Received: from m5p.com (ssh.m5p.com [IPv6:2001:418:3fd::fb]) by mailhost.m5p.com (8.14.3/8.14.3) with ESMTP id oBQ5Tj33085142 for ; Sun, 26 Dec 2010 00:29:50 -0500 (EST) (envelope-from ehem@m5p.com) Received: (from ehem@localhost) by m5p.com (8.14.4/8.13.7/Submit) id oBQ5Tj6w069781 for grub-devel@gnu.org; Sat, 25 Dec 2010 21:29:45 -0800 (PST) Message-Id: <201012260529.oBQ5Tj6w069781@m5p.com> In-Reply-To: <4D162B42.8080806@gmail.com> To: The development of GNU GRUB Date: Sat, 25 Dec 2010 21:29:45 -0800 (PST) Sender: ehem@m5p.com From: ehem+grub@m5p.com X-Mailer: ELM [version 2.4ME+ PL124d (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="US-ASCII" X-Scanned-By: MIMEDefang 2.67 on IPv6:2001:418:3fd::f7 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.0 (mailhost.m5p.com [IPv6:2001:418:3fd::f7]); Sun, 26 Dec 2010 00:29:51 -0500 (EST) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. Subject: Re: Two Small Patches (x86 VolId & Sun Label Checking) X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Dec 2010 06:28:41 -0000 >From: Vladimir '?-coder/phcoder' Serbinenko > On 12/17/2010 06:19 AM, ehem+grub@m5p.com wrote: > > First, what is refered to as "a magic number used by Windows NT" is > > apparently used as a volume identifier to identify disks. > It's windows NT Volume ID. I don't see how it is a misnomer. Perhaps not a gigantic one, but I would argue the existing name is a misnomer. "Magic number" generally refers to the various constants used to flag the various style of disk header, things like 0x504D for Apple, "RDSK" for Amiga, the 64-bit constant for GPT, or 0xDABE for Sun. Meanwhile, as you agreed above, it is a volume identifier that needs to be preserved; something rather different from a magic number. Also, as I'd further noted, LILO also uses it to identify disks, so it isn't confined to Windows NT at this point. > > 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. I will in fact be implementing breaking detection functions into distinct functions uniformly, 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. (I can readily provide an illustration of the lurking landmine, later though) -- (\___(\___(\______ --=> 8-) EHM <=-- ______/)___/)___/) \BS ( | EHeM@gremlin.m5p.com PGP F6B23DE0 | ) / \_CS\ | _____ -O #include O- _____ | / _/ 2477\___\_|_/DC21 03A0 5D61 985B <-PGP-> F2BE 6526 ABD2 F6B2\_|_/___/3DE0