Commit Graph

171 Commits

Author SHA1 Message Date
Vladimir 'phcoder' Serbinenko ab1440bd4e * util/grub-mkrescue.in: Add mips-arc support. 2013-04-24 14:02:58 +02:00
Vladimir 'phcoder' Serbinenko 8ca86b3a03 Support mkrescue on sparc64. 2013-04-14 17:10:55 +02:00
Vladimir 'phcoder' Serbinenko 67ab83538f Better support Apple Intel Macs on CD. 2013-04-13 00:38:04 +02:00
Vladimir 'phcoder' Serbinenko e3734b84cf * tests/grub_cmd_date.in: New test for datetime. 2013-04-12 01:47:38 +02:00
Vladimir 'phcoder' Serbinenko dbc56d8f0b Support i386-ieee1275 grub-mkrescue and make check on it. 2013-04-12 01:29:45 +02:00
Vladimir 'phcoder' Serbinenko a79b8a1584 Merge powerpc grub-mkrescue flavour with common. Use xorriso HFS+
feature for it.
2013-04-11 23:15:26 +02:00
Vladimir 'phcoder' Serbinenko aa42823871 Unify file copying setup across different install scripts. Add
options for performing partial install.
2013-04-04 19:59:59 +02:00
Vladimir 'phcoder' Serbinenko ce50dbd746 Add new 'proc' filesystem framework and put luks_script into it. 2013-03-24 13:05:59 +01:00
Andrey Borzenkov b7b78edb1c * Makefile.util.def: Add partmap/msdos.c to common library.
* include/grub/msdos_partition.h: Add GRUB_PC_PARTITION_TYPE_LDM
	* grub-core/disk/ldm.c: Check for existence of
	GRUB_PC_PARTITION_TYPE_LDM.
2013-02-25 22:11:06 +01:00
Vladimir 'phcoder' Serbinenko 5e3b8dcbb5 Import gcrypt public-key cryptography and implement signature checking. 2013-01-11 21:32:42 +01:00
Vladimir 'phcoder' Serbinenko d9c48c7b7c Support big-endian UFS1.
* Makefile.util.def (libgrubmods): Add ufs_be.c
	* grub-core/Makefile.core.def (ufs1_be): New module.
	* grub-core/fs/ufs_be.c: New file.
	* grub-core/fs/ufs.c: Declare grub_ufs_to_le* and use them throughout
	the file.
