Hi,

On Thu May 17, 2007 at 14:06:57 -0700, H. Peter Anvin wrote:
> +/* Generate an initial boot sector which sets state and jump to
> +   a specified vector */
> +static int generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
> +{
> +    uint8_t bootsect[512], *p;
> +    int i;
> +
> +    if (bs_table[0] == NULL) {
> +     fprintf(stderr, "A disk image must be given for 'hda' when booting "
> +             "a Linux kernel\n");
> +     exit(1);
> +    }
> +
> +    memset(bootsect, 0, sizeof(bootsect));
> +
> +    /* Copy the MSDOS partition table if possible */
> +    bdrv_read(bs_table[0], 0, bootsect, 1);
> +
> +    /* Make sure we have a partition signature */
> +    bootsect[0x510] = 0x55;
> +    bootsect[0x511] = 0xaa;

These two should be decimal instead of hex.



Adam
-- 
Adam                 [EMAIL PROTECTED]
  Lackorzynski         http://os.inf.tu-dresden.de/~adam/


Reply via email to