2009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
* fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing blocksize different from specified. (grub_pxefs_read): Likewise.
This commit is contained in:
commit
a691ca3348
2 changed files with 10 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2009-11-16 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* fs/i386/pc/pxe.c (grub_pxefs_open): Correctly handle PXE choosing
|
||||||
|
blocksize different from specified.
|
||||||
|
(grub_pxefs_read): Likewise.
|
||||||
|
|
||||||
2009-11-16 Felix Zielcke <fzielcke@z-51.de>
|
2009-11-16 Felix Zielcke <fzielcke@z-51.de>
|
||||||
|
|
||||||
Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
|
Enable ata.mod on x86_64-efi, i386-efi and i386-ieee1275.
|
||||||
|
|
|
@ -150,7 +150,7 @@ grub_pxefs_open (struct grub_file *file, const char *name)
|
||||||
if (! data)
|
if (! data)
|
||||||
return grub_errno;
|
return grub_errno;
|
||||||
|
|
||||||
data->block_size = grub_pxe_blksize;
|
data->block_size = c.c2.packet_size;
|
||||||
grub_strcpy (data->filename, name);
|
grub_strcpy (data->filename, name);
|
||||||
|
|
||||||
file_int = grub_malloc (sizeof (*file_int));
|
file_int = grub_malloc (sizeof (*file_int));
|
||||||
|
@ -205,13 +205,14 @@ grub_pxefs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||||
o.gateway_ip = grub_pxe_gateway_ip;
|
o.gateway_ip = grub_pxe_gateway_ip;
|
||||||
grub_strcpy ((char *)&o.filename[0], data->filename);
|
grub_strcpy ((char *)&o.filename[0], data->filename);
|
||||||
o.tftp_port = grub_cpu_to_be16 (GRUB_PXE_TFTP_PORT);
|
o.tftp_port = grub_cpu_to_be16 (GRUB_PXE_TFTP_PORT);
|
||||||
o.packet_size = data->block_size;
|
o.packet_size = grub_pxe_blksize;
|
||||||
grub_pxe_call (GRUB_PXENV_TFTP_OPEN, &o);
|
grub_pxe_call (GRUB_PXENV_TFTP_OPEN, &o);
|
||||||
if (o.status)
|
if (o.status)
|
||||||
{
|
{
|
||||||
grub_error (GRUB_ERR_BAD_FS, "open fails");
|
grub_error (GRUB_ERR_BAD_FS, "open fails");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
data->block_size = o.packet_size;
|
||||||
data->packet_number = 0;
|
data->packet_number = 0;
|
||||||
curr_file = file;
|
curr_file = file;
|
||||||
}
|
}
|
||||||
|
@ -219,7 +220,7 @@ grub_pxefs_read (grub_file_t file, char *buf, grub_size_t len)
|
||||||
c.buffer = SEGOFS (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);
|
c.buffer = SEGOFS (GRUB_MEMORY_MACHINE_SCRATCH_ADDR);
|
||||||
while (pn >= data->packet_number)
|
while (pn >= data->packet_number)
|
||||||
{
|
{
|
||||||
c.buffer_size = grub_pxe_blksize;
|
c.buffer_size = data->block_size;
|
||||||
grub_pxe_call (GRUB_PXENV_TFTP_READ, &c);
|
grub_pxe_call (GRUB_PXENV_TFTP_READ, &c);
|
||||||
if (c.status)
|
if (c.status)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue