Commit Graph

18 Commits

Author SHA1 Message Date
Vladimir Serbinenko 4d4a8c96e3 verifiers: Add possibility to verify kernel and modules command lines
Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
2018-11-09 13:25:31 +01:00
Vladimir Serbinenko 3617c59bab * include/grub/lib/LzmaDec.h: Fix to include LzmaTypes.h and
not Types.h.
	* grub-core/lib/LzmaDec.c: Fix prologue to make it compileable in GRUB
	environment.
	(LzmaDec_InitDicAndState): Make static.
2013-11-10 20:37:01 +01:00
Jon McCune 0340bdbc22 * grub-core/commands/loadenv.c: Support skipping signature check
and variable names filtering.
2013-09-27 02:08:32 +02:00
Vladimir 'phcoder' Serbinenko bf3a385792 Add missing const qualifiers.
* grub-core/commands/i386/pc/sendkey.c (keysym): Add missing const.
	* grub-core/commands/lspci.c (grub_pci_classname): Likewise.
	* grub-core/commands/menuentry.c (hotkey_aliases): Likewise.
	* grub-core/disk/lvm.c (grub_lvm_getvalue): Likewise.
	(grub_lvm_check_flag): Likewise.
	* grub-core/efiemu/i386/coredetect.c
	(grub_efiemu_get_default_core_name): Likewise
	* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
	* grub-core/fs/hfsplus.c (grub_hfsplus_catkey_internal): Likewise.
	* grub-core/fs/ntfs.c (fixup): Likewise.
	* grub-core/fs/xfs.c (grub_xfs_iterate_dir): Likewise.
	* grub-core/fs/zfs/zfs.c (decomp_entry): Likewise.
	(fzap_lookup): Likewise.
	(zap_lookup): Likewise.
	* grub-core/gnulib/regcomp.c (init_dfa): Likewise.
	* grub-core/lib/legacy_parse.c (check_option): Likewise.
	* grub-core/lib/posix_wrap/langinfo.h (nl_langinfo): Likewise.
	* grub-core/loader/i386/bsd.c (grub_bsd_add_meta): Likewise.
	(grub_freebsd_add_meta_module): Likewise.
	(grub_cmd_freebsd_module): Likewise.
	* grub-core/loader/i386/xnu.c (tbl_alias): Likewise.
	* grub-core/loader/xnu.c (grub_xnu_register_memory): Likewise.
	(grub_xnu_writetree_get_size): Likewise.
	(grub_xnu_writetree_toheap_real): Likewise.
	(grub_xnu_find_key): Likewise.
	(grub_xnu_create_key): Likewise.
	(grub_xnu_create_value): Likewise.
	(grub_xnu_register_memory): Likewise.
	(grub_xnu_check_os_bundle_required): Likewise.
	(grub_xnu_scan_dir_for_kexts): Likewise.
	(grub_xnu_load_kext_from_dir): Likewise.
	* grub-core/normal/color.c (color_list): Likewise.
	* grub-core/normal/completion.c (current_word): Likewise.
	* grub-core/normal/menu_entry.c (insert_string): Likewise.
	* grub-core/term/serial.c (grub_serial_find): Likewise.
	* grub-core/term/tparm.c (grub_terminfo_tparm): Likewise.
	* include/grub/efiemu/efiemu.h (grub_efiemu_get_default_core_name):
	Likewise.
	* include/grub/i386/bsd.h (grub_bsd_add_meta): Likewise.
	(grub_freebsd_add_meta_module): Likewise.
	* include/grub/lib/arg.h (grub_arg_option): Likewise.
	* include/grub/net.h (grub_net_card_driver): Likewise.
	(grub_net_card): Likewise.
	(grub_net_app_protocol): Likewise.
	* include/grub/parttool.h (grub_parttool_argdesc): Likewise.
	* include/grub/serial.h (grub_serial_find): Likewise.
	* include/grub/tparm.h (grub_terminfo_tparm): Likewise.
	* include/grub/xnu.h (grub_xnu_create_key): Likewise.
	(grub_xnu_create_value): Likewise.
	(grub_xnu_find_key): Likewise.
	(grub_xnu_scan_dir_for_kexts): Likewise.
	(grub_xnu_load_kext_from_dir): Likewise.

	* include/grub/zfs/zio_checksum.h (zio_checksum_t): Moved from here ...
	* grub-core/fs/zfs/zfs.c (zio_checksum_t): ...here.
	* include/grub/zfs/zio_checksum.h (zio_checksum_info):
	Moved from here ...
	* grub-core/fs/zfs/zfs.c (zio_checksum_info): ... here. Added missing const.
2011-11-30 16:20:13 +01:00
Colin Watson 6b978c4f04 merge trunk 2011-01-11 10:00:45 -06:00
Szymon Janc 25953e1055 Improve loaders' kernel command line handling.
* grub-core/lib/cmdline.c: New file.
	* include/grub/lib/cmdline.h: Likewise.
	* grub-core/loader/i386/linux.c (grub_cmd_linux): Use
	grub_create_loader_cmdline to create kernel command line.
	* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
	* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_linux): Likewise.
	* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_linux): Likewise.
	* grub-core/Makefile.core.def (linux16): Add lib/cmdline.c on i386_pc.
	(linux): Add lib/cmdline.c on common.
2011-01-07 17:09:39 +01:00
Vladimir 'phcoder' Serbinenko 3836e89df1 Add crc32c for btrfs 2010-12-01 01:22:55 +01:00
Vladimir 'phcoder' Serbinenko ee74fa4822 Put terminfo into core on ieee1275 and yeeloong (needed for console).
* gentpl.py: New groups terminfoinkernel and terminfomodule.
	* grub-core/Makefile.am (KERNEL_HEADER_FILES): Include extcmd.h, arg.h
	and terminfo.h when needed.
	* grub-core/Makefile.core.def (kernel): Include term/terminfo.c,
	term/tparm.c, commands/extcmd.c, lib/arg.c on terminfokernel.
	(terminfo): Enable only on terminfokernel.
	(extcmd): Likewise.
	* include/grub/extcmd.h: Add missing EXPORT_FUNC.
	* include/grub/lib/arg.h: Likewise.
	* grub-core/term/ieee1275/ofconsole.c (grub_ofconsole_dimensions): Fix
	incorrect usage of ->.
2010-09-30 17:50:01 +02:00
Szymon Janc c55f50180d Remove crc.mod and move crc command to hashsum.mod.
Remove lib/crc.c - users updated to use gcrypt implementation.

	* grub-core/commands/crc.c: Removed.
	* grub-core/Makefile.core.def (crc): Module removed.
	* grub-core/commands/hashsum.c (aliases[]): Add crc alias.
	* grub-core/commands/hashsum.c (GRUB_MOD_INIT): Register crc command.
	* grub-core/commands/hashsum.c (GRUB_MOD_FINI): Unregister crc command.
	* grub-core/lib/crc.c: Removed.
	* include/grub/lib/crc.h: Removed.
	* Makefile.util.def (crc): Remove lib/crc.c
	* grub-core/Makefile.core.def (libgrub.a): Remove grub-core/lib/crc.c.
	* util/grub-fstest.c (cmd_crd): Use libgcrypt crc implementation.
	* Makefile.util.def (libgrub.a): Add grub-core/lib/libgcrypt-grub/cipher/crc.c.
	* Makefile.util.def (grub-fstest): Add CFLAGS_GCRY to cflags.
	* Makefile.util.def (grub-fstest): Add CPPFLAGS_GCRY to cppflags.
	* grub-core/efiemu/prepare.c (grub_efiemu_crc): Use libgcrypt crc implementation.
2010-09-20 01:40:58 +02:00
BVK Chaitanya 639cc5ab44 menuentry option parsing is done using lib/arg.c 2010-07-22 19:01:40 +05:30
proski 4241d2b13a 2009-05-04 Pavel Roskin <proski@gnu.org>
* disk/ata.c: Spelling fixes.
	* disk/raid.c: Likewise.
	* disk/usbms.c: Likewise.
	* disk/dmraid_nvidia.c: Likewise.
	* kern/ieee1275/openfw.c: Likewise.
	* kern/ieee1275/init.c: Likewise.
	* kern/ieee1275/cmain.c: Likewise.
	* boot/i386/pc/cdboot.S: Likewise.
	* video/readers/png.c: Likewise.
	* video/i386/pc/vbe.c: Likewise.
	* fs/udf.c: Likewise.
	* fs/hfs.c: Likewise.
	* fs/reiserfs.c: Likewise.
	* efiemu/runtime/efiemu.c: Likewise.
	* efiemu/main.c: Likewise.
	* efiemu/mm.c: Likewise.
	* include/grub/elf.h: Likewise.
	* include/grub/xnu.h: Likewise.
	* include/grub/usbdesc.h: Likewise.
	* include/grub/usb.h: Likewise.
	* include/grub/script_sh.h: Likewise.
	* include/grub/lib/LzmaEnc.h: Likewise.
	* include/grub/efiemu/efiemu.h: Likewise.
	* include/grub/command.h: Likewise.
	* normal/menu.c: Likewise.
	* normal/main.c: Likewise.
	* normal/datetime.c: Likewise.
	* bus/usb/uhci.c: Likewise.
	* mmap/i386/uppermem.c: Likewise.
	* mmap/mmap.c: Likewise.
	* commands/acpi.c: Likewise.
	* commands/test.c: Likewise.
	* partmap/apple.c: Likewise.
	* font/font.c: Likewise.
	* loader/sparc64/ieee1275/linux.c: Likewise.
	* loader/macho.c: Likewise.
	* loader/i386/bsd_trampoline.S: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/xnu.c: Likewise.
	* term/i386/pc/vesafb.c: Likewise.
	* term/usb_keyboard.c: Likewise.
	* util/resolve.c: Likewise.
	* util/getroot.c: Likewise.
2009-05-04 20:06:05 +00:00
proski 91b72b4f42 Really remove lib/datetime.c and include/grub/lib/datetime.h 2009-04-24 17:05:19 +00:00
phcoder 05aaebfb7b 2009-04-05 Vladimir Serbinenko <phcoder@gmail.com>
Support for mtime and further expandability of dir command

	* include/grub/lib/datetime.h: moved to ...
	* include/grub/datetime.h: ... moved here and added 
	declaration of grub_unixtime2datetime. All users updated
	* include/grub/fs.h: new syntax for dir and mtime functionin 
	struct grub_fs 
	* include/grub/fshelp.h: new declarations of GRUB_FSHELP_TYPE_MASK
	and GRUB_FSHELP_FLAGS_MASK
	* commands/ls.c (grub_ls_list_files): Write mtime in long format
	* fs/ext2.c (grub_ext2_dir): use new dir syntax and supply mtime
	(grub_ext2_mtime): new function
	* fs/hfsplus.c (grub_hfsplus_dir): use new dir syntax and supply mtime
	(grub_hfsplus_mtime): new function
	* fs/ufs.c (GRUB_UFS_ATTR_TYPE): new definition
	(GRUB_UFS_ATTR_FILE): likewise
	(GRUB_UFS_ATTR_LNK): likewise
	(struct grub_ufs_sblock): new fields mtime
	(grub_ufs_read_inode): new parameter to read inode to a separate buffer
	all users updated
	(grub_ufs_dir): mtime support
	(grub_ufs_mtime): new function
	* fs/affs.c (grub_affs_dir): use new dir syntax
	* fs/afs.c (grub_afs_dir): likewise
	* fs/cpio.c (grub_cpio_dir): likewise
	* fs/fat.c (grub_fat_find_dir): likewise
	* fs/hfs.c (grub_hfs_dir): likewise
	* fs/iso9660.c (grub_iso9660_dir): likewise
	* fs/jfs.c (grub_jfs_dir): likewise
	* fs/minix.c (grub_minix_dir): likewise
	* fs/ntfs.c (grub_ntfs_dir): likewise
	* fs/reiserfs.c (grub_reiserfs_dir): likewise
	* fs/sfs.c (grub_sfs_dir): likewise
	* fs/xfs.c (grub_xfs_dir): likewise
	* util/hostfs.c (grub_hostfs_dir): likewise
	* lib/datetime.c: moved to ...
	* normal/datetime.c: ... moved here
	(grub_unixtime2datetime): new function
	* kern/rescue.c (grub_rescue_print_files): use new dir syntax
	* normal/completition.c (iterate_dir): use new dir syntax
	* normal/misc.c (grub_normal_print_device_info): tell the 
	last modification time of a volume
	* kern/fs.c (grub_fs_probe): updated dummy function to use new syntax 
	* conf/common.rmk: added lib/datetime.c to ls.mod
	* conf/i386-coreboot.rmk (grub_emu_SOURCES): add normal/datetime.c  
	(normal_mod_SOURCES): likewise
	(datetime_mod_SOURCES): Removed lib/datetime.c
	* conf/i386-efi.rmk: likewise
	* conf/i386-ieee1275.rmk: likewise	
	* conf/i386-pc.rmk: likewise
	* conf/powerpc-ieee1275.rmk: likewise
	* conf/sparc64-ieee1275.rmk: likewise	
	* conf/x86_64-efi.rmk: likewise
2009-04-05 20:19:05 +00:00
okuji 5709cfc4d1 2009-03-29 Yoshinori K. Okuji <okuji@enbug.org>
Make the format of Environment Block plain text. The boot loader
    part is not tested well yet.
    
    * util/grub-editenv.c (DEFAULT_ENVBLK_SIZE): New macro.
    (buffer): Removed.
    (envblk): Likewise.
    (usage): Remove "info" and "clear". Add "unset". Update the
    description of "set", as this does not delete variables any
    longer.
    (create_envblk_file): Complete rewrite.
    (open_envblk_file): Likewise.
    (cmd_info): Removed.
    (cmd_list): Likewise.
    (cmd_set): Likewise.
    (cmd_clear): Likewise.
    (list_variables): New function.
    (write_envblk): Likewise.
    (set_variables): Likewise.
    (unset_variables): Likewise.
    (main): Complete rewrite.

    * commands/loadenv.c (buffer): Removed.
    (envblk): Likewise.
    (open_envblk_file): New function.
    (read_envblk_file): Complete rewrite.
    (grub_cmd_load_env): Likewise.
    (grub_cmd_list_env): Likewise.
    (struct blocklist): New struct.
    (free_blocklists): New function.
    (check_blocklists): Likewise.
    (write_blocklists): Likewise.
    (grub_cmd_save_env): Complete rewrite.

    * include/grub/lib/envblk.h (GRUB_ENVBLK_SIGNATURE): Replaced with
    a plain text signature.
    (GRUB_ENVBLK_MAXLEN): Removed.
    (struct grub_envblk): Complete rewrite.
    (grub_envblk_find): Removed.
    (grub_envblk_insert): Likewise.
    (grub_envblk_open): New prototype.
    (grub_envblk_set): Likewise.
    (grub_envblk_delete): Put const to VALUE.
    (grub_envblk_iterate): Put const to NAME and VALUE.
    (grub_envblk_close): New prototype.
    (grub_envblk_buffer): New inline function.
    (grub_envblk_size): Likewise.

    * lib/envblk.c: Include grub/mm.h.
    (grub_env_find): Removed.
    (grub_envblk_open): New function.
    (grub_envblk_close): Likewise.
    (escaped_value_len): Likewise.
    (find_next_line): Likewise.
    (grub_envblk_insert): Removed.
    (grub_envblk_set): New function.
    (grub_envblk_delete): Complete rewrite.
    (grub_envblk_iterate): Likewise.
2009-03-28 19:58:15 +00:00
bean b1b797cb1b 2009-03-21 Bean <bean123ch@gmail.com>
* commands/blocklist.c: Add include file <grub/command.h>, remove
	<grub/normal.h> and <grub/arg.h>.
	(grub_cmd_blocklist): Use the new command interface.
	(GRUB_MOD_INIT): Likewise.
	(GRUB_MOD_FINI): Likewise.
	* commands/boot.c: Likewise.
	* commands/cat.c: Likewise.
	* commands/cmp.c: Likewise.
	* commands/configfile.c: Likewise.
	* commands/crc.c: Likewise.
	* commands/echo.c: Likewise.
	* commands/halt.c: Likewise.
	* commands/handler.c: Likewise.
	* commands/hdparm.c: Likewise.
	* commands/help.c: Likewise.
	* commands/hexdump.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/ls.c: Likewise.
	* commands/lsmmap.c: Likewise.
	* commands/lspci.c: Likewise.
	* commands/loadenv.c: Likewise.
	* commands/read.c: Likewise.
	* commands/reboot.c: Likewise.
	* commands/search.c: Likewise.
	* commands/sleep.c: Likewise.
	* commands/test.c: Likewise.
	* commands/usbtest.c: Likewise.
	* commands/videotest.c: Likewise.
	* commands/i386/cpuid.c: Likewise.
	* commands/i386/pc/halt.c: Likewise.
	* commands/i386/pc/play.c: Likewise.
	* commands/i386/pc/pxecmd.c: Likewise.
	* commands/i386/pc/vbeinfo.c: Likewise.
	* commands/i386/pc/vbetest.c: Likewise.
	* commands/ieee1275/suspend.c: Likewise.
	* disk/loopback.c: Likewise.
	* font/font_cmd.c: Likewise.
	* hello/hello.c: Likewise.
	* loader/efi/appleloader.c: Likewise.
	* loader/efi/chainloader.c: Likewise.
	* loader/i386/bsd.c: Likewise.
	* loader/i386/efi/linux.c: Likewise.
	* loader/i386/ieee1275/linux.c: Likewise.
	* loader/i386/linux.c: Likewise.
	* loader/i386/pc/chainloader.c: Likewise.
	* loader/i386/pc/linux.c: Likewise.
	* loader/powerpc/ieee1275/linux.c: Likewise.
	* loader/multiboot_loader.c: Likewise.
	* term/gfxterm.c: Likewise.
	* term/i386/pc/serial.c: Likewise.
	* term/terminfo.c: Likewise.

	* term/i386/pc/vesafb.c: Removed <grub/arg.h>.
	* term/i386/pc/vga.c: Likewise.
	* video/readers/jpeg.c: Likewise.
	* video/readers/png.c: Likewise.
	* video/readers/tga.c: Likewise.

	* util/grub-fstest (cmd_loopback): Removed.
	(cmd_blocklist): Likewise.
	(cmd_ls): Likewise.
	(grub_register_command): Likewise.
	(grub_unregister_command): Likewise.
	(execute_command): Use grub_command_find to locate command and execute
	it.

	* include/grub/efi/chainloader.h: Removed.
	* loader/efi/chainloader_normal.c: Likewise.
	* loader/i386/bsd_normal.c: Likewise.
	* loader/i386/pc/chainloader_normal.c: Likewise.
	* loader/i386/pc/multiboot_normal.c: Likewise.
	* loader/linux_normal.c: Likewise.
	* loader/multiboot_loader_normal.c: Likewise.
	* loader/powerpc/ieee1275/linux_normal.c: Likewise.

	* gencmdlist.sh: Scan new registration command grub_register_extcmd
	and grub_register_command_p1.

	* conf/common.rmk (grub_fstest_SOURCES): Add kern/list.c,
	kern/command.c, lib/arg.c and commands/extcmd.c.
	(pkglib_MODULES): Remove boot.mod, and minicmd.mod and extcmd.mod.
	(minicmd_mod_SOURCES): New variable.
	(minicmd_mod_CFLAGS): Likewise.
	(minicmd_mod_LDFLAGS): Likewise.
	(extcmd_mod_SOURCES): Likewise.
	(extcmd_mod_CFLAGS): Likewise.
	(extcmd_mod_LDFLAGS): Likewise.
	(boot_mod_SOURCES): Removed.
	(boot_mod_CFLAGS): Likewise.
	(boot_mod_LDFLAGS): Likewise.

	* conf/i386-pc.rmk (kernel_img_SOURCES): Add kern/command.c and
	kern/corecmd.c.
	(kernel_img_HEADERS): Add command.h.
	(grub_emu_SOURCES): Remove commands/boot.c and normal/arg.c, add
	commands/minicmd.c, kern/command.c, kern/corecmd.c, commands/extcmd.c
	and lib/arg.c.
	(pkglib_MODULES): Change _linux.mod, _chain.mod, _bsd.mod and
	_multiboot.mod as linux.mod, chain.mod, bsd.mod and multiboot.mod,
	remove the corresponding normal mode command.
	(normal_mod_SOURCES): Remove normal/arg.c.
	* conf/i386-coreboot.rmk: Likewise.
	* conf/i386-efi.rmk: Likewise.
	* conf/i386-ieee1275.rmk: Likewise.
	* conf/powerpc-ieee1275.rmk: Likewise.
	* conf/x86_64-efi.rmk: Likewise.

	* include/grub/arg.h: Move from here ...
	* include/grub/lib/arg.h: ... to here.

	* normal/arg.c: Move from here ...
	* lib/arg.c: ... to here.

	* commands/extcmd.c: New file.
	* commands/minicmd.c: Likewise.
	* include/grub/command.h: Likewise.
	* include/grub/extcmd.h: Likewise.
	* kern/command.c: Likewise.
	* kern/corecmd.c: Likewise.

	* kern/list.c (grub_list_iterate): Return int instead of void.
	(grub_list_insert): New function.
	(grub_prio_list_insert): Likewise.

	* kern/rescue.c (grub_rescue_command): Removed.
	(grub_rescue_command_list): Likewise.
	(grub_rescue_register_command): Likewise.
	(grub_rescue_unregister_command): Likewise.
	(grub_rescue_cmd_boot): Move to minicmd.c
	(grub_rescue_cmd_help): Likewise.
	(grub_rescue_cmd_info): Likewise.
	(grub_rescue_cmd_boot): Likewise.
	(grub_rescue_cmd_testload): Likewise.
	(grub_rescue_cmd_dump): Likewise.
	(grub_rescue_cmd_rmmod): Likewise.
	(grub_rescue_cmd_lsmod): Likewise.
	(grub_rescue_cmd_exit): Likewise.
	(grub_rescue_print_devices): Moved to corecmd.c.
	(grub_rescue_print_files): Likewise.
	(grub_rescue_cmd_ls): Likewise.
	(grub_rescue_cmd_insmod): Likewise.
	(grub_rescue_cmd_set): Likewise.
	(grub_rescue_cmd_unset): Likewise.
	(attemp_normal_mode): Use grub_command_find to get normal module.
	(grub_enter_rescue_mode): Use grub_register_core_commands to register
	commands, remove grub_rescue_regiter_command calls.

	* normal/command.c (grub_regiser_command): Removed.
	(grub_unregister_command): Likewise.
	(grub_command_find): Likewise.
	(grub_iterate_commands): Likewise.
	(rescue_command): Likewise.
	(export_command): Moved to corecmd.c.
	(set_command): Removed.
	(unset_command): Likewise.
	(insmod_command): Likewise.
	(rmmod_command): Likewise.
	(lsmod_command): Likewise.
	(grub_command_init): Likewise.

	* normal/completion.c (iterate_command): Use cmd->prio to check for
	active command.
	(complete_arguments): Use grub_extcmd_t structure to find options.
	(grub_normal_do_completion): Change function grub_iterate_commands to
	grub_command_iterate.

	* normal/execute.c (grub_script_execute_cmd): No need to parse
	argument here.

	* normal/main.c (grub_dyncmd_dispatcher): New function.
	(read_command_list): Register unload commands as dyncmd.
	(grub_cmd_normal): Use new command interface, register rescue,
	unregister normal at entry, register normal, unregister rescue at exit.

	* include/grub/list.h (grub_list_test_t): New type.
	(grub_list_iterate): Return int instead of void.
	(grub_list_insert): New function.
	(GRUB_AS_NAMED_LIST_P): New macro.
	(GRUB_AS_PRIO_LIST): Likewise.
	(GRUB_AS_PRIO_LIST_P): Likewise.
	(GRUB_PRIO_LIST_PRIO_MASK): New constant.
	(GRUB_PRIO_LIST_FLAG_ACTIVE): Likewise.
	(grub_prio_list): New structure.
	(grub_prio_list_insert): New function.
	(grub_prio_list_remove): New inline function.

	* include/grub/normal.h: Remove <grub/arg.h>, add <grub/command.h>.
	(GRUB_COMMAND_FLAG_CMDLINE): Moved to command.h.
	(GRUB_COMMAND_FLAG_MENU): Likewise.
	(GRUB_COMMAND_FLAG_BOTH): Likewise.
	(GRUB_COMMAND_FLAG_TITLE): Likewise.
	(GRUB_COMMAND_FLAG_NO_ECHO): Likewise.
	(GRUB_COMMAND_FLAG_NO_ARG_PARSE): Removed.
	(GRUB_COMMAND_FLAG_NOT_LOADED): Likewise.
	(grub_command): Likewise.
	(grub_register_command): Likewise.
	(grub_command_find): Likewise.
	(grub_iterate_commands): Likewise.
	(grub_command_init): Likewise.
	(grub_arg_parse): Likewise.
	(grub_arg_show_help): Likewise.

	* include/grub/rescue.h (grub_rescue_register_command): Removed.
	(grub_rescue_unregister_command): Likewise.

	* include/grub/i386/bsd.h: Remove grub_rescue_cmd_freebsd,
	grub_rescue_cmd_openbsd, grub_rescue_cmd_netbsd,
	grub_rescue_cmd_freebsd_loadenv and grub_rescue_cmd_freebsd_module.

	* include/grub/i386/efi/loader.h: Remove grub_rescue_cmd_linux and
	grub_rescue_cmd_initrd.
	* include/grub/i386/loader.h: Likewise.
	* include/grub/x86_64/loader.h: Likewise.

	* include/grub/i386/pc/chainloader.h: Remove grub_chainloader_cmd.
2009-03-21 08:39:59 +00:00
bean 42ce5170b7 2008-08-15 Bean <bean123ch@gmail.com>
* conf/i386-pc.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/i386-coreboot.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/i386-ieee1275.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/i386-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* conf/x86_64-efi.rmk (pkglib_MODULES): Add datetime.mod, date.mod
	and datehook.mod.
	(datetime_mod_SOURCES): New macro.
	(datetime_mod_CFLAGS): Likewise.
	(datetime_mod_LDFLAGS): Likewise.
	(date_mod_SOURCES): Likewise.
	(date_mod_CFLAGS): Likewise.
	(date_mod_LDFLAGS): Likewise.
	(datehook_mod_SOURCES): Likewise.
	(datehook_mod_CFLAGS): Likewise.
	(datehook_mod_LDFLAGS): Likewise.

	* kern/env.c (grub_env_insert): Fix a bug in prevp pointer.

	* commands/date.c: New file.

	* hook/datehook.c: Likewise.

	* include/grub/lib/datetime.h: Likewise.

	* include/grub/i386/cmos.h: Likewise.

	* lib/datetime.c: Likewise.

	* lib/i386/datetime.c: Likewise.

	* lib/efi/datetime.c: Likewise.
2008-08-15 15:39:02 +00:00
bean a85cd5a0b5 2008-07-27 Bean <bean123ch@gmail.com>
* commands/crc.c: New file.

	* lib/crc.c: Likewise.

	* include/grub/lib/crc.h: Likewise.

	* util/grub-fstest.c: grub/hexdump.h => grub/lib/hexdump.h.

	* commands/hexdump.c: grub/hexdump.h => grub/lib/hexdump.h.
	(hexdump): Move this function to ...

	* lib/hexdump.c: ... here.

	* include/grub/hexdump.h: Renamed to ...

	* include/grub/lib/hexdump.h: ... this.

	* commands/loadenv.c: grub/envblk.h => grub/lib/envblk.h

	* util/grub-editenv.c: Likewise.

	* include/envblk.h: Renamed to ...

	* include/lib/envblk.h: ... this.

	* util/envblk.c: Renamed to ...

	* lib/envblk.c: ... this.

	* conf/common.rmk (grub_fstest_SOURCES): commands/hexdump.c =>
	lib/hexdump.c.
	(grub_editenv_SOURCES): util/envblk.c => lib/envblk.c
	(pkglib_MODULES): Add crc.mod.
	(hexdump_mod_SOURCES): Add lib/hexdump.c.
	(loadenv_mod_SOURCES): util/envblk.c => lib/envblk.c.
	(crc_mod_SOURCES): New macro.
	(crc_mod_CFLAGS): Likewise.
	(crc_mod_LDFLAGS): Likewise.

	* conf/i386-coreboot.rmk (grub_emu_SOURCES): Add lib/hexdump.c.

	* conf/i386-efi.rmk (grub_emu_SOURCES): Likewise.

	* conf/i386-pc.rmk (grub_emu_SOURCES): Likewise.

	* conf/powerpc-ieee1275.rmk (grub_emu_SOURCES): Likewise.

	* conf/x86_64-efi.rmk (grub_emu_SOURCES): Likewise.