2012-12-08 20:56:58 +01:00
Colin Watson 288c757d70 * Makefile.util.def (grub-mknetdir): Move to $prefix/bin.
Reported by: Daniel Kahn Gillmor.  Fixes Debian bug #688799.
2012-09-26 13:51:13 +01:00
Colin Watson 794c8c3375 Fix grub-emu build on FreeBSD.
* Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
* grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
headers on Linux.
(GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
implementation is currently Linux-specific.
* util/getroot.c (exec_pipe): Define only on Linux or when either
libzfs or libnvpair is unavailable.
(find_root_devices_from_poolname): Remove unused path variable.
2012-09-22 21:19:58 +01:00
Vladimir 'phcoder' Serbinenko 3f2bdd8f55 * Makefile.util.def (grub-mkrescue): Enable on loongson.
* util/grub-mkrescue.in: Handle loongson.
2012-06-15 18:35:11 +02:00
Vladimir 'phcoder' Serbinenko 070038f843 * Makefile.util.def (grub-mkrescue) Anable on mips_qemu_mips and
ia64.
	* util/grub-mkrescue.in: Handle qemu-mips and ia64. Add missing
	quotes while on it.
2012-06-06 12:31:24 +02:00
Vladimir 'phcoder' Serbinenko ddb7355862 * Makefile.util.def: Remove -Wno-format.
* grub-core/Makefile.core.def: Likewise.
2012-05-30 13:56:50 +02:00
Vladimir 'phcoder' Serbinenko b105df76f4 * configure.ac: Add condition for COND_HOST_XNU.
* Makefile.util.def (10_xnu): New script.
	* util/grub.d/10_xnu.in: New file, extracted from 30_os_prober.in.
2012-05-29 13:56:21 +02:00
Vladimir 'phcoder' Serbinenko ce41ab7aab * grub-core/kern/misc.c (grub_strcmp): Use unsigned comparison as
per common usage and preffered in several parts of code.
	(grub_memcmp): Likewise.
	(grub_strncmp): Likewise.
	* include/grub/misc.h (grub_strcasecmp): Likewise.
	(grub_strncasecmp): Likewise.
	* Makefile.util.def (cmp_test): New test.
	(grub_script_strcmp): Likewise.
	* tests/cmp_unit_test.c: New file.
	* tests/grub_script_strcmp.in: Likewise.
	* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Add a comment.
2012-05-04 12:08:22 +02:00
Vladimir 'phcoder' Serbinenko ac66b453df Handle big-endian minixfs (fixes minixfs tests on bigendian).
* grub-core/fs/minix.c: Replace le with minix. Add necessary defines,
	modify names. Introduce MODE_BIGENDIAN.
	* grub-core/fs/minix_be.c: New file.
	* grub-core/fs/minix2_be.c: Likewise
	* grub-core/fs/minix3_be.c: Likewise.
	* Makefile.util.def (libgrubmods): Add minix_be, minix2_be and
	minix3_be.
	* grub-core/Makefile.core.def (minix_be): New module.
	(minix2_be): Likewise.
	(minix3_be): Likewise.
2012-04-01 21:35:18 +02:00
Vladimir 'phcoder' Serbinenko 22e6a774f9 Handle big-endian mdraid.
* Makefile.util.def (libgrubkern): Add mdraid_linux_be.c.
	* grub-core/Makefile.core.def (mdraid09_be): New module.
	* grub-core/disk/mdraid_linux.c: Use grub_md_to_cpu* and grub_cpu_to_md*
	rather than grub_le_to_cpu* and grub_cpu_to_le*.
	* grub-core/disk/mdraid_linux_be.c: New file.
2012-03-26 16:10:40 +02:00
Vladimir 'phcoder' Serbinenko ac6fd21803 * grub-core/script/argv.c (grub_script_argv_split_append): Skip leading
spaces.
	* tests/grub_script_leading_whitespace.in: New file.
	* Makefile.util.def (grub_script_leading_whitespace): New test.
2012-03-19 13:29:43 +01:00
Vladimir 'phcoder' Serbinenko 546fbe9b5a Add variable parsing in $"..." and fix several mismatches with bash.
* Makefile.util.def (grub_script_gettext): New test.
	* grub-core/script/execute.c (parse_string): New function.
	(gettext_append): Likewise.
	(grub_script_arglist_to_argv): Use gettext_append.
	* grub-core/script/yylex.l: Fix slash and newline handling in $"...".
	* tests/grub_script_gettext.in: New file.
2012-03-11 14:46:48 +01:00
Vladimir 'phcoder' Serbinenko 8e56f87007 * configure.ac: Decrease warning level to avoid spurious warnings and
to be able to compile with GCC 4.2.
	* Makefile.util.def: Remove -Wno-error=logical-op.
2012-03-10 21:30:37 +01:00
Vladimir 'phcoder' Serbinenko 6c21f5d7a1 * Makefile.util.def (grub-ofpathname): Enable on all platforms. 2012-02-27 22:48:29 +01:00
Vladimir 'phcoder' Serbinenko c36e5cd162 Remove any awareness of *.c util files about target.
* Makefile.util.def (grub-setup): Split to ...
	(grub-bios-setup): ... and this.
	(grub-sparc64-setup): ... and this.
	* configure.ac: Don't add machine_CPPFLAGS into HOST_CPPFLAGS.
	* docs/man/grub-setup.h2m: Split into ...
	* docs/man/grub-sparc64-setup.h2m: ... this.
	* docs/man/grub-bios-setup.h2m: ... and this.
	* include/grub/dl.h (grub_dl) [GRUB_UTIL]: Remove struct.
	* include/grub/elf.h (Elf_*) [GRUB_UTIL]: Remove types.
	(GRUB_TARGET_WORDSIZE) [GRUB_UTIL]: Remove.
	(grub_target_addr_t): Remove.
	(grub_target_size_t): Remove.
	(grub_target_ssize_t): Remove.
	* util/grub-install.in: Use new grub-*-setup.
	* util/grub-mkimagexx.c (Elf_Word): New define.
	(Elf_Half): Likewise.
	(Elf_Section): Likewise.
	(ELF_ST_TYPE): Likewise.
	* util/grub-setup.c: Switch from GRUB_MACHINE_SPARC64 to
	GRUB_SETUP_SPARC64 and from GRUB_MACHINE_PCBIOS to GRUB_SETUP_BIOS.
2012-02-27 14:24:22 +01:00
Vladimir 'phcoder' Serbinenko 8151bc82f7 Remove improper use of program_transform_name on pkglibrootdir.
* configure.ac (pkglibrootdir): Removed.
	(grub-mkimage): Replace PKGLIBROOTDIR with PKGLIBDIR.
	* util/grub-mkimage.c: Likewise.
2012-02-27 10:35:37 +01:00
Vladimir 'phcoder' Serbinenko 6a656b0ea5 Convert grub-emu to argp.
* grub-core/Makefile.core.def (kernel): Add kern/emu/argp_common.c on
	emu.
	* util/argp_common.c: Rename to ...
	* grub-core/kern/emu/argp_common.c: ... this. All users updated.
	Add missing includes.
	* grub-core/kern/emu/main.c: Convert to argp.
	* po/POTFILES.in: Regenerate.
	* util/grub-install.in (usage): Make first letter lowcase in messages
	for uniformity.
	* util/grub-setup.c (options): Likewise.
2012-02-25 01:15:29 +01:00
Vladimir 'phcoder' Serbinenko 2a704ca926 * Makefile.util.def (libgrubmods.a): Add -Wno-error=logical-op
-Wno-error=missing-noreturn.
2012-02-22 05:37:32 +01:00
Vladimir 'phcoder' Serbinenko 8be63f2ef6 * Makefile.util.def (grub-mkdevicemap): Removed.
* include/grub/emu/hostdisk.h (grub_util_get_os_disk): New proto.
	* include/grub/util/deviceiter.h: Removed.
	* util/deviceiter.c: Likewise.
	* util/getroot.c (grub_util_get_os_disk): New function.
	* util/grub-install.in: Remove grub-mkdevicemap. Use -t disk as
	replacement for EFI.
	* util/grub-mkdevicemap.c: Removed.
	* util/grub-probe.c (probe): Handle PRINT_DISK.
	(argp_parser): Handle -t disk.
2012-02-03 22:36:51 +01:00
Vladimir 'phcoder' Serbinenko 8e1e4e3903 * util/grub-mkfont.c: Migrate to argp.
* util/grub-mklayout.c: Likewise.
	* util/grub-mkpasswd-pbkdf2.c: Likewise.
	* util/grub-mkrelpath.c: Likewise.
	* util/grub-probe.c: Likewise.
	* util/grub-script-check.c: Likewise.
2012-02-03 21:45:43 +01:00
Vladimir 'phcoder' Serbinenko c76899a0ea Migrate grub-mkimage.c to argp.
* Makefile.util.def (grub-mkimage): Add util/argp_common.c.
	(grub-setup): Likewise.
	* util/grub-setup.c (print_version): Move to ...
	* util/argp_common.c (print_version): ... here.
	* util/grub-setup.c (argp_program_version_hook): Move to ...
	* util/argp_common.c (argp_program_version_hook): ... here.
	* util/grub-setup.c (argp_parser): Add exit (1) on fatal error for
	safety.
	* util/grub-mkimage.c (main): Migrate to argp.
2012-02-03 21:18:37 +01:00
Vladimir 'phcoder' Serbinenko 076e7c0fda Merge common RAID and LVM logic to an abstract diskfilter.
Add LDM support using the same framework.

	* Makefile.util.def (libgrubkern): Add grub-core/disk/ldm.c,
	grub-core/disk/diskfilter.c and grub-core/partmap/gpt.c.
	(libgrubmods): Remove grub-core/disk/raid.c and
	grub-core/partmap/gpt.c.
	* grub-core/Makefile.core.def (ldm): New module.
	(raid): Renamed to diskfilter. All users updated.
	* grub-core/disk/raid.c: Moved to ...
	* grub-core/disk/diskfilter.c: ... here.
	* grub-core/disk/diskfilter.c: Rename grub_raid_ to grub_diskfilter_.
	(lv_num): New var.
	(find_array): Renamed to ...
	(find_lv): ... this. Support multi-LV. Skip nameless LVs
	(grub_is_array_readable): Renamed to ...
	(grub_is_lv_readable): ... this. Support multinode hierarchy.
	(insert_array): New argument id.
	(is_node_readable): New function.
	(scan_device): Rename to ...
	(scan_disk): .. this. Restrict to one disk.
	(scan_devices): New function.
	(grub_diskfilter_iterate): Support multi-LV.
	Skip invisible and nameless LVs.
	(grub_diskfilter_memberlist): Support multi-LV.
	(grub_diskfilter_read_node): New function.
	(grub_raid_read): Most of logic moved to ...
	(read_segment): ... here
	(read_lv): New function.
	(grub_diskfilter_get_vg_by_uuid): New function.
	(grub_diskfilter_make_raid): Likewise.
	* grub-core/disk/ldm.c: New file.
	* grub-core/disk/lvm.c (vg_list): Removed.
	(lv_count): Likewise.
	(scan_depth): Likewise.
	(is_lv_readable): Likewise.
	(grub_lvm_getvalue): Advance pointer past the number.
	(find_lv): Removed.
	(do_lvm_scan): Refactored into ...
	(grub_lvm_detect): ... this. Support raid.
	(grub_lvm_iterate): Removed.
	(grub_lvm_memberlist): Likewise.
	(grub_lvm_open): Likewise.
	(grub_lvm_close): Likewise.
	(read_lv): Likewise.
	(read_node): Likewise.
	(is_node_readable): Likewise.
	(is_lv_readable): Likewise.
	(grub_lvm_read): Likewise.
	(grub_lvm_write): Likewise.
	(grub_lvm_dev): Use diskfilter
	(GRUB_MOD_INIT): Likewise.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Use
	new interface.
	* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Likewise.
	* grub-core/disk/raid5_recover.c (grub_raid5_recover): Use
	grub_diskfilter_read_node.
	Fix a bug with xor.
	* grub-core/disk/raid6_recover.c (grub_raid6_recover): Use
	grub_diskfilter_read_node.
	Support GRUB_RAID_LAYOUT_MUL_FROM_POS.
	* grub-core/kern/disk.c (grub_disk_dev_list): Make global.
	(grub_disk_dev_iterate): Move from here...
	* include/grub/disk.h (grub_disk_dev_iterate): ... to here. Inlined.
	* grub-core/kern/emu/hostdisk.c (grub_hostdisk_find_partition_start):
	Make global.
	(grub_hostdisk_find_partition_start): Likewise.
	(grub_hostdisk_os_dev_to_grub_drive): New function.
	(grub_util_biosdisk_get_osdev): Check that disk is biosdisk.
	* grub-core/kern/emu/hostdisk.c (make_device_name): Move to ...
	* util/getroot.c (make_device_name): ... here.
	* grub-core/kern/emu/hostdisk.c (grub_util_get_dm_node_linear_info):
	Move to ...
	* util/getroot.c (grub_util_get_dm_node_linear_info): ...here.
	* grub-core/kern/emu/hostdisk.c
	(convert_system_partition_to_system_disk): Move to ...
	* util/getroot.c (convert_system_partition_to_system_disk): ...here.
	* grub-core/kern/emu/hostdisk.c (device_is_wholedisk): Move to ...
	* util/getroot.c (device_is_wholedisk): ... here.
	* grub-core/kern/emu/hostdisk.c (find_system_device): Move to ...
	* util/getroot.c (find_system_device): ... here.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_present):
	Move to ...
	* util/getroot.c (grub_util_biosdisk_is_present): ...here.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev):
	Move to ...
	* util/getroot.c (grub_util_biosdisk_get_grub_dev): ... here.
	Handle LDM.
	* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_is_floppy):
	Move to ...
	* util/getroot.c (grub_util_biosdisk_is_floppy): ... here.
	* grub-core/partmap/gpt.c (grub_gpt_partition_map_iterate): Made global.
	* include/grub/disk.h (grub_disk_dev_id): Replaced RAID and LVM with
	DISKFILTER.
	* include/grub/raid.h: Renamed to ...
	* include/grub/diskfilter.h: ... this.
	* include/grub/diskfilter.h: Rename grub_raid_* to grub_diskfilter_*
	(GRUB_RAID_LAYOUT_*): Make into array.
	(GRUB_RAID_LAYOUT_MUL_FROM_POS): New value.
	(grub_diskfilter_vg): New struct.
	(grub_diskfilter_pv_id): Likewise.
	(grub_raid_member): Removed.
	(grub_raid_array): Likewise.
	(grub_diskfilter_pv): New struct.
	(grub_diskfilter_lv): Likewise.
	(grub_diskfilter_segment): Likewise.
	(grub_diskfilter_node): Likewise.
	(grub_diskfilter_get_vg_by_uuid): New proto.
	(grub_raid_register): Inline.
	(grub_diskfilter_unregister): Likewise.
	(grub_diskfilter_make_raid): New proto.
	(grub_diskfilter_vg_register): Likewise.
	(grub_diskfilter_read_node): Likewise.
	(grub_diskfilter_get_pv_from_disk) [GRUB_UTIL]: Likewise.
	* include/grub/emu/hostdisk.h (grub_util_get_ldm): New proto.
	(grub_util_is_ldm): Likewise.
	(grub_util_ldm_embed) [GRUB_UTIL]: Likewise.
	(grub_hostdisk_find_partition_start): Likewise.
	(grub_hostdisk_os_dev_to_grub_drive): Likewise.
	* include/grub/gpt_partition.h (GRUB_GPT_PARTITION_TYPE_LDM):
	New definition.
	(grub_gpt_partition_map_iterate): New proto.
	* include/grub/lvm.h (grub_lvm_vg): Removed.
	(grub_lvm_pv): Likewise.
	(grub_lvm_lv): Likewise.
	(grub_lvm_segment): Likewise.
	(grub_lvm_node): Likewise.
	* util/getroot.c [...]
	* util/grub-probe.c (probe_raid_level): Handle diskfilter.
	(probe_abstraction): Likewise.
	* util/grub-setup.c (setup): Remove must_embed. Support LDM.
	(main): Remove dead logic.
2012-01-29 14:28:01 +01:00
Vladimir 'phcoder' Serbinenko 48b391e9ab Handle newer autotools. Add some missing quotes while on it.
* Makefile.am (pkglib_DATA): Remove update-grub_lib.
	(pkglib_DATA): Move grub-mkconfig_lib from here ...
	(pkgdata_DATA): ... here.
	* Makefile.util.def (update-grub_lib): Removed.
	* conf/Makefile.common (pkglib_DATA): Removed.
	(pkglib_SCRIPTS): Likewise.
	(pkgdata_DATA): New variable.
	* tests/util/grub-shell-tester.in: Replace pkglib with pkgdata where
	needed.
	Add missing quotes.
	Remove unused variable while on it.
	* tests/util/grub-shell.in: Likewise.
	* util/grub-install.in: Likewise.
	* util/grub-mkconfig.in: Likewise.
	* util/grub-mknetdir.in: Likewise.
	* util/grub-mkrescue.in: Likewise.
	* util/grub-mkstandalone.in: Likewise.
	* util/grub.d/00_header.in: Likewise.
	* util/grub.d/10_hurd.in: Likewise.
	* util/grub.d/10_illumos.in: Likewise.
	* util/grub.d/10_kfreebsd.in: Likewise.
	* util/grub.d/10_linux.in: Likewise.
	* util/grub.d/10_netbsd.in: Likewise.
	* util/grub.d/10_windows.in: Likewise.
	* util/grub.d/20_linux_xen.in: Likewise.
	* util/grub.d/30_os-prober.in: Likewise.
	* util/update-grub_lib.in: Removed.
2012-01-24 13:17:36 +01:00
Vladimir 'phcoder' Serbinenko c029da8a89 Various squash4 fixes and LZO and XZ support.
* Makefile.util.def (libgrubmods.a): Add xzembed directory to cppflags.
	Add xzembed source files.
	* grub-core/Makefile.core.def (squash4): Add xzembed and minilzo flags.
	* grub-core/fs/squash4.c (grub_squash_super): New field compression.
	(grub_squash_inode): New subtype long_dir.
	(SQUASH_TYPE_LONG_DIR): New inode type.
	(COMPRESSION): New enum.
	(XZBUFSIZ): New const.
	(grub_squash_data): New fields blksz, decompress, xzdec, xzbuf.
	(read_chunk): Use data->decompress.
	(zlib_decompress): New function.
	(lzo_decompress): Likewise.
	(xz_decompress): Likewise.
	(squash_mount): Set new data fields.
	(grub_squash_iterate_dir): Handle long dir.
	(squash_unmount): Free xzdec and xzbuf.
	(grub_squash_open): Check ino type.
	(direct_read): Stylistic fixes. Use data->decompress.
	(grub_squash_read_data): Likewise.
	* grub-core/io/gzio.c (grub_gzio): Remove disk_input.
	(get_byte): Likewise.
	(grub_zlib_disk_read): Removed.
	* grub-core/lib/posix_wrap/sys/types.h (ssize_t): New type.
	(GRUB_POSIX_BOOL_DEFINED): New define.
	* grub-core/lib/posix_wrap/unistd.h: Include sys/types.h.
	* grub-core/lib/xzembed/xz.h: Addmissing includes.
	[!GRUB_POSIX_BOOL_DEFINED]: Define bool.
	* include/grub/deflate.h (grub_zlib_disk_read): Removed.
