Added support to netdisk specified in the form (net,protocol,server_ip,username,password)

an to list its information with command ls.

* fs/ieee1275/ofnet.c (grub_ofnet_open): parse parameters to determine netdisk data
* fs/ieee1275/ofnet.c (grub_ofnet_close): dealloc netdisk data
* include/grub/disk.h: added struct grub_netdisk_data
* include/grub/ieee1275/ofnet.h: added newline
* kern/disk.c (grub_disk_open): ignore partition check for netdisk
* normal/misc.c (grub_normal_print_device_info): added support to list netdisk information
This commit is contained in:
Paulo de Rezende Pinatti 2010-07-13 11:22:35 -03:00
parent 3ec6213b17
commit f8795693f1
5 changed files with 213 additions and 7 deletions

View file

@ -281,7 +281,7 @@ grub_disk_open (const char *name)
goto fail;
}
if (p && ! disk->has_partitions)
if (p && ! disk->has_partitions && grub_strcmp (raw, "net"))
{
grub_error (GRUB_ERR_BAD_DEVICE, "no partition on this disk");
goto fail;
@ -289,7 +289,7 @@ grub_disk_open (const char *name)
disk->dev = dev;
if (p)
if (p && grub_strcmp (raw, "net"))
{
disk->partition = grub_partition_probe (disk, p + 1);
if (! disk->partition)