Colin Watson
25239370fd
Remove nested functions from device iterators.
...
* include/grub/arc/arc.h (grub_arc_iterate_devs_hook_t): New type.
(grub_arc_iterate_devs): Add hook_data argument.
* include/grub/ata.h (grub_ata_dev_iterate_hook_t): New type.
(struct grub_ata_dev.iterate): Add hook_data argument.
* include/grub/device.h (grub_device_iterate_hook_t): New type.
(grub_device_iterate): Add hook_data argument.
* include/grub/disk.h (grub_disk_dev_iterate_hook_t): New type.
(struct grub_disk_dev.iterate): Add hook_data argument.
(grub_disk_dev_iterate): Likewise.
* include/grub/gpt_partition.h (grub_gpt_partition_map_iterate):
Likewise.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate):
Likewise.
* include/grub/partition.h (grub_partition_iterate_hook_t): New
type.
(struct grub_partition_map.iterate): Add hook_data argument.
(grub_partition_iterate): Likewise.
* include/grub/scsi.h (grub_scsi_dev_iterate_hook_t): New type.
(struct grub_scsi_dev.iterate): Add hook_data argument.
Update all callers.
2013-01-20 15:52:15 +00:00
Vladimir 'phcoder' Serbinenko
3e19bf879f
* grub-core/kern/device.c (grub_device_open): Remove dead code.
2012-06-19 11:20:34 +02:00
Vladimir 'phcoder' Serbinenko
9c4b5c13e6
Improve gettext support. Stylistic fixes and error handling fixes while
...
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko
80ca250565
Add backward compatibiulity with old (pxe) syntax. Several cleanups
2011-06-26 17:06:18 +02:00
Manoel Rebelo Abranches
90162423e9
Network infrastructure.
...
The ARP protocol was made by Paulo Pinatti <ppinatti@br.ibm.com>
* include/grub/net/arp.h: New file.
* include/grub/net/device.h: Likewise.
* include/grub/net/ethernet.h: Likewise.
* include/grub/net/ip.h: Likewise.
* include/grub/net/netbuff.h: Likewise.
* include/grub/net/tftp.h: Likewise.
* include/grub/net/udp.h: Likewise.
* include/grub/ieee1275/ofnet.h: Likewise.
* include/grub/emu/export.h: Likewise.
* include/grub/net.h: Likewise.
* grub-core/net/arp.c: Likewise.
* grub-core/net/ethernet.c: Likewise.
* grub-core/net/ip.c: Likewise.
* grub-core/net/udp.c: Likewise.
* grub-core/net/tftp.c: Likewise.
* grub-core/net/netbuff.c: Likewise.
* grub-core/net/net.c: Likewise.
* grub-core/net/drivers/emu/emunet.c: Likewise.
* grub-core/net/drivers/ieee1275/ofnet.c: Likewise.
* grub-core/Makefile.am (KERNEL_HEADER_FILES): Add net.h, ofnet.h and
export.h.
* grub-core/Makefile.core.def (net): New module.
(tftp): Likewise.
(ofnet): Likewise.
(emunet): Likewise.
* grub-core/commands/ls.c (grub_ls_list_devices) [!GRUB_UTIL]: List
network protocols.
* grub-core/kern/device.c (grub_net_open) : New variable.
(grub_device_open): Handle network device.
(grub_device_close): Likewise.
* grub-core/kern/file.c (grub_file_net_seek) : New variable.
(grub_grubnet_fini): Likewise.
(grub_file_seek): Seek in network device.
* grub-core/kern/fs.c (grub_fs_probe): Handle network devices.
* grub-core/kern/ieee1275/init.c (grub_machine_set_prefix): Handle
network root.
(grub_machine_fini): Call grub_grubnet_fini.
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Handle
network.
(grub_ieee1275_get_aliasdevname): New function.
* grub-core/loader/i386/multiboot_mbi.c (grub_multiboot_get_mbi_size):
Add unofficial Solaris network info.
(grub_multiboot_make_mbi): Likewise.
* grub-core/fs/i386/pc/pxe.c: Moved from here ...
* grub-core/net/i386/pc/pxe.c: ...here. Adapted for new design.
* include/grub/device.h (grub_fs): Removed.
* include/grub/err.h (grub_err_t): Add network-related values.
* include/grub/i386/pc/pxe.h: Removed bootp parts.
* include/grub/ieee1275/ieee1275.h (grub_ofnetcard_data): New struct.
(grub_ieee1275_get_aliasdevname): New proto.
* include/grub/net.h: Rewritten.
Also-By: Paulo Pinatti <ppinatti@br.ibm.com>
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2011-06-24 22:16:05 +02:00
Jim Meyering
8a5d6919e1
Avoid NULL deref in grub_device_open.
...
* grub-core/kern/device.c (grub_device_open): Don't dereference
a NULL pointer upon failed grub_env_get.
2011-06-23 18:08:53 +02:00
Vladimir 'phcoder' Serbinenko
760a7e5aed
Merge mainline into net
2010-09-22 20:13:00 +02:00
Vladimir 'phcoder' Serbinenko
74342e312f
Support some annoying BSD and Minix subpartitions.
...
* Makefile.util.def (libgrub.a): Add grub-core/partmap/bsdlabel.c.
* grub-core/disk/efi/efidisk.c (grub_efidisk_get_device_name):
Properly handle concatenation.
* grub-core/kern/device.c (grub_device_iterate): Likewise.
* grub-core/normal/completion.c (iterate_partition): Likewise.
* grub-core/kern/disk.c (grub_disk_open): Make disk->name not
contain partition. All users updated.
* grub-core/partmap/bsdlabel.c (grub_netbsdlabel_partition_map): New
struct.
(grub_openbsdlabel_partition_map): Likewise.
(bsdlabel_partition_map_iterate): Rename to ..
(iterate_real): ... this. New arguments sector, freebsd and pmap.
(bsdlabel_partition_map_iterate): New function.
(netopenbsdlabel_partition_map_iterate): Likewise.
(netbsdlabel_partition_map_iterate): Likewise.
(openbsdlabel_partition_map_iterate): Likewise.
(GRUB_MOD_INIT): Register new partmaps.
(GRUB_MOD_FINI): Unregister new partmaps.
* grub-core/partmap/msdos.c (pc_partition_map_iterate): Rename to ...
(grub_partition_msdos_iterate): ... this. All users updated.
Don't support embedding other than in a minix partition.
* include/grub/msdos_partition.h (grub_partition_msdos_iterate): New
proto.
* include/grub/partition.h (grub_partition): New field msdostype.
* util/grub-install.in: Handle openbsd and netbsd types being in
part_bsd module.
2010-09-20 21:45:06 +02:00
Vladimir 'phcoder' Serbinenko
94564f81a8
* include/grub/disk.h (grub_disk): Remove has_partitions.
...
All users updated.
* disk/loopback.c (grub_loopback): Remove has_partitions.
All users updated.
(options): Remove partitions. All users updated.
* util/grub-fstest.c (fstest): Don't pass "-p" to loopback.
* util/i386/pc/grub-setup.c (setup): copy partition table only when
actual partition table is found.
2010-09-13 23:59:22 +02:00
Vladimir 'phcoder' Serbinenko
43de930c20
Change to disk->name being raw name. It makes less hidden issues
2010-09-08 21:22:41 +02:00
Vladimir 'phcoder' Serbinenko
3fcb410549
Fix a double device name
2010-09-08 20:39:57 +02:00
Vladimir 'phcoder' Serbinenko
e571f2332e
Fix regressions by previous commits
2010-09-02 18:15:59 +02:00
Vladimir 'phcoder' Serbinenko
9a9852df79
Hook network protocols
2010-09-02 00:07:55 +02:00
BVK Chaitanya
8c41176882
automake commit without merge history
2010-05-06 11:34:04 +05:30