2011-12-26 13:18:01 +01:00
Vladimir 'phcoder' Serbinenko 17785932df merge mainline into hints 2011-12-23 18:49:00 +01:00
Vladimir 'phcoder' Serbinenko 6babad5e59 Initial integration of hints 2011-12-23 18:19:16 +01:00
Vladimir 'phcoder' Serbinenko a1a8b1b90a Support odc, newc and bigendian cpio formats.
* Makefile.util.def (libgrubmods): Add odc.c, newc.c and cpio_be.c.
	* grub-core/Makefile.core.def (newc): New module.
	(odc): Likewise.
	(cpio_be): Likewise.
	* grub-core/fs/cpio.c (ALIGN_CPIO): New macro.
	(MAGIC): Likewise.
	(MAGIC2): Likewise.
	(head) [MODE_ODC]: Adapt for the format.
	(head) [MODE_NEWC]: Likewise.
	(head) [!MODE_*]: Write fields of interest as arrays.
	(MAGIC_USTAR): Removed.
	(read_number) [MODE_NEWC]: Change to hex.
	(read_number) [!MODE_*]: Parse binary arrays.
	(grub_cpio_find_file): Factor out the code for better structure and
	always use read_number.
	(grub_cpio_mount): Use MAGIC and MAGIC2.
	(grub_cpio_dir): Exit on first hook non-0 return.
	(grub_cpio_fs) [MODE_ODC]: Set name to odc.
	(grub_cpio_fs) [MODE_NEWC]: Set name to newc.
	(GRUB_MOD_INIT) [MODE_ODC]: Set name to odc.
	(GRUB_MOD_INIT) [MODE_NEWC]: Set name to newc.
	(GRUB_MOD_FINI) [MODE_ODC]: Set name to odc.
	(GRUB_MOD_FINI) [MODE_NEWC]: Set name to newc.
	* grub-core/fs/newc.c: New file.
	* grub-core/fs/odc.c: Likewise.
	* grub-core/fs/cpio_be.c: Likewise.
2011-12-23 16:15:18 +01:00
Vladimir 'phcoder' Serbinenko 4e01c8c165 Merge mainline into plan9 2011-11-13 12:48:39 +01:00
Vladimir 'phcoder' Serbinenko f1f233ba43 Add crypto support to grub-mount 2011-11-12 00:56:20 +01:00
Vladimir 'phcoder' Serbinenko b93f1278a3 merge mainline into fuse 2011-11-12 00:42:18 +01:00
Vladimir 'phcoder' Serbinenko 12d4f965cd Support %1$d syntax.
* tests/printf_unit_test.c: New file.
	* Makefile.util.def (printf_test): New test.
	* grub-core/kern/misc.c (grub_vsnprintf_real): Support %1$d syntax.
2011-11-11 21:14:41 +01:00
Vladimir 'phcoder' Serbinenko 62ee9685a4 Merge mainline into fuse 2011-11-08 16:34:35 +01:00
Vladimir 'phcoder' Serbinenko 958ee22168 Illumos support.
* Makefile.util.def (10_illumos): New script.
	* configure.ac: Set COND_HOST_ILLUMOS.
	* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__sun__]:
	Support Illumos calls.
	(find_partition_start) [__sun__]: Likewise.
	(convert_system_partition_to_system_disk) [__sun__]: Likewise.
	(device_is_wholedisk) [__sun__]: Handle Illumos naming scheme.
	(grub_util_biosdisk_get_grub_dev) [__sun__]: Handle Illumos.
	* util/getroot.c (find_root_device_from_libzfs) [__sun__]: Return raw
	device.
	* util/grub-probe.c (probe) [__sun__]: Do character check.
	* util/grub.d/10_illumos.in: New file.
