El sáb, 30-05-2009 a las 17:28 +0200, Vladimir 'phcoder' Serbinenko escribió: > >> > I'm fine with the change from "const void" to "const char", but we need > >> > to remove a preceding comment about void labels. > >> It's not that I'm opposed to void in principle. Just using the same > >> constructions to do the same things in different files makes code > >> easier to learn and port > > > > I wonder if we can go the other way and use void for all labels without > > storage. Indeed, it's too easy to misuse a char variable by forgetting > > the ampersand before it. > Not char [] What if someone sees the code and thinks it's truly a char array? I insist: you are stirring a tempest in a teapot. Even without taking into account that "const void label" is more "elegant" and logical for a simple label than using a char array, the only argument you give is consistency with the rest of GRUB code. This is an important plus for a decision, but consistency should never be an argument in and of itself.
Furthermore, a distinct C type for labels like "const void", or even better, "grub_asm_label_t" would help a programmer identify them all with a simple "find in files" command, while char arrays may abound and be tricky to tell apart. > > > >> > As for the parse_biosdisk() change, I'd like to see an explanation. > >> The explanation is that if user uses ata or usbms code and code calls > >> biosdisk, BIOS may issue a command which may conflict with ata/usbms. > >> Unfortunately it's not a scenario we're able to circumvent (BIOS is > >> headache) so I prefer to err on a safe side > > > > I agree that we should avoid touching the hardware. Besides, after > > loading ata we may not see some drives that BIOS can see. > > > > Validation of user input is good, but only if it's implemented > > correctly. > > > > Another approach may be to use biosdisk calls only if biosdisk is > > active. Otherwise, trust the user and turn off validation. > > > I've checked and seen that ata disables biosdisk. This mean that we > need to disable this validation. As for calling biosdisk only if it's > active: "active" isn't well-defined with grub2 and it will add > unnecessary complexity Put it that way, I agree with your change. To the scrapper with parse_biosdisk then! I think the new behaviour should be mentioned in the drivemap --help command, though I'm too tangled up with finals to be of any utility right now. -- -- Lazy, Oblivious, Recurrent Disaster -- Habbit
signature.asc
Description: Esto es una parte de mensaje firmado digitalmente
_______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel