On 30.06.2012 07:43, C. Masloch wrote: > #define GRUB_FREEDOS_SEGMENT 0x60 > +#define GRUB_FREEDOS_ADDR (GRUB_FREEDOS_SEGMENT<<4) > #define GRUB_FREEDOS_STACK_SEGMENT 0x1fe0 > -#define GRUB_FREEDOS_STACK_POINTER 0x8000 > +#define GRUB_FREEDOS_STACK_BPB_POINTER 0x7c00 > +#define GRUB_FREEDOS_BPB_ADDR ((GRUB_FREEDOS_STACK_SEGMENT<<4) \ > + +GRUB_FREEDOS_STACK_BPB_POINTER) > +
Please put spaces around operators.
> +
> + /* This is not strictly necessary for the current FreeDOS kernel
> + but improves potential compatibility with the current EDR-DOS
> + load protocol.
DR-DOS is less-known proprietary software which we usually don't support
as policy. While it's ok to set those registers, please avoid
referencing DR-DOS directly, even in comments.
> + /* This check could be considered optional, but it provides a more
> + specific error message than grub_relocator_alloc_chunk_addr would,
> + and additionally it insures that a little is set aside for the
> + initial stack as well.
> + Quirkily, because of its size constraints FreeDOS's original loader
> + doesn't perform such a check at all (and crashes instead). The file
> + size limit is documented though. */
> + if (kernelsyssize > GRUB_FREEDOS_MAX_SIZE)
> + {
> + (void)grub_error (GRUB_ERR_BAD_OS,
> + "file `%s' is too large for a valid"
> + " FreeDOS kernel.sys", argv[0]);
No need of void cast here.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