2011-11-08 12:38:30 +01:00
Vladimir 'phcoder' Serbinenko f003a8c5e7 Move ZFS crypto to separate module 2011-11-06 15:18:25 +01:00
Vladimir 'phcoder' Serbinenko 158dc1ea26 XZ CRC64 and SHA256 support.
* Makefile.util.def (libgrubmods): Add crc64.c.
	* grub-core/Makefile.core.def (crc64): New module.
	* grub-core/lib/crc64.c: New file.
	* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_hash)
	[!GRUB_EMBED_DECOMPRESSOR]: Rename crc32_context to hash_context.
	Fix the type.
	(MAX_HASH_SIZE): New define.
	(xz_dec) [!GRUB_EMBED_DECOMPRESSOR]: Add generic hash fields.
	(dec_block) [!GRUB_EMBED_DECOMPRESSOR]: Handle non-crc32 hashes.
	(index_update) [!GRUB_EMBED_DECOMPRESSOR]: Likewise.
	(dec_index) [!GRUB_EMBED_DECOMPRESSOR]: Likewise.
	(crc32_validate) [!GRUB_EMBED_DECOMPRESSOR]: Rename to ...
	(hash_validate) [!GRUB_EMBED_DECOMPRESSOR]: ... this.
	Handle non-crc32 hashes.
	(hashes) [!GRUB_EMBED_DECOMPRESSOR]: New variable.
	(dec_stream_header): Handle non-crc32 hashes.
	(dec_stream_footer): Likewise.
	(dec_block_header): Likewise.
	(dec_main): Likewise.
	(xz_dec_init): Likewise.
	(xz_dec_reset): Likewise.
	(xz_dec_end): Likewise.
	* util/import_gcry.py: Add CRC64 line.
2011-11-03 15:13:30 +01:00
Vladimir 'phcoder' Serbinenko eb0b6b45f3 Leverage BFS implementation to read AFS.
* Makefile.util.def (libgrubmods): Add afs.c.
	* grub-core/Makefile.core.def (afs): New module
	* grub-core/fs/afs.c: New file.
	* grub-core/fs/bfs.c [MODE_AFS]: Adapt for AFS.
2011-10-30 16:10:18 +01:00
Vladimir 'phcoder' Serbinenko 5825b3794b BFS implementation based on the specification.
* grub-core/fs/bfs.c: New file.
	* Makefile.util.def (libgrubmods): Add bfs.c.
	* grub-core/Makefile.core.def (bfs): New module.
2011-10-30 13:25:51 +01:00
Vladimir 'phcoder' Serbinenko faba3d163a Remove afs and befs because of copyright problem.
* grub-core/fs/afs.c: Removed.
	* grub-core/fs/afs_be.c: Removed.
	* grub-core/fs/befs.c: Removed.
	* grub-core/fs/befs_be.c: Removed.
	* Makefile.util.def (libgrubkern): Remove afs, afs_be, befs and befs_be.
	* grub-core/Makefile.core.def (afs): Removed.
	(afs_be): Likewise.
	(befs): Likewise.
	(befs_be): Likewise.
2011-10-29 11:29:34 +02:00
Vladimir 'phcoder' Serbinenko 3be82e10a9 fstest xnu_uuid subcommand.
* grub-core/commands/xnu_uuid.c (libgrubkrn): Add
	grub-core/commands/xnu_uuid.c.
	* util/grub-fstest.c (CMD_XNU_UUID): New enum value.
	(fstest): Handle xnu_uuid.
	(options): Document xnu_uuid.
	(argp_parser): Parse xnu_uuid.
2011-10-27 02:58:32 +02:00
Vladimir 'phcoder' Serbinenko 11e50e923a merge mainline into zfs 2011-10-26 19:26:24 +02:00