+2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
+
+ * fs/i386/pc/pxe.c (grub_pxefs_dir): Return with failure on
+ non-pxe disk.
+ (grub_pxefs_open): Likewise.
+
2010-02-06 Colin D Bennett <colin@gibibit.com>
* conf/common.rmk (pkglib_MODULES): Add gfxmenu.mod.
};
static grub_err_t
-grub_pxefs_dir (grub_device_t device __attribute__ ((unused)),
+grub_pxefs_dir (grub_device_t device,
const char *path __attribute__ ((unused)),
int (*hook) (const char *filename,
const struct grub_dirhook_info *info)
__attribute__ ((unused)))
{
+ if (device->disk->dev->id != GRUB_DISK_DEVICE_PXE_ID)
+ return grub_error (GRUB_ERR_IO, "not a pxe disk");
+
return GRUB_ERR_NONE;
}
struct grub_pxe_disk_data *disk_data = file->device->disk->data;
grub_file_t file_int, bufio;
+ if (file->device->disk->dev->id != GRUB_DISK_DEVICE_PXE_ID)
+ return grub_error (GRUB_ERR_IO, "not a pxe disk");
+
if (curr_file != 0)
{
grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &c.c2);