Commit graph

1278 commits

Author SHA1 Message Date
davem
ac8a2baae4 * kern/sparc64/ieee1275/init.c (grub_machine_set_prefix): If
lettered partition specifier is found, convert to numbered.
2009-04-30 13:17:10 +00:00
davem
e2bf39b2d7 * include/grub/powerpc/ieee1275/memory.h: Include ieee1275.h.
* include/grub/sparc64/ieee1275/memory.h: Likewise.
2009-04-30 01:34:38 +00:00
davem
3c64e10417 * normal/command.c: Add missing newline at end of file. 2009-04-30 01:28:22 +00:00
davem
979b4fb416 * commands/lsmmap.c (grub_cmd_lsmmap): Add casts to avoid printf
warnings.
	* kern/ieee1275/openfw.c (grub_claimmap): Likewise.
	* disk/ieee1275/ofdisk.c (grub_ofdisk_open, grub_ofdisk_close,
	grub_ofdisk_read): Likewise, and deal similarly with the fact that
	ihandles have a 32-bit type but need to be stored in a "void *".
2009-04-30 01:18:43 +00:00
proski
2e08a26a8e Fix mistake in the last description 2009-04-28 13:25:09 +00:00
proski
9459c3067c 2009-04-28 Pavel Roskin <proski@gnu.org>
* disk/fs_uuid.c (grub_fs_uuid_open): Use parent->data for dev,
	not disk.  Adjust all dependencies.
	(grub_device_close): Use grub_device_close(), not
	grub_disk_close().
2009-04-28 13:23:38 +00:00
proski
136d9f8283 2009-04-27 Pavel Roskin <proski@gnu.org>
* disk/fs_uuid.c (grub_fs_uuid_open): Allocate memory to copy
	parent's partition, don't copy it by reference, as it gets freed
	on close.
2009-04-28 13:14:20 +00:00
phcoder
75a807cf00 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
Preboot hooks support

	* commands/boot.c (struct grub_preboot_t): new declaration
	(preboots_head): new variable
	(preboots_tail): likewise
	(grub_loader_register_preboot_hook): new function
	(grub_loader_unregister_preboot_hook): likewise
	(grub_loader_set): launch preboot hooks
	* include/grub/loader.h (grub_loader_preboot_hook_prio_t): new type
	(grub_loader_register_preboot_hook): new declaration
	(grub_loader_unregister_preboot_hook): likewise
2009-04-27 16:48:58 +00:00
phcoder
5af922b5f1 2009-04-27 Vladimir Serbinenko <phcoder@gmail.com>
Warning fix

	* disk/scsi.c (grub_scsi_open): added missing cast when 
	calling grub_dprintf
2009-04-27 15:39:39 +00:00
phcoder
a5562c306f 2009-04-26 Vladimir Serbinenko <phcoder@gmail.com>
Bug and warning fixes

	* include/grub/i386/pc/init.h (grub_stop_floppy): added missing 
	declaration
	* commands/test.c (test_parse): fixed bug with file tests and corrected
	declaration of find_file
2009-04-26 15:09:30 +00:00
proski
4006f85c89 2009-04-26 Pavel Roskin <proski@gnu.org>
* Makefile.in: Don't install empty manual pages if help2man is
	missing.  Use help2man option for output, not shell redirection.
2009-04-26 14:14:05 +00:00
davem
5c77c3de65 * util/grub-mkdevicemap.c (make_device_map): Add missing
NESTED_FUNC_ATTR to process_device().
2009-04-26 08:44:36 +00:00
phcoder
033b10a80a 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
Test command

	* commands/test.c: rewritten to use bash-like test
2009-04-25 12:29:08 +00:00
phcoder
e434359358 2009-04-25 Vladimir Serbinenko <phcoder@gmail.com>
Parttool autoloading and improvements

	* Makefile.in (pkglib_DATA): add parttool.lst 
	(parttool.lst): new target
	* genmk.rb: generate parttool-*
	(CLEANFILES): add #{parttool}
	(PARTTOOLFILES): new variable
	* genparttoollist.sh: new file
	* parttool/pcpart.c (grub_pcpart_boot): more feedback 
	(grub_pcpart_type): likewise
	* commands/parttool.c (helpmsg): new variable
	(grub_cmd_parttool): output help if not enough arguments are supplied
	autoload modules
	(GRUB_MOD_INIT(parttool)): use helpmsg
2009-04-25 12:18:25 +00:00
proski
91b72b4f42 Really remove lib/datetime.c and include/grub/lib/datetime.h 2009-04-24 17:05:19 +00:00
davem
0dcf7495d9 * disk/ieee1275/nand.c (grub_nand_iterate): Return
grub_devalias_iterate() result instead of unconditional 0.
	* disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Likewise.
	Also, capture hook return value, either directly or via
	grub_children_iterate(), and propagate to caller.
	* include/grub/ieee1275/ieee1275.h (grub_devalias_iterate,
	grub_children_iterate): Return value is now 'int' instead of
	'grub_err_t'.
	* kern/ieee1275/openfw.c (grub_children_iterate): Fix to behave
	like a proper iterator, stopping when hooks return non-zero.
	(grub_devalias_iterate): Likewise.
2009-04-24 12:05:54 +00:00
davem
ac20caff54 * disk/fs_uuid.c (grub_fs_uuid_close): Call grub_disk_close()
on disk->data.
2009-04-24 12:05:14 +00:00
davem
0d31250038 Avoiding openning same device multiple times in device iterator.
* kern/device.c (grub_device_iterate): Define struct part_ent,
	and use it to build a list of partitions in interate_disk() and
	iterate_partition().
2009-04-24 12:04:10 +00:00
davem
c8c08833e3 * kern/sparc64/ieee1275/openfw.c: Unused, delete. 2009-04-23 10:03:41 +00:00
davem
a1447506fe * util/sparc64/ieee1275/misc.c: New file.
* util/sparc64/ieee1275/grub-setup.c: New file.
	* util/sparc64/ieee1275/grub-ofpathname.c: New file.
	* util/sparc64/ieee1275/grub-mkimage.c: New file.
	* util/sparc64/ieee1275/grub-install.in: New file.
	* util/ieee1275/ofpath.c: New file.
	* util/ieee1275/devicemap.c: New file.
	* util/devicemap.c: New file.
	* util/deviceiter.c: New file.
	* kern/sparc64/ieee1275/init.c: New file.
	* include/grub/util/ofpath.h: New file.
	* include/grub/util/deviceiter.h: New file.
	* util/grub-mkdevicemap.c: Include deviceiter.h.
	Implement using grub_util_emit_devicemap_entry and
	grub_util_iterate_devices.
	* conf/i386-corebook.rmk: Build util/deviceiter.c and
	util/devicemap.c into grub-mkdevicemap
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-pc.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Add rules to build boot block
	images and installation utilities.  Build kernel as image
	instead of as elf binary.  Use common rules as much as possible.
2009-04-22 09:57:39 +00:00
davem
4e8269dad2 * include/grub/ieee1275/ieee1275.h (IEEE1275_MAX_PROP_LEN,
IEEE1275_MAX_PATH_LEN): Define.
	* kern/ieee1275/openfw.c (grub_children_iterate): Dynamically
	allocate 'childtype', 'childpath', 'childname', and 'fullname'.
	(grub_devalias_iterate): Dynamically allocate 'aliasname' and
	'devtype'.  Explicitly NULL terminate devalias expansion.
2009-04-22 09:46:54 +00:00
davem
f01005a832 * kern/ieee1275/mmap.c (grub_machine_mmap_iterate): If size_cells
is larger than address_cells, use that value for address_cells too.
2009-04-22 09:45:43 +00:00
phcoder
0aefc632d9 2009-04-19 Vladimir Serbinenko <phcoder@gmail.com>
Correct GPT definition

	* include/grub/gpt_partition.h (grub_gpt_partentry): Corrected the type 
	of "attrib" member
2009-04-19 20:38:46 +00:00
fzielcke
c6c5219fb6 2009-04-19 Felix Zielcke <fzielcke@z-51.de>
* INSTALL: Replace `autogen.sh' with `./autogen.sh'.
2009-04-19 14:49:43 +00:00
davem
0552ff9f81 * loader/sparc64/ieee1275/linux.c: Include grub/command.h
(grub_rescue_cmd_linux): Rename to...
	(grub_cmd_linux): and fix prototype.
	(grub_rescue_cmd_initrd): Rename to...
	(grub_cmd_initrd): and fix prototype.
	(cmd_linux, cmd_initrd): New.
	(GRUB_MOD_INIT(linux)): Use grub_register_command().
	(GRUB_MOD_FINI(linux): Use grub_unregister_command().
2009-04-19 08:51:04 +00:00
proski
07c5039fda 2009-04-17 Pavel Roskin <proski@gnu.org>
* bus/usb/ohci.c (grub_ohci_transaction): Fix incorrect printf
	format.
	(grub_ohci_transfer): Likewise.
2009-04-17 17:23:34 +00:00
proski
b012002d59 2009-04-17 Pavel Roskin <proski@gnu.org>
* bus/usb/usbtrans.c (grub_usb_control_msg): Warning fix.
2009-04-17 17:09:36 +00:00
proski
1bc09c352c 2009-04-17 Pavel Roskin <proski@gnu.org>
* loader/multiboot_loader.c (grub_cmd_multiboot_loader): Fix
	return without a value.  Fix inconsistent indentation.
2009-04-17 16:35:26 +00:00
proski
e0ff912638 2009-04-17 Pavel Roskin <proski@gnu.org>
* fs/i386/pc/pxe.c (grub_pxefs_dir): Fix function prototype to
	match struct grub_fs.
2009-04-17 16:08:24 +00:00
proski
d1a282fc83 2009-04-17 Pavel Roskin <proski@gnu.org>
* disk/ata.c (grub_ata_pciinit): Use NESTED_FUNC_ATTR.
	* bus/usb/ohci.c (grub_ohci_pci_iter): Likewise.
	* bus/usb/uhci.c (grub_uhci_pci_iter): Likewise.
	* commands/lspci.c (grub_lspci_iter): Likewise.
2009-04-17 15:36:41 +00:00
bean
a96df3f249 2009-04-16 Bean <bean123ch@gmail.com>
* commands/efi/loadbios.c (grub_cmd_fakebios): Add missing return
	value.
2009-04-16 12:18:11 +00:00
proski
41bb0fe9a6 2009-04-15 Pavel Roskin <proski@gnu.org>
* include/grub/types.h: Rename ULONG_MAX to GRUB_ULONG_MAX and
	LONG_MAX to GRUB_LONG_MAX.  Introduce GRUB_LONG_MIN.  Update all
	users of ULONG_MAX, LONG_MAX and LONG_MIN to use the new
	definitions.
2009-04-15 20:45:09 +00:00
phcoder
6b4c4aa38b removed kern/loader which should have been removed by my previous commit 2009-04-15 16:39:02 +00:00
fzielcke
596c6970b8 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
* disk/lvm.c (grub_lvm_scan_device): Add `LVM' to the error messages,
	that no multiple data or metadata areas are supported and `Unknown 
	metadata header'.
2009-04-15 13:29:24 +00:00
phcoder
0d5d565326 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
Move loader out of the kernel

	* kern/loader.c: moved to ...
	* commands/boot.c: ... moved here
	* commands/minicmd.c (grub_mini_cmd_boot): moved to ...
	* commands/boot.c (grub_cmd_boot): moved here. All users updated
	* include/grub/kernel.h (grub_machine_fini): export
	* include/grub/loader.h (grub_loader_is_loaded): update declaration
	(grub_loader_set): likewise
	(grub_loader_unset): likewise
	(grub_loader_boot): likewise
	* conf/common.rmk: new module boot.mod
	(pkglib_MODULES): add boot.mod
	* conf/i386-coreboot.rmk (kernel_elf_SOURCES): remove kern/loader.c
	(grub_emu_SOURCES): likewise
	* conf/i386-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/i386-pc.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/powerpc-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
	* conf/sparcs64-ieee1275.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise   
	* conf/x86_64-efi.rmk (kernel_elf_SOURCES): likewise
	(grub_emu_SOURCES): likewise
2009-04-15 12:45:50 +00:00
phcoder
5999d61917 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
use grub_lltoa instead of grub_itoa and grub_ltoa for all purposes
	
	* kern/misc.c (grub_itoa): Removed function
	(grub_ltoa): likewise
	(grub_vsprintf): use grub_lltoa
2009-04-15 12:33:46 +00:00
phcoder
13c007813a 2009-04-15 Vladimir Serbinenko <phcoder@gmail.com>
Restore grub-emu

	* conf/i386-pc.rmk (grub_emu_SOURCES): add normal/handler.c
	* conf/i386-coreboot.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
2009-04-15 12:32:08 +00:00
fzielcke
2031822238 2009-04-15 Felix Zielcke <fzielcke@z-51.de>
* INSTALL: Add that `./autogen.sh' needs to be run before
	`./configure.'.
2009-04-15 06:58:39 +00:00
bean
d05f0df3eb 2009-04-14 Bean <bean123ch@gmail.com>
* Makefile.in (pkglib_DATA): Add handler.lst.
	(handler.lst): New rule.

	* conf/i386-pc.rmk (normal_mod_SOURCES): Add normal/handler.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/sparc64-ieee1275.rmk: Likewise.

	* genhandlerlist.sh: New file.

	* genmk.rb: Add rules to generate handler.lst.

	* include/grub/normal.h (grub_file_getline): New function definition.
	(read_handler_list): Likewise.
	(free_handler_list): Likewise.

	* include/grub/term.h (grub_term_register_input): Add name parameter
	for auto generation of handler.lst.
	(grub_term_register_output): Likewise.

	* normal/handler.c: New file.

	* normal/main.c (get_line): Renamed to grub_file_getline.
	(read_config_file): Use the newly renamed grub_file_getline.
	(read_command_list): Likewise.
	(read_fs_list): Likewise.
	(grub_normal_execute): Call read_handler_list to parse handler.lst.
	(GRUB_MOD_FINI): Call free_handler_list to free handler list.

	* term/efi/console.c (grub_console_init): Add name parameter for auto
	generation of handler.lst.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/at_keyboard.c: Likewise.
	* term/i386/pc/console.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/i386/pc/vga.c: Likewise.
	* term/i386/pc/vga_text.c: Likewise.
	* term/ieee1275/ofconsole.c: Likewise.
	* term/usb_keyboard.c: Likewise.
2009-04-14 18:12:14 +00:00
bean
33c846be29 2009-04-14 Bean <bean123ch@gmail.com>
* util/grub-pe2elf.c (write_symbol_table): Terminate short name symbol
	properly with null character.
2009-04-14 16:56:35 +00:00
fzielcke
9b8fd01509 remove DISTLIST 2009-04-14 16:17:10 +00:00
fzielcke
f93d668e0b args changelog should mention this too 2009-04-14 16:15:42 +00:00
fzielcke
ece031d35a Forgot to delete stamp-h.in 2009-04-14 16:12:01 +00:00
fzielcke
4484e01e46 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
* configure: Remove.
	* config.h.in: Likewise.
	* DISTLIST: Likewise.
	* conf/common.mk: Likewise.
	* conf/i386-coreboot.mk: Likewise.
	* conf/i386-efi.mk: Likewise.
	* conf/i386-ieee1275.mk: Likewise.
	* conf/i386.mk: Likewise.
	* conf/i386-pc.mk: Likewise.
	* conf/powerpc-ieee1275.mk: Likewise.
	* conf/sparc64-ieee1275.mk: Likewise.
	* conf/x86_64-efi.mk: Likewise.

	* INSTALL: Remove the sentence that Ruby and autoconf are only required if you
	develop on GRUB.
2009-04-14 16:11:26 +00:00
davem
5c5bf96ae6 * util/hostdisk.c (make_device_name): Fix buffer length
calculations.
2009-04-14 09:07:25 +00:00
fzielcke
e25b5a8c6c 2009-04-14 Felix Zielcke <fzielcke@z-51.de>
* util/hostdisk.c [__FreeBSD__ || __FreeBSD_kernel__]: Include
	<sys/param.h> and <sys/sysctl.h>.
	(open_device) [__FreeBSD__ || __FreeBSD_kernel_]: Use sysctlgetbyname()
	to add 0x10 to `kern.geom.debugflags' if it's not already set, before
	opening the device and reset them afterwards.
2009-04-14 07:01:34 +00:00
proski
1f1f580c2f 2009-04-13 Pavel Roskin <proski@gnu.org>
* conf/common.rmk (grub_fstest_SOURCES): Add normal/datetime.c.
	Reported by John Stanley <jpsinthemix@verizon.net>
2009-04-14 01:54:06 +00:00
davem
1d7a72fd8c * kern/dl.c (grub_dl_load_file): Close file immediately when
we are done using it.
2009-04-13 23:03:50 +00:00
davem
6a4737e5d8 * util/hostdisk.c (make_device_name): Do not make any assumptions
about the length of drive names.
2009-04-13 23:01:54 +00:00
davem
96bd81ecf9 * conf/common.rmk (grub_probe_SOURCES): Add Sun partition module.
(grub_fstest_SOURCES): Likewise.
2009-04-13 20:35:59 +00:00