2008-07-27 13:51:30 +00:00
bean aa24b516a2 2008-07-13 Bean <bean123ch@gmail.com>
* Makefile.in (enable_lzo): New rule.

	* conf/i386-pc.rmk (grub_mkimage_SOURCES): New test with enable_lzo.

	* configure.ac (ENABLE_LZO): New option --enable-lzo.

	* boot/i386/pc/lnxboot.S: #include <config.h>.

	* include/grub/i386/pc/kernel.h (GRUB_KERNEL_MACHINE_RAW_SIZE): Change
	its value accordding to the compression algorithm used, lzo or lzma.

	* util/i386/pc/grub-mkimage.c (compress_kernel): Use different
	compression algorithm according to configure macro.

	* kern/i386/pc/startup.S (codestart): Likewise.

	* kern/i386/pc/lzma_decode.S: New file.

	* include/grub/lib/LzFind.h: Likewise.

	* include/grub/lib/LzHash.h: Likewise.

	* include/grub/lib/LzmaDec.h: Likewise.

	* include/grub/lib/LzmaEnc.h: Likewise.

	* include/grub/lib/LzmaTypes.h: Likewise.

	* lib/LzFind.c: Likewise.

	* lib/LzmaDec.c: Likewise.

	* lib/LzmaEnc.c: Likewise.
2008-07-13 01:55:15 +00:00