Vladimir 'phcoder' Serbinenko
e7d2559bc1
* grub-core/commands/i386/pc/drivemap.c: Add TRANSLATORS comments.
...
* grub-core/commands/lsmmap.c: Likewise.
* grub-core/commands/minicmd.c: Likewise.
* grub-core/commands/mips/loongson/lsspd.c: Likewise.
* grub-core/commands/regexp.c: Likewise.
* grub-core/gdb/gdb.c: Likewise.
* grub-core/term/gfxterm.c: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkfont.c: Likewise.
* util/grub-mklayout.c: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
2012-03-02 15:09:10 +01:00
Vladimir 'phcoder' Serbinenko
49ce9e50eb
* grub-core/commands/videoinfo.c (hook): Replace "Direct"
...
with "Direct color" and "Packed" with "Packed pixel".
(grub_cmd_videoinfo): Simplify legend.
2012-03-02 15:05:30 +01:00
Vladimir 'phcoder' Serbinenko
e4b791fabe
* util/getroot.c (grub_make_system_path_relative_to_its_root): Fix
...
absolutely unclear error message.
2012-03-02 14:58:53 +01:00
Vladimir 'phcoder' Serbinenko
fd1265cb29
* util/grub-mkstandalone.in: Remove confusing leftover print.
2012-03-02 14:56:47 +01:00
Vladimir 'phcoder' Serbinenko
8822a8a02b
* grub-core/fs/zfs/zfsinfo.c (print_vdev_info): Add TRANSLATORS
...
comments.
* grub-core/gdb/gdb.c (grub_cmd_gdbstub): Likewise.
(GRUB_MOD_INIT): Likewise.
* grub-core/loader/i386/linux.c (grub_cmd_linux): Clarify that it's
VGA mode.
* grub-core/net/net.c (grub_net_route_address): Add TRANSLATORS
comments.
* util/grub-install.in (usage): Likewise.
Spell ID in whole letters.
Add missing ending dot.
Quote variables.
* util/grub-reboot.in: Fix capitalisation.
* util/grub-set-default.in: Likewise.
2012-03-02 11:53:50 +01:00
Vladimir 'phcoder' Serbinenko
937fd0cc0c
* util/getroot.c (strip_extra_slashes) [CYGWIN]: #ifdef-out.
...
(exec_pipe) [CYGWIN || MINGW32]: Likewise.
(find_root_devices_from_poolname) [CYGWIN || MINGW32]: Likewise.
(find_root_devices_from_libzfs) [CYGWIN || MINGW32]: Likewise.
Disable -Werror for -Wdeprecated-declarations.
(grub_guess_root_devices) [CYGWIN || MINGW32]: #ifdef-out.
(get_dm_uuid) [!HAVE_DEVICE_MAPPER]: Likewise.
(grub_util_get_dm_abstraction) [! __linux__]: #ifdef-out.
(grub_util_get_grub_dev): Make luks handling dependent on
HAVE_DEVICE_MAPPER and not __linux__.
(get_win32_path): Fix format security.
(grub_find_zpool_from_dir) [CYGWIN || MINGW32]: #ifdef-out.
(grub_make_system_path_relative_to_its_root) [CYGWIN || MINGW32]:
Don't try grub_find_zpool_from_dir.
(grub_make_system_path_relative_to_its_root) [!__linux__]:
#ifdef-out paresdir.
2012-03-02 11:36:07 +01:00
Vladimir 'phcoder' Serbinenko
1bab1ae335
* util/grub-pe2elf.c (usage): Add missing noreturn.
...
(write_section_data): Rename name to shname to avoid shadowing.
(write_symbol_table): Rename name to symname to avoid shadowing.
Fix write_reloc_section call.
2012-03-02 11:27:48 +01:00
Vladimir 'phcoder' Serbinenko
ef023e42a2
* grub-core/boot/i386/pc/startup_raw.S: Move decompressor_end to .bss
...
to ensure that it's after the last byte of .text.
2012-03-02 11:24:24 +01:00
Vladimir 'phcoder' Serbinenko
48afcb75fa
* util/ieee1275/ofpath.c (my_isdigit): New function.
...
(trailing_digits): Use my_isdigit.
(strip_trailing_digits): Likewise.
2012-03-02 11:21:01 +01:00
Vladimir 'phcoder' Serbinenko
88d51eff35
* util/resolve.c (read_dep_list): Use grub_isspace instead of isspace.
...
* grub-core/kern/emu/hostdisk.c (read_device_map): Likewise.
2012-03-02 11:18:11 +01:00
Vladimir 'phcoder' Serbinenko
17edc2ba56
* grub-core/kern/i386/pc/startup.S: Define __start.
2012-03-02 11:15:42 +01:00
Vladimir 'phcoder' Serbinenko
ad5518d79b
* gentpl.py (kernel): Remove the use of TARGET_OBJ2ELF after strip since
...
strip already transforms he format.
2012-03-02 11:11:00 +01:00
Vladimir 'phcoder' Serbinenko
9e95e1bf6b
* conf/i386-pc-cygwin-img-ld.sc: Define also _edata and __edata.
2012-03-02 11:08:33 +01:00
Vladimir 'phcoder' Serbinenko
9cc3ee5c2b
* util/grub-install.in: Add missing gettext init.
...
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.in: Likewise.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/30_os-prober.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-03-01 00:40:02 +01:00
Vladimir 'phcoder' Serbinenko
49e08a064a
* po/Rules-swiss: Fix header comment.
2012-03-01 00:38:11 +01:00
Andreas Vogel
3809cb41bc
* grub-core/kern/misc.c (grub_xvasprintf): Fix an exit path which
...
resulted in leak of arguments.
2012-02-29 19:35:19 +01:00
Vladimir 'phcoder' Serbinenko
fa6ec5734f
* grub-core/boot/i386/pc/startup_raw.S: Use separate
...
reed_solomon_size const definition instead of computing it since
Apple assembler doesn't support the later.
2012-02-29 19:12:16 +01:00
Vladimir 'phcoder' Serbinenko
22899b9c03
* gentpl.py (kernel): Rewrite Apple part.
2012-02-29 19:07:32 +01:00
Vladimir 'phcoder' Serbinenko
a132afc371
* include/grub/kernel.h (FOR_MODULES): Check module magic.
2012-02-29 19:02:18 +01:00
Vladimir 'phcoder' Serbinenko
9d742bd431
* util/grub-mkimagexx.c (locate_sections): Support non-standard
...
ELF section gap.
(load_image): Likewise.
2012-02-29 18:57:43 +01:00
Vladimir 'phcoder' Serbinenko
f04a9a216c
* configure.ac: Fix a typo in previous commit.
2012-02-29 17:50:27 +01:00
Vladimir 'phcoder' Serbinenko
46cf439c98
Don't add -Wl,-N on Apple platform.
...
* configure.ac (TARGET_LDFLAGS_OLDMAGIC): New subst.
* conf/Makefile.common: Use TARGET_LDFLAGS_OLDMAGIC instead of -Wl,-N
2012-02-29 16:30:20 +01:00
Vladimir 'phcoder' Serbinenko
c4c48c541c
* grub-core/Makefile.core.def (lzma_decompress): Use
...
TARGET_IMG_BASE_LDOPT rather than hardcoding -Wl,-Ttext.
2012-02-29 16:28:26 +01:00
Vladimir 'phcoder' Serbinenko
31a12124a0
* grub-core/genmod.sh.in: Rewrite the Apple part.
2012-02-29 16:00:27 +01:00
Vladimir 'phcoder' Serbinenko
4f3aa1af70
* grub-core/loader/machoXX.c (grub_macho_load): Fix signed vs unsigned
...
comparison.
2012-02-29 15:48:57 +01:00
Vladimir 'phcoder' Serbinenko
7bd8b0c776
* acinclude.m4 (grub_CHECK_PIC): New test.
...
* configure.ac: Add -fno-PIC to TARGET_CFLAGS if -fPIC is default.
2012-02-29 15:30:11 +01:00
Vladimir 'phcoder' Serbinenko
97304d7c53
* include/grub/libgcc.h (__STDC_VERSION__): Define if it's not yet so
...
to avoid the warning.
2012-02-29 15:28:02 +01:00
Vladimir 'phcoder' Serbinenko
fb88381212
* grub-core/boot/i386/pc/diskboot.S (firstlist): Rename to ...
...
(LOCAL(firstlist)): ... this. Move it before the firstlist and not
after. All users updated.
2012-02-29 15:26:42 +01:00
Vladimir 'phcoder' Serbinenko
a121c9648e
Use the common size routine in hostfs so we can read disks as well.
...
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Rename to ..
(grub_util_get_fd_size): ... this. Return size in bytes.
All users updated.
* grub-core/kern/emu/hostfs.c (grub_hostfs_open): Use
grub_util_get_fd_size.
2012-02-29 15:23:31 +01:00
Vladimir 'phcoder' Serbinenko
c66d641020
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors) [__APPLE__]:
...
Add blocksize retrieval.
2012-02-29 15:17:59 +01:00
Vladimir 'phcoder' Serbinenko
dfc8aeb042
* configure.ac: Restore CFLAGS after efiemu check.
2012-02-29 15:12:31 +01:00
Vladimir 'phcoder' Serbinenko
403e25a539
* configure.ac: Move -fnested-functions to CPPFLAGS to workaround
...
Apple bug.
2012-02-29 15:10:13 +01:00
Vladimir 'phcoder' Serbinenko
382775d1ac
* grub-core/Makefile.am (MACHO2IMG): Add missing variable.
2012-02-29 15:08:08 +01:00
Vladimir 'phcoder' Serbinenko
6fd4e6e4d0
* grub-core/commands/i386/pc/halt.c (grub_halt): Add noreturn attribute.
...
(grub_cmd_halt): Likewise.
2012-02-29 15:06:39 +01:00
Vladimir 'phcoder' Serbinenko
bea359d657
* grub-core/lib/i386/relocator16.S: Declare LOCAL(relocator16_end)
...
for local arithmetics.
Break %sp init into 2 instructions.
Add 0 byte at the end.
2012-02-29 15:00:54 +01:00
Vladimir 'phcoder' Serbinenko
32eb6ee157
* grub-core/disk/diskfilter.c (read_segment): Initialise err
...
before loops.
2012-02-29 14:57:59 +01:00
Vladimir 'phcoder' Serbinenko
e837738991
* grub-core/lib/xzembed/xz_dec_stream.c (hash_validate): Use void *
...
for context.
2012-02-29 14:56:51 +01:00
Vladimir 'phcoder' Serbinenko
8cb17de77b
* grub-core/disk/ldm.c (make_vg): Init part.name.
...
(grub_ldm_detect): Silence spurious warning.
(grub_util_is_ldm): Likewise.
2012-02-29 14:55:09 +01:00
Vladimir 'phcoder' Serbinenko
595717e6d4
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Init fsbfreq to
...
sane value to avoid a spurious warning.
2012-02-29 14:53:41 +01:00
Vladimir 'phcoder' Serbinenko
c4b7e58882
* include/grub/dl.h: Switch from APPLE_CC to __APPLE__.
...
(GRUB_MOD_LICENSE) [ASM_FILE]: Make into macro. All users updated.
2012-02-29 14:51:09 +01:00
Vladimir 'phcoder' Serbinenko
5982495738
* include/grub/symbol.h (EXT_C) [!ASM_FILE]: Redefine with strings.
...
* grub-core/lib/i386/backtrace.c (grub_backtrace): Use EXT_C.
2012-02-29 14:48:58 +01:00
Vladimir 'phcoder' Serbinenko
70115b995d
* grub-core/gdb/i386/machdep.S: Use VARIABLE and EXT_C instead of
...
hardcoding the relevant info.
2012-02-29 14:44:52 +01:00
Vladimir 'phcoder' Serbinenko
56733740ed
* grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len): Add
...
missing const qualifiers.
* grub-core/gnulib/argp-fmtstream.h (__argp_get_display_len): Likewise.
2012-02-29 14:42:20 +01:00
Vladimir 'phcoder' Serbinenko
434814814b
* util/getroot.c [__APPLE__]: Add missing includes.
...
(grub_util_biosdisk_is_floppy): Fix usage of undefined variable.
2012-02-29 14:14:08 +01:00
Vladimir 'phcoder' Serbinenko
3cb38f015f
* util/grub-mkimage.c (generate_image): Silence spurious warning.
2012-02-29 14:12:41 +01:00
Vladimir 'phcoder' Serbinenko
d9dbf11e16
* util/ieee1275/ofpath.c: Rename devname to sys_devname everywhere to
...
avoid conflicts.
2012-02-29 14:10:04 +01:00
Vladimir 'phcoder' Serbinenko
0c42a45dcc
* util/ieee1275/grub-ofpathname.c: Add missing config.h include.
2012-02-29 14:08:58 +01:00
Vladimir 'phcoder' Serbinenko
46c34eb096
* util/grub-setup.c (setup) [!__linux__]: Add missing file declaration
...
and grub_file_close call.
2012-02-29 14:07:53 +01:00
Vladimir 'phcoder' Serbinenko
99ce1597a4
Add LZSS Mach-O support (needed for new xnu kernelcache).
...
* grub-core/Makefile.core.def (xnu): Add file lzss.c
* grub-core/loader/lzss.c: New file.
* grub-core/loader/xnu.c (grub_xnu_load_driver): Close binaryfile
on Mach-O open failure.
* grub-core/loader/macho.c (grub_macho_close): Free uncompressedXX.
Don't free cmdsXX in uncompressedXX is set.
(grub_macho_file): Init new fields.
New argument is_64bit. All users updated.
Handle compressed. Error out if no suitable architecture is found.
Don't close file.
(grub_macho_open): New argument is_64bit. All users updated.
* grub-core/loader/macho32.c: Add defines for new fields.
* grub-core/loader/macho64.c: Likewise.
* grub-core/loader/machoXX.c (grub_macho_contains_macho): Make static.
(grub_macho_parse): Handle compressed.
Defer actual processing if compressed.
(grub_macho_cmds_iterate): Decompress if compressed. New argument
"filename". All users updated.
(grub_macho_size): New argument "filename". All users updated.
(grub_macho_get_entry_point): Likewise.
(grub_macho_load): Handle compressed.
* include/grub/macho.h (grub_macho_lzss_header): New struct.
(GRUB_MACHO_LZSS_OFFSET): New define.
(grub_decompress_lzss): New proto.
* include/grub/machoload.h (grub_macho_file): New fields to handle
compressed.
(grub_macho_contains_macho64): Remove proto.
(grub_macho_contains_macho32): Likewise.
* util/grub.d/30_os-prober.in: Use kernel cache if available.
2012-02-29 13:26:13 +01:00
Vladimir 'phcoder' Serbinenko
ebd17d6f51
* grub-core/disk/pata.c (grub_pata_readwrite): Fix ATAPI protocol error.
2012-02-29 12:45:32 +01:00
Vladimir 'phcoder' Serbinenko
2702b4e4f7
Fix make dist.
...
* Makefile.am (starfield_theme_files): New var.
(starfield_DATA): Use starfield_theme_files.
(EXTRA_DIST): Add starfield_theme_files. Add starfield source files.
Add bootcheck-related files.
* conf/Makefile.extra-dist (EXTRA_DIST): Add several missing files.
* docs/Makefile.am (EXTRA_DIST): Add font_char_metrics.png
and font_char_metrics.txt.
* grub-core/Makefile.core.def (kernel): Update extra_dist.
(setjmp): Add lib/ia64/longjmp.S.
* po/Makefile.in.in (DISTFILES): Add POTFILES-shell.in and grub.d.sed.
* po/POTFILES.in: Regenerate.
* po/Rules-swiss: use DISTFILES.common.extra2 and not
DISTFILES.common.extra1.
* util/devicemap.c: Removed.
* grub-core/lib/i386/relocator_backward.S: Likewise.
* util/import_gcry.py: Remove unused files. Add extra_dist for
ChangeLog.
2012-02-28 12:58:57 +01:00
Vladimir 'phcoder' Serbinenko
cf1adfdff5
* grub-core/gettext/gettext.c (grub_mofile_open): Call
...
grub_gettext_delete_list before changing grub_gettext_max to avoid
running out of array bounds.
2012-02-28 11:50:53 +01:00
Vladimir 'phcoder' Serbinenko
7acd2ae1fb
* grub-core/term/i386/pc/vga_text.c: Add GRUB_MACHINE_MULTIBOOT to
...
grub_vga_text_init/grub_vga_text_fini.
2012-02-28 11:12:32 +01:00
Vladimir 'phcoder' Serbinenko
629e6a3363
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix format specification.
2012-02-28 11:02:19 +01:00
Vladimir 'phcoder' Serbinenko
541d92e912
* configure.ac: Bump to 2.00~beta0.
2012-02-28 04:28:40 +01:00
Vladimir 'phcoder' Serbinenko
7931dddfb8
* util/getroot.c (grub_find_root_devices_from_btrfs): Add
...
missing initialisation.
2012-02-28 04:25:13 +01:00
Vladimir 'phcoder' Serbinenko
f1b16fa3e3
* grub-core/partmap/msdos.c (message_warn): Clarify messages.
2012-02-28 04:23:58 +01:00
Vladimir 'phcoder' Serbinenko
83ddae2333
Support v2 xnu boot arguments.
...
* grub-core/loader/i386/xnu.c (grub_cpu_xnu_fill_devicetree):
New argument fsbfreq_out.
(grub_xnu_set_video): Receive an argument grub_xnu_boot_params_common.
(grub_xnu_boot): Support v2 arguments. Disable PIC so that APIC can
be used.
* grub-core/loader/machoXX.c (grub_macho_load): New argument
darwin_version.
* grub-core/loader/xnu.c (grub_xnu_darwin_version): New variable.
* include/grub/i386/xnu.h (grub_xnu_boot_params_common): New struct.
(grub_xnu_boot_params): Rename to ...
(grub_xnu_boot_params_v1): ...this. Use grub_xnu_boot_params_common.
(grub_xnu_boot_params_v2): New struct.
2012-02-28 04:04:19 +01:00
Vladimir 'phcoder' Serbinenko
dc693fe67c
* grub-core/efiemu/prepare.c (grub_efiemu_crc): Add missing
...
zeroing of CRC field before computing CRC.
2012-02-28 03:59:08 +01:00
Vladimir 'phcoder' Serbinenko
5a6e39c28f
* grub-core/lib/relocator.c (malloc_in_range): Fix memory leak.
...
Change order of allocations to decrease fragmentation.
2012-02-28 01:32:38 +01:00
Vladimir 'phcoder' Serbinenko
6c21f5d7a1
* Makefile.util.def (grub-ofpathname): Enable on all platforms.
2012-02-27 22:48:29 +01:00
Colin Watson
cfe456dc03
Use write-combining MTRR to speed up video with buggy BIOSes.
...
* grub-core/video/i386/pc/vbe.c (framebuffer): New member mtrr.
(cpuid): New define.
(rdmsr): Likewise.
(wrmsr): Likewise.
(mtrr_base): Likewise.
(mtrr_mask): Likewise.
(grub_vbe_enable_mtrr_entry): New function.
(grub_vbe_enable_mtrr): Likewise.
(grub_vbe_disable_mtrr): Likewise.
(grub_vbe_bios_set_display_start): Disable mtrr when handing the
control off to BIOS.
(grub_video_vbe_init): Fill mtrr.
(grub_video_vbe_fini): Disable mtrr.
(grub_video_vbe_get_info_and_fini): Likewise.
(grub_video_vbe_setup): Enable mtrr.
2012-02-27 22:31:51 +01:00
Colin Watson
e3c78337c3
* include/grub/partition.h (grub_partition_map): Change prototype of
...
embed to take a maximum value for nsectors.
* include/grub/emu/hostdisk.h (grub_util_ldm_embed): Likewise.
* include/grub/fs.h (grub_fs): Likewise.
* grub-core/partmap/msdos.c (embed_signatures): New array.
(pc_partition_map_embed): Check for and avoid sectors matching any
of the signatures in embed_signatures, up to max_nsectors.
* grub-core/partmap/gpt.c (gpt_partition_map_embed): Restrict
returned sector map to max_nsectors.
* grub-core/disk/ldm.c (grub_util_ldm_embed): Likewise.
* grub-core/fs/btrfs.c (grub_btrfs_embed): Likewise.
* grub-core/fs/zfs/zfs.c (grub_zfs_embed): Likewise.
* util/grub-setup.c (setup): Allow for the embedding area being
split into multiple blocklists. Tell dest_partmap->embed the
maximum number of sectors we care about.
2012-02-27 22:25:39 +01:00
Vladimir 'phcoder' Serbinenko
984b973ffc
* util/grub-install.in: Clarify strings.
...
Fix source dir check.
2012-02-27 21:31:58 +01:00
Richard Laager
f122e0d648
* util/getroot.c (grub_find_root_devices_from_mountinfo): Handle
...
"zfs" and "fuse.zfs" as synonyms.
2012-02-27 20:14:26 +01:00
Vladimir 'phcoder' Serbinenko
071114bb3e
* configure.ac: Put platform and target_cpu substitutions back since
...
they are used for directories.
2012-02-27 19:10:02 +01:00
Richard Laager
817e6abcd0
* util/grub.d/10_linux.in: Add ZFS-related arguments.
...
* util/grub.d/20_linux_xen.in: Likewise.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-02-27 19:07:09 +01:00
Richard Laager
897b741978
* util/getroot.c (find_root_devices_from_poolname): Handle vdevs
...
with full paths.
2012-02-27 17:42:48 +01:00
Richard Laager
a414bd1565
* util/getroot.c (grub_find_root_devices_from_mountinfo): Add missing
...
unescape.
2012-02-27 17:40:38 +01:00
Vladimir 'phcoder' Serbinenko
30ac48c452
Don't use insecure popen in getroot.
...
* util/getroot.c (get_mdadm_uuid): Move pipe logic to ...
(exec_pipe): ... here.
(find_root_devices_from_poolname): Use exec_pipe.
2012-02-27 17:37:23 +01:00
Vladimir 'phcoder' Serbinenko
53f13848f1
Remove platform and target_cpu replacement.
...
* configure.ac: Remove platform and target_cpu substitutions.
* tests/util/grub-shell.in: Use modinfo.
* util/powerpc/ieee1275/grub-mkrescue.in: Specify powerpc-ieee1275
explicitly.
2012-02-27 16:46:52 +01:00
Vladimir 'phcoder' Serbinenko
90cb2803d4
Autodetect platform in grub-install but allow override.
...
* util/grub-install.in: Autodetect platform. Support --target and
--directory. Read platform from modinfo.sh.
2012-02-27 16:06:18 +01:00
Vladimir 'phcoder' Serbinenko
b913642798
Support btrfs multi-volume probe.
...
* util/getroot.c (btrfs_ioctl_dev_info_args) [__linux__]: New struct.
(btrfs_ioctl_fs_info_args) [__linux__]: Likewise.
(BTRFS_IOC_DEV_INFO) [__linux__]: New define.
(BTRFS_IOC_FS_INFO) [__linux__]: Likewise.
(grub_find_root_devices_from_btrfs) [__linux__]: New function.
(grub_find_root_devices_from_mountinfo) [__linux__]: Use
grub_find_root_devices_from_btrfs if on btrfs.
2012-02-27 14:56:28 +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
584b2f8a22
Replace grub_target_addr with more appropriate types.
...
* grub-core/commands/efi/fixvideo.c (scan_card): Replace
grub_target_addr with grub_addr.
* grub-core/commands/iorw.c (grub_cmd_read): Replace
grub_target_addr with grub_port.
(grub_cmd_write): Likewise.
* grub-core/commands/memrw.c (grub_cmd_read): Replace
grub_target_addr with grub_addr.
(grub_cmd_write): Likewise.
* grub-core/video/efi_uga.c (find_line_len): Likewise.
2012-02-27 14:13:24 +01:00
Vladimir 'phcoder' Serbinenko
5a0dc6fb2a
* include/grub/efi/api.h (grub_efi_runtime_services): Add missing
...
const qualifier for vendor_guid.
2012-02-27 14:09:09 +01:00
Vladimir 'phcoder' Serbinenko
786aff6e55
* grub-core/efiemu/runtime/efiemu.c (efiemu_get_variable): Add missing
...
const qualifier.
(efiemu_memequal): Likewise.
(find_variable): Likewise.
2012-02-27 14:07:53 +01:00
Vladimir 'phcoder' Serbinenko
49017b1719
Fix missing console prototype on qemu-mips.
...
* include/grub/mips/qemu_mips/console.h: New file.
2012-02-27 14:06:33 +01:00
Matthew Garrett
c598862958
* grub-core/kern/efi/efi.c (grub_efi_get_variable): Add new function.
...
* include/grub/efi/efi.h: Likewise.
* include/grub/efi/api.h: Add guid for EFI-specified variables.
* include/grub/charset.h (GRUB_MAX_UTF16_PER_UTF8): New definition.
* grub-core/normal/charset.c (grub_utf8_process): Move from here ...
* include/grub/charset.h (grub_utf8_process): ... to here. Inline.
* grub-core/normal/charset.c (grub_utf8_to_utf16): Move from here ...
* include/grub/charset.h (grub_utf8_to_utf16): ... to here. Inline.
2012-02-27 12:02:57 +01:00
Matthew Garrett
e33f8d692f
* include/grub/efi/pci.h: New file to define EFI PCI protocols.
2012-02-27 11:42:23 +01:00
Vladimir 'phcoder' Serbinenko
fb312cd9da
* grub-core/disk/diskfilter.c (grub_diskfilter_iterate): Fix off-by-one
...
error.
2012-02-27 11:39:15 +01:00
Vladimir 'phcoder' Serbinenko
7134247cd8
* configure.ac: Remove inappropriate use of program_transform_name
...
on grubdir and bootdir but allow explicit specification of those
variables.
2012-02-27 11:34:31 +01:00
Vladimir 'phcoder' Serbinenko
6a3131243a
* util/grub-mknetdir.in (grub_prefix): Removed.
...
(subdir): Use @bootdirname@ and @grubdirname@.
2012-02-27 11:08:17 +01:00
Vladimir 'phcoder' Serbinenko
2311c5caa9
Replace PACKAGE_TARNAME with PACKAGE in pkglibdir and pkgdatadir.
2012-02-27 11:04:50 +01:00
Vladimir 'phcoder' Serbinenko
7d5d60f7c8
* po/POTFILES.in: Regenerated.
2012-02-27 10:37:03 +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
b4a6a53310
* grub-core/normal/menu_text.c (grub_print_message_indented_real): Fix a
...
warning.
2012-02-27 10:31:46 +01:00
Vladimir 'phcoder' Serbinenko
668f304f4d
* util/grub-install.in: Use file identifier if no UUID is available
...
or user explicitly prompted for it.
2012-02-27 02:23:14 +01:00
Navdeep Parhar
665f2341f7
* grub-core/loader/i386/bsd.c (freebsd_zfsguid): New variable.
...
(freebsd_get_zfs): New function.
(grub_freebsd_boot): Pass zfs UUID.
(grub_cmd_freebsd): Set zfs UUID.
2012-02-27 02:02:16 +01:00
Vladimir 'phcoder' Serbinenko
1240a58afb
* conf/Makefile.common (platformdir): Base on pkglibdir and not
...
pkglibrootdir.
2012-02-27 01:44:10 +01:00
Mike Gilbert
e4c498a106
Add configure flag to control libzfs integration.
...
* configure.ac: Add AC_ARG_ENABLE(libzfs ...) and associated logic.
2012-02-27 00:57:48 +01:00
Vladimir 'phcoder' Serbinenko
1e9a9a3faf
* grub-core/disk/diskfilter.c (insert_array): Choose the smallest
...
device.
* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Reject too
small devices.
2012-02-27 00:46:08 +01:00
Vladimir 'phcoder' Serbinenko
036985b8ce
Remove grub_{modname}_init and grub_{modname}_fini. They should never
...
be used directly if it's really a module and GRUB_MOD_INIT shouldn't
be used on non-modules.
* grub-core/commands/boot.c (GRUB_MOD_INIT) [LOONGSON || QEMU_MIPS]:
Rename to grub_boot_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_boot_fini.
* grub-core/commands/keylayouts.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_keylayouts_fini.
* grub-core/font/font_cmd.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_font_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to grub_font_fini.
* grub-core/kern/mips/loongson/init.c: Replace explicit protos with
includes.
(grub_machine_init): Remove empty inits.
* grub-core/kern/mips/qemu_mips/init.c: Replace explicit protos with
includes.
(grub_machine_init): Remove empty inits.
* grub-core/term/arc/console.c: Remove explicit proto.
* grub-core/term/at_keyboard.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_at_keyboard_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
grub_at_keyboard_fini.
* grub-core/term/gfxterm.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_gfxterm_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
grub_gfxterm_fini.
* grub-core/term/i386/pc/vga_text.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_vgatext_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
grub_vgatext_fini.
* grub-core/term/ieee1275/console.c: Remove explicit proto.
* grub-core/term/serial.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_serial_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
grub_serial_fini.
* grub-core/term/terminfo.c (GRUB_MOD_INIT)
[LOONGSON || QEMU_MIPS]: Rename to grub_terminfo_init.
(GRUB_MOD_FINI) [LOONGSON || QEMU_MIPS]: Rename to
grub_terminfo_fini.
* grub-core/video/bitmap.c (GRUB_MOD_INIT): Removed.
(GRUB_MOD_FINI): Likewise.
* grub-core/video/radeon_fuloong2e.c (GRUB_MOD_INIT)
[LOONGSON]: Rename to grub_video_radeon_fuloong2e_init.
(GRUB_MOD_FINI) [LOONGSON]: Rename to
grub_video_radeon_fuloong2e_fini.
* grub-core/video/sis315pro.c (GRUB_MOD_INIT)
[LOONGSON]: Rename to grub_video_sis315pro_init.
(GRUB_MOD_FINI) [LOONGSON]: Rename to
grub_video_sis315pro_fini.
* grub-core/video/sm712.c (GRUB_MOD_INIT)
[LOONGSON]: Rename to grub_video_sm712_init.
(GRUB_MOD_FINI) [LOONGSON]: Rename to
grub_video_sm712_fini.
* include/grub/at_keyboard.h (grub_at_keyboard_init): New proto.
(grub_at_keyboard_fini): Likewise.
* include/grub/dl.h (GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]:
Don't declare grub_{modname}_init.
(GRUB_MOD_INIT) [!GRUB_UTIL && !EMU]: Don't declare grub_{modname}_fini.
* include/grub/keyboard_layouts.h (grub_keylayouts_init) [!EMU]:
New proto.
(grub_keylayouts_fini) [!EMU]: Likewise.
* include/grub/serial.h (grub_serial_init) [!EMU]:
New proto.
(grub_serial_fini) [!EMU]: Likewise.
* include/grub/terminfo.h (grub_terminfo_init) [!EMU]:
New proto.
(grub_terminfo_fini) [!EMU]: Likewise.
* include/grub/video.h (grub_font_init) [!EMU]:
New proto.
(grub_font_fini) [!EMU]: Likewise.
(grub_gfxterm_init) [!EMU]: Likewise.
(grub_gfxterm_fini) [!EMU]: Likewise.
(grub_video_sm712_init) [!EMU]: Likewise.
(grub_video_sm712_fini) [!EMU]: Likewise.
(grub_video_sis315pro_init) [!EMU]: Likewise.
(grub_video_sis315pro_fini) [!EMU]: Likewise.
(grub_video_radeon_fuloong2e_init) [!EMU]: Likewise.
(grub_video_radeon_fuloong2e_fini) [!EMU]: Likewise.
2012-02-27 00:28:45 +01:00
Vladimir 'phcoder' Serbinenko
d5534665ff
Make nand a prefix for nand devices.
...
* grub-core/disk/ieee1275/nand.c (grub_nand_open): Use prefix nand.
2012-02-26 23:59:00 +01:00
Vladimir 'phcoder' Serbinenko
10133b5ff3
* grub-core/kern/misc.c (grub_stpcpy): Move from here ...
...
* include/grub/misc.h (grub_stpcpy): ... to here. Inlined.
2012-02-26 23:55:18 +01:00
Vladimir 'phcoder' Serbinenko
8e307a625d
* include/grub/env.h (grub_env_find): Remove prototype.
...
* grub-core/kern/env.c (grub_env_find): Make static.
(grub_env_set): Remove useless set.
2012-02-26 23:53:21 +01:00
Vladimir 'phcoder' Serbinenko
a4c65f3441
* grub-core/kern/i386/realmode.S: Remove useless align.
2012-02-26 23:46:34 +01:00
Vladimir 'phcoder' Serbinenko
d87893d5dc
* include/grub/dl.h (grub_dl_load_file): Don't export.
2012-02-26 23:44:39 +01:00
Vladimir 'phcoder' Serbinenko
50159add1e
* grub-core/disk/diskfilter.c (grub_diskfilter_open): Remove useless
...
grub_dprintf.
2012-02-26 23:39:21 +01:00
Vladimir 'phcoder' Serbinenko
b2582b84f2
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Remove useless
...
grub_errors.
* grub-core/disk/mdraid1x_linux.c (grub_mdraid_detect): Simplify by
not reloading whole superblock but only the part which is really needed.
Remove useless grub_errors.
* grub-core/disk/mdraid_linux.c (grub_mdraid_detect): Remove useless
grub_errors.
2012-02-26 23:36:12 +01:00
Vladimir 'phcoder' Serbinenko
e2a833958e
Don't export grub_get_rtc.
...
* include/grub/i386/pc/time.h (grub_get_rtc): Don't export.
* grub-core/commands/i386/pc/play.c (play): Use grub_get_time_ms.
2012-02-26 23:25:47 +01:00
Vladimir 'phcoder' Serbinenko
e7d2a906b0
* grub-core/genmod.sh.in: Add -R .note.GNU-stack to strip.
2012-02-26 22:57:26 +01:00
Vladimir 'phcoder' Serbinenko
6cf1363b8f
* grub-core/disk/diskfilter.c (insert_array): Remove scanner_name
...
argument since it can be deduced from diskfilter. All users updated.
2012-02-26 22:53:21 +01:00
Vladimir 'phcoder' Serbinenko
eece3349ea
Remove prio_list.
...
* include/grub/list.h (grub_prio_list): Removed.
(GRUB_PRIO_LIST_PRIO_MASK): Removed. All users switched to
GRUB_COMMAND_PRIO_MASK.
(GRUB_PRIO_LIST_FLAG_ACTIVE): Removed. All users switched to
GRUB_COMMAND_FLAG_ACTIVE.
(grub_prio_list_insert): Removed.
(grub_prio_list_remove): Likewise.
(GRUB_AS_PRIO_LIST): Likewise.
(GRUB_AS_PRIO_LIST_P): Likewise.
* include/grub/command.h (GRUB_COMMAND_PRIO_MASK): New define.
(GRUB_COMMAND_FLAG_ACTIVE): Likewise.
* grub-core/kern/list.c (grub_prio_list_insert): Remove.
* grub-core/kern/command.c (grub_register_command_prio): Inline
the prio_list code.
(grub_unregister_command): Likewise.
2012-02-26 22:49:24 +01:00
Vladimir 'phcoder' Serbinenko
94f064b4c9
Fix interrupt mixup from previous commit.
...
* include/grub/i386/pc/int.h (grub_i386_idt): New struct.
(grub_realidt): New var.
* grub-core/lib/i386/relocator16.S (grub_relocator16_idt): New variable
Load idt.
* grub-core/lib/i386/relocator.c (grub_relocator16_idt):
New declaration.
(grub_relocator16_boot): Set grub_relocator16_idt.
* grub-core/kern/i386/realmode.S (realidt): Renamed to ...
(LOCAL(realidt)): ... this.
* grub-core/boot/i386/pc/startup_raw.S: Pass pointer to realidt in eax.
* grub-core/kern/i386/pc/startup.S: Save pointer to realidt.
(grub_realidt): New variable.
2012-02-26 22:10:13 +01:00
Vladimir 'phcoder' Serbinenko
27317084c6
* grub-core/lib/i386/backtrace.c (grub_cmd_backtrace): Move from ...
...
* grub-core/lib/backtrace.c (grub_cmd_backtrace): ... to here.
* grub-core/lib/i386/backtrace.c (GRUB_MOD_INIT): Move from ...
* grub-core/lib/backtrace.c (GRUB_MOD_INIT): ... to here.
Gettextize.
* grub-core/lib/i386/backtrace.c (GRUB_MOD_FINI): Move from ...
* grub-core/lib/backtrace.c (GRUB_MOD_FINI): ... to here.
* po/POTFILES.in: Regenerate.
2012-02-26 21:04:45 +01:00
Vladimir 'phcoder' Serbinenko
47b40053e0
* grub-core/commands/probe.c (grub_cmd_probe): Gettextise UUID and label
...
errors.
2012-02-26 20:36:09 +01:00
Vladimir 'phcoder' Serbinenko
2b3431017d
* grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len): Stop on
...
\0.
(add_length): Likewise.
2012-02-26 20:32:37 +01:00
Vladimir 'phcoder' Serbinenko
4cebfa1a87
GDB serial and backtrace support.
...
* grub-core/kern/i386/realmode.S (real_to_prot): Reload IDT.
(prot_to_real): Likewise.
* grub-core/kern/i386/int.S (grub_bios_interrupt): Remove IDT reload.
* grub-core/Makefile.core.def (backtrace): New module.
(gdb): Likewise.
* grub-core/gdb/cstub.c: New file.
* grub-core/gdb/gdb.c: Likewise.
* grub-core/gdb/i386/idt.c: Likewise.
* grub-core/gdb/i386/machdep.S: Likewise.
* grub-core/gdb/i386/signal.c: Likewise.
* grub-core/lib/i386/backtrace.c: Likewise.
* grub-core/lib/backtrace.c: Likewise.
* include/grub/backtrace.h: Likewise.
* include/grub/gdb.h: Likewise.
* include/grub/i386/gdb.h: Likewise.
2012-02-26 20:31:03 +01:00
Lubomir Kundrak
ff27c3dd5d
GDB serial and backtrace support.
...
* grub-core/kern/i386/realmode.S (real_to_prot): Reload IDT.
(prot_to_real): Likewise.
* grub-core/kern/i386/int.S (grub_bios_interrupt): Remove IDT reload.
* grub-core/Makefile.core.def (backtrace): New module.
(gdb): Likewise.
* grub-core/gdb/cstub.c: New file.
* grub-core/gdb/gdb.c: Likewise.
* grub-core/gdb/i386/idt.c: Likewise.
* grub-core/gdb/i386/machdep.S: Likewise.
* grub-core/gdb/i386/signal.c: Likewise.
* grub-core/lib/i386/backtrace.c: Likewise.
* include/grub/backtrace.h: Likewise.
* include/grub/gdb.h: Likewise.
* include/grub/i386/gdb.h: Likewise.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-02-26 19:17:37 +01:00
Vladimir 'phcoder' Serbinenko
585031cb92
* grub-core/gnulib/argp-fmtstream.c (__argp_get_display_len):
...
New function.
(add_length): Likewise.
(__argp_fmtstream_update): Handle strings with non-ASCII chars.
* grub-core/gnulib/argp-fmtstream.h (__argp_get_display_len): New
proto.
* grub-core/gnulib/argp-help.c (argp_args_usage): Use
__argp_get_display_len.
2012-02-26 19:07:59 +01:00
Vladimir 'phcoder' Serbinenko
7e8fac16ad
$"..." support in scripts.
...
* grub-core/script/execute.c (grub_script_arglist_to_argv): Handle
GRUB_SCRIPT_ARG_TYPE_GETTEXT.
* grub-core/script/yylex.l: Likewise.
* include/grub/script_sh.h (GRUB_SCRIPT_ARG_TYPE_GETTEXT): New enum
value.
2012-02-26 19:02:46 +01:00
Vladimir 'phcoder' Serbinenko
15eff5d9c2
* gentpl.py: Remove obsolete pkglib_DATA handling.
2012-02-26 18:54:30 +01:00
Vladimir 'phcoder' Serbinenko
fc847818fc
Don't transform PACKAGE_TARNAME following a discussion on autoconf
...
mailing list.
* util/grub-install.in: Don't transform PACKAGE_TARNAME.
* util/grub-kbdcomp.in: Likewise.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Likewise.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/powerpc/ieee1275/grub-mkrescue.in: Likewise.
2012-02-26 18:37:54 +01:00
Vladimir 'phcoder' Serbinenko
47454da510
Remove GRUB_PREFIX.
...
* util/grub-mkconfig.in: Remove GRUB_PREFIX.
* util/grub.d/00_header.in: Compute prefix in the only place it's still
used for backward compatibility.
2012-02-26 18:21:31 +01:00
Vladimir 'phcoder' Serbinenko
22c7ce85fe
Add new all_video module.
...
* grub-core/Makefile.am (moddep.lst): Make dependent on video.lst.
* grub-core/Makefile.core.def (all_video): New module.
* grub-core/genmoddep.awk: Generate dependency of all_video from
video.lst.
* grub-core/lib/fake_module.c: New file.
* grub-core/normal/main.c (features): Add feature_all_video_module.
* util/grub.d/00_header.in: Define locale_dir based on $prefix and
don't do explicit search again.
insmod all_video in load_video if available.
2012-02-26 18:09:07 +01:00
Vladimir 'phcoder' Serbinenko
67093bc0ed
Another round of string clarification and adding TRANSLATORS comments.
2012-02-26 17:28:05 +01:00
Vladimir 'phcoder' Serbinenko
ad7b7b8527
* util/grub-mknetdir.in: Remove erroneous reference to install_device.
2012-02-26 17:23:26 +01:00
Vladimir 'phcoder' Serbinenko
8b282ad222
* grub-core/normal/charset.c (grub_utf8_to_ucs4_alloc): Fix return type
...
to grub_ssize_t.
* grub-core/normal/main.c (grub_normal_init_page): Fix msg_len type.
* include/grub/charset.h (grub_utf8_to_ucs4_alloc): Fix prototype.
2012-02-26 17:20:30 +01:00
Vladimir 'phcoder' Serbinenko
d43ad75467
* grub-core/normal/menu_text.c (grub_print_message_indented_real): Add
...
trailing newline implicitly. All users updated.
2012-02-26 17:16:05 +01:00
Vladimir 'phcoder' Serbinenko
a9c7fd1c6c
Implement serial on IEEE1275 and EFI.
...
* docs/grub.texi (Platform-specific limitations): Fix the columen video
on emu. Mention arc and emu as the only platforms without serial
support.
* grub-core/Makefile.core.def (serial): Enable on all terminfomodule and
ieee1275 platforms.
* grub-core/term/efi/serial.c: New file.
* grub-core/term/ieee1275/serial.c: Likewise.
* grub-core/term/serial.c (grub_serial_find): Disable direct port
specification if no ns8250 driver is available.
(grub_cmd_serial): Likewise.
(GRUB_MOD_INIT) [GRUB_MACHINE_IEEE1275]: Init ofserial.
(GRUB_MOD_INIT) [GRUB_MACHINE_EFI]: Init efiserial.
* include/grub/efi/api.h (GRUB_EFI_SERIAL_IO_GUID): New define.
(grub_efi_parity_type_t): New type.
(grub_efi_stop_bits_t): Likewise.
(grub_efi_serial_io_interface): New struct.
* include/grub/serial.h (grub_serial_port): Make 'broken' field
available for all interfaces.
Add EFI and IEEE1275 fields.
(grub_ofserial_init): New proto.
(grub_efiserial_init): Likeiwse.
* util/grub.d/00_header.in: Don't check for the presence of serial
module.
2012-02-26 17:08:11 +01:00
Vladimir 'phcoder' Serbinenko
0ec820904e
* grub-core/disk/ieee1275/ofdisk.c (scan): Fix improper use of device
...
name as if it was an alias.
2012-02-26 16:51:25 +01:00
Vladimir 'phcoder' Serbinenko
114076ef63
* grub-core/commands/lsacpi.c (options): Fix typo.
2012-02-25 23:04:30 +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
1e3f8ae86f
* grub-core/gfxmenu/gui_progress_bar.c (progress_bar_set_property):
...
Put back accidently commented-out code.
2012-02-24 22:40:05 +01:00
Vladimir 'phcoder' Serbinenko
ed167a8027
* grub-core/fs/hfsplus.c (grub_hfsplus_btree_iterate_node): Add btree
...
loop check using Brent algorithm.
(grub_hfsplus_btree_search): Likewise.
2012-02-24 22:28:45 +01:00
Vladimir 'phcoder' Serbinenko
6753c0ec3a
* util/grub-install.in: Fix usage of wrong device for PreP install.
2012-02-24 12:35:38 +01:00
Vladimir 'phcoder' Serbinenko
4e27343fb0
* conf/Makefile.common (CFLAGS_GNULIB): Add
...
-Wno-unsafe-loop-optimizations.
* configure.ac: Remove -Wmissing-declarations and -Wmissing-prototypes
on tools.
* grub-core/commands/legacycfg.c: Add pragma to skip
-Wunsafe-loop-optimizations.
(check_password_md5_real): Fix loop counter type.
* grub-core/commands/testload.c (grub_cmd_testload): Fix over the EOF
reading.
* grub-core/disk/ldm.c (grub_util_get_ldm): Fix logic error.
* grub-core/fs/zfs/zfs_sha256.c (zio_checksum_SHA256): Add safety
loop condition.
* grub-core/io/gzio.c: Add pragma to skip -Wunsafe-loop-optimizations.
* grub-core/lib/LzmaEnc.c (GetOptimum): Avoid possible infinite loop.
* grub-core/net/net.c (grub_net_route_address): Add safety loop
condition.
* grub-core/normal/charset.c (bidi_line_wrap): Likewise.
* grub-core/normal/cmdline.c (grub_set_history): Fix loop types and
avoid possible infinite loops.
* grub-core/script/parser.y: Add pragma to skip -Wmissing-declarations
and -Wunsafe-loop-optimizations.
* grub-core/script/yylex.l: Likewise.
* util/grub-mkfont.c: Add pragma to skip -Wunsafe-loop-optimizations.
(print_glyphs): Avoid infinite loops.
* util/grub-mkimage.c (compress_kernel_xz): Fix format security.
2012-02-24 12:30:32 +01:00
Grégoire Sutre
697f18b067
* grub-core/commands/lsacpi.c (disp_acpi_xsdt_table): Fix loop condition
...
to avoid infinite loop.
(disp_acpi_rsdt_table): Likewise.
2012-02-24 11:48:07 +01:00
Vladimir 'phcoder' Serbinenko
274416e82f
* grub-core/font/font.c (grub_font_load): Add support for default
...
path for fonts ($prefix/fonts).
* grub-core/kern/corecmd.c (grub_core_cmd_insmod): Unify condition
for checking if string is a path.
* grub-core/normal/main.c (features): Add feature_default_font_path.
* util/grub-mkconfig.in: Skip mangling of GRUB_FONT into GRUB_FONT_PATH.
* util/grub.d/00_header.in: Use default directory if possible.
* util/grub-install.in: Install unicode.pf2.
2012-02-24 11:18:06 +01:00
Vladimir 'phcoder' Serbinenko
b3e0862255
* po/README: Add de_CH and en@quot to po/LINGUAS generation command.
...
* po/Rules-swiss: New file.
* po/swiss.sed: Likewise.
2012-02-24 10:31:24 +01:00
Vladimir 'phcoder' Serbinenko
fe42ce0924
* grub-core/fs/btrfs.c (find_device): Fix typos.
...
* grub-core/fs/zfs/zfs.c (read_device): Likewise.
* util/grub-mkrelpath.c (argp_parser): Likewise.
Reported by: Yuri Chornoivan.
2012-02-23 22:27:25 +01:00
Dalet Omega
72f1d06552
* grub-core/gfxmenu/gui_label.c (label_set_property): Add template
...
for usual informative messages.
2012-02-23 17:30:19 +01:00
Dalet Omega
c588497385
Starfield theme.
...
* Makefile.am: Define starfield_DATA and dejavu.pf2 generation.
* conf/Makefile.common: Define starfielddir.
* configure.ac: Configure starfield.
* themes/starfield/COPYING.CC-BY-SA-3.0: New file.
* themes/starfield/README: Likewise.
* themes/starfield/blob_w.png: Likewise.
* themes/starfield/boot_menu_c.png: Likewise.
* themes/starfield/boot_menu_e.png: Likewise.
* themes/starfield/boot_menu_n.png: Likewise.
* themes/starfield/boot_menu_ne.png: Likewise.
* themes/starfield/boot_menu_nw.png: Likewise.
* themes/starfield/boot_menu_s.png: Likewise.
* themes/starfield/boot_menu_se.png: Likewise.
* themes/starfield/boot_menu_sw.png: Likewise.
* themes/starfield/boot_menu_w.png: Likewise.
* themes/starfield/slider_c.png: Likewise.
* themes/starfield/slider_n.png: Likewise.
* themes/starfield/slider_s.png: Likewise.
* themes/starfield/src/blob_nw.xcf: Likewise.
* themes/starfield/src/bootmenu/: Likewise.
* themes/starfield/src/bootmenu/center.xcf: Likewise.
* themes/starfield/src/bootmenu/corner.xcf: Likewise.
* themes/starfield/src/bootmenu/side.xcf: Likewise.
* themes/starfield/src/slider_c.xcf: Likewise.
* themes/starfield/src/slider_n.xcf: Likewise.
* themes/starfield/src/slider_s.xcf: Likewise.
* themes/starfield/src/terminalbox/: Likewise.
* themes/starfield/src/terminalbox/center.xcf: Likewise.
* themes/starfield/src/terminalbox/corner.xcf: Likewise.
* themes/starfield/src/terminalbox/side.xcf: Likewise.
* themes/starfield/starfield.png: Likewise.
* themes/starfield/terminal_box_c.png: Likewise.
* themes/starfield/terminal_box_e.png: Likewise.
* themes/starfield/terminal_box_n.png: Likewise.
* themes/starfield/terminal_box_ne.png: Likewise.
* themes/starfield/terminal_box_nw.png: Likewise.
* themes/starfield/terminal_box_s.png: Likewise.
* themes/starfield/terminal_box_se.png: Likewise.
* themes/starfield/terminal_box_sw.png: Likewise.
* themes/starfield/terminal_box_w.png: Likewise.
* themes/starfield/theme.txt: Likewise.
2012-02-23 17:21:38 +01:00
Vladimir 'phcoder' Serbinenko
17d7332536
* util/grub.d/00_header.in: Add missing export theme.
2012-02-23 06:26:00 +01:00
Vladimir 'phcoder' Serbinenko
dbebaf9291
* util/ieee1275/ofpath.c: Remove include of malloc.h since stdlib is
...
already included.
Reported by: Eren D.
2012-02-22 16:50:14 +01:00
Vladimir 'phcoder' Serbinenko
3d68bffbb7
* conf/Makefile.common (grubdatadir): Removed.
...
(Makefile.am): Move eveything grubdata to pkgdata.
2012-02-22 16:27:39 +01:00
Vladimir 'phcoder' Serbinenko
4b59234df8
* grub-core/commands/acpihalt.c (get_sleep_type):
...
Remove unused variable.
2012-02-22 16:25:35 +01:00
Vladimir 'phcoder' Serbinenko
463dcadca3
* include/grub/acpi.h (GRUB_ASCII_OPCODE): Add
...
GRUB_ACPI_OPCODE_STRING_CONST, GRUB_ACPI_OPCODE_BUFFER,
GRUB_ACPI_OPCODE_CREATE_WORD_FIELD
and GRUB_ACPI_OPCODE_CREATE_BYTE_FIELD.
* grub-core/commands/acpihalt.c [GRUB_DSDT_TEST]: Replace include of
i18n with gettext no-op.
(skip_data_ref_object): Support GRUB_ACPI_OPCODE_BUFFER and
GRUB_ACPI_OPCODE_STRING_CONST.
(get_sleep_type): Support GRUB_ACPI_OPCODE_CREATE_WORD_FIELD and
GRUB_ACPI_OPCODE_CREATE_BYTE_FIELD. Add handling of unknown opcodes.
2012-02-22 16:02:03 +01:00
Vladimir 'phcoder' Serbinenko
e5b90c82fe
* po/POTFILES.in: Regenerate.
2012-02-22 05:50:36 +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
84f9d341b0
* grub-core/fs/affs.c (grub_affs_read_block): Avoid <= in loop
...
condition to avoid possibly infinite loops.
* grub-core/lib/pbkdf2.c (grub_crypto_pbkdf2): Likewise.
* grub-core/lib/xzembed/xz_dec_bcj.c (bcj_powerpc): Likewise.
2012-02-22 05:22:39 +01:00
Vladimir 'phcoder' Serbinenko
d46683f97a
* grub-core/normal/charset.c (bidi_line_wrap): Avoid <= in loop
...
condition to avoid possibly infinite loops.
2012-02-22 05:19:11 +01:00
Vladimir 'phcoder' Serbinenko
c44866b2a6
* grub-core/kern/emu/hostdisk.c (read_device_map): Add missing noreturn
...
on show_error.
2012-02-22 05:16:26 +01:00
Vladimir 'phcoder' Serbinenko
9679053902
* grub-core/kern/disk.c (grub_disk_write): Add missing const qualifier.
2012-02-22 05:12:18 +01:00
Vladimir 'phcoder' Serbinenko
1ba7e295fb
* grub-core/kern/corecmd.c (grub_core_cmd_ls): Add missing var init.
2012-02-22 05:09:08 +01:00
Vladimir 'phcoder' Serbinenko
21ffe8f1dd
* util/bin2h.c (usage): Add missing attribute noreturn.
2012-02-22 05:06:58 +01:00
Vladimir 'phcoder' Serbinenko
0ccb6b3cf0
* grub-core/commands/testload.c (grub_cmd_testload): Fix overflow
...
if the size isn't divisible by 512.
2012-02-22 05:04:54 +01:00
Vladimir 'phcoder' Serbinenko
b00d7fb6c5
Make list_push and list_remove functions rather than inline functions
...
to decrease size and avoid aliasing violations.
* include/grub/list.h (grub_list_push): Move to ...
* grub-core/kern/list.c (grub_list_push): ... here. Don't inline.
* include/grub/list.h (grub_list_remove): Move to ...
* grub-core/kern/list.c (grub_list_remove): ... here. Don't inline.
2012-02-22 05:01:20 +01:00
Vladimir 'phcoder' Serbinenko
9d369087a9
* configure.ac: Disable for now -Wstack-protector, -Wunreachable-code
...
and -Wunused-result.
2012-02-22 04:56:45 +01:00
Vladimir 'phcoder' Serbinenko
af0250d919
* grub-core/net/net.c (grub_cmd_deladdr): Fix index.
...
Reported by: Seth Goldberg
2012-02-21 16:16:45 +01:00
Vladimir 'phcoder' Serbinenko
aad32b1402
* configure.ac: Add -fno-builtin-gettext on host if NLS is disabled.
2012-02-21 15:26:16 +01:00
Samuel Thibault
ac96441c81
2012-02-19 Samuel Thibault <samuel.thibault@ens-lyon.org>
...
* util/grub-mkconfig.in (GRUB_CMDLINE_GNUMACH): Export variable.
* util/grub.d/10_hurd.in: Include GRUB_CMDLINE_GNUMACH in gnumach
command line.
* docs/grub.texi (Simple configuration): Document
GRUB_CMDLINE_GNUMACH.
2012-02-19 17:06:00 +01:00
Vladimir 'phcoder' Serbinenko
80a7121355
* conf/Makefile.common (platform_SCRIPTS): New variable.
...
(platform_PROGRAMS): Likewise.
* gentpl.py: Mark *,module and *.image for install.
* grub-core/gdb_grub.in: Add a notice of expected environment.
* grub-core/Makefile.core.def (gdb_grub): Mark for install.
(gmodule.pl): Likewise.
2012-02-18 20:25:11 +01:00
Vladimir 'phcoder' Serbinenko
a8f16eab1a
Replace grub_checkkey with grub_getkey_noblock.
...
* grub-core/kern/term.c (grub_checkkey): Replaced with ...
(grub_getkey_noblock): ... this. All users updated.
2012-02-18 19:59:01 +01:00
Vladimir 'phcoder' Serbinenko
b500bcfeed
* grub-core/kern/emu/console.c: Move to ...
...
* grub-core/term/emu/console.c: ...here.
(grub_ncurses_getkey): Fix return value if no key is detected.
2012-02-18 19:51:43 +01:00
Vladimir 'phcoder' Serbinenko
e51b56667a
* include/grub/test.h (grub_unit_test_init): Add missing prototype.
...
(grub_unit_test_fini): Likewise.
* tests/lib/unit_test.c (main): Remove extra nested external prototype.
2012-02-12 22:04:55 +01:00
Vladimir 'phcoder' Serbinenko
d9a62292e3
* grub-core/script/execute.c (grub_script_break): Clarify logic.
...
Better error handling.
(grub_script_return): Likewise.
* grub-core/script/lexer.c (grub_script_lexer_yywrap): Likewise.
2012-02-12 21:33:48 +01:00
Vladimir 'phcoder' Serbinenko
77c9182fd2
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (__GNU_LIBRARY__): Avoid
...
rimplicit redifinition.
2012-02-12 19:34:08 +01:00
Vladimir 'phcoder' Serbinenko
edb13cf911
* docs/grub.texi (Internationalisation): Detail (lack of) collation in
...
GRUB.
2012-02-12 19:29:18 +01:00
Vladimir 'phcoder' Serbinenko
a9e9dc7c5e
* grub-core/normal/cmdline.c (grub_cmdline_get): Don't gettext prompt.
...
* grub-core/normal/main.c (grub_normal_read_line_real): Gettext
prompt here.
2012-02-12 19:24:23 +01:00
Vladimir 'phcoder' Serbinenko
b4ba8e025b
* grub-core/fs/zfs/zfs.c (zfs_fetch_nvlist): Mark unknown member here
...
as GRUB_ERR_BUG. Don't malloc if no device is available.
2012-02-12 19:19:57 +01:00
Vladimir 'phcoder' Serbinenko
dded554099
* grub-core/term/terminfo.c (grub_terminfo_output_unregister):
...
Mark calling with invalid term as GRUB_ERR_BUG.
2012-02-12 19:16:49 +01:00
Vladimir 'phcoder' Serbinenko
0cf69874ee
* grub-core/net/tftp.c (tftp_receive): Silently discard too short
...
packets rather than raising an error.
2012-02-12 19:11:06 +01:00
Vladimir 'phcoder' Serbinenko
59bfe502c9
* grub-core/loader/xnu.c (grub_xnu_writetree_toheap_real): Avoid set
...
in if.
2012-02-12 19:08:55 +01:00
Vladimir 'phcoder' Serbinenko
db5fc59616
* grub-core/loader/efi/appleloader.c (grub_cmd_appleloader): Move
...
diagnostic to dprintf.
* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
2012-02-12 19:03:14 +01:00
Vladimir 'phcoder' Serbinenko
e4b7f404d8
* grub-core/kern/corecmd.c (grub_core_cmd_ls): Handle error in parsing
...
device name.
2012-02-12 19:00:50 +01:00
Vladimir 'phcoder' Serbinenko
e7b02f9ec0
* grub-core/fs/ntfs.c (locate_attr): Avoid set in if.
...
(grub_ntfs_iterate_dir): Likewise.
2012-02-12 18:47:46 +01:00
Vladimir 'phcoder' Serbinenko
0331e102c9
Efiemu stylistic fixes and gettext.
...
* grub-core/efiemu/i386/loadcore32.c
(grub_arch_efiemu_relocate_symbols32): Avoid set in if.
* grub-core/efiemu/i386/loadcore64.c
(grub_arch_efiemu_relocate_symbols64): Likewise.
* grub-core/efiemu/i386/pc/cfgtables.c
(grub_machine_efiemu_init_tables): Likewise.
* grub-core/efiemu/loadcore.c (grub_efiemu_resolve_symbols): Likewise.
(grub_efiemu_loadcore_initXX): Add a filename argument.
All users updated.
Improved error message.
* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_init):
Add a filename argument.
All users updated.
* grub-core/efiemu/symbols.c (grub_efiemu_set_virtual_address_map):
Reclassify double relocation as GRUB_ERR_BUG.
2012-02-12 18:43:39 +01:00
Vladimir 'phcoder' Serbinenko
306fc0741f
* grub-core/commands/i386/pc/play.c (grub_cmd_play): Improve error
...
handling.
2012-02-12 17:38:13 +01:00
Vladimir 'phcoder' Serbinenko
794d8ef2af
* grub-core/commands/hdparm.c (grub_cmd_hdparm): Allow running
...
on partition.
2012-02-12 17:36:33 +01:00
Vladimir 'phcoder' Serbinenko
f991dd3c32
* include/grub/misc.h (grub_error_save): Fix cleaning grub_errno.
2012-02-12 17:21:09 +01:00
Vladimir 'phcoder' Serbinenko
d61386e21d
Improve string. Gettextize.
2012-02-12 15:25:25 +01:00
Vladimir 'phcoder' Serbinenko
78dde88e8c
* configure.ac: Remove -Winline altogether and -Wmissing-prototypes on
...
utils.
* util/import_gcry.py: Add -Wno-strict-aliasing on checked modules.
2012-02-11 12:21:21 +01:00
Vladimir 'phcoder' Serbinenko
4786a90fee
* grub-core/disk/diskfilter.c (grub_diskfilter_print_partmap)
...
[GRUB_UTIL]: New function.
(insert_array) [GRUB_UTIL]: Store partmaps.
* include/grub/diskfilter.h (grub_diskfilter_pv) [GRUB_UTIL]: New member
partmaps.
(grub_diskfilter_print_partmap) [GRUB_UTIL]: New proto.
* util/grub-probe.c (probe_partmap): Call grub_diskfilter_print_partmap.
(probe_abstraction): Print diskfilter and not raid.
Reported by: Lennart Sorensen
2012-02-11 11:57:47 +01:00
Vladimir 'phcoder' Serbinenko
0b6225bd27
* util/grub-mkimage.c (generate_image): Explicitly init decompress_size.
...
* util/grub-mkimagexx.c (MASK3): New define.
(add_value_to_slot_20b): Use MASK3.
(add_value_to_slot_21): Likewise.
(relocate_addresses): Fix format specification.
(load_image): Explicitly init symtab_section.
2012-02-11 11:50:10 +01:00
Vladimir 'phcoder' Serbinenko
b055f8f676
* util/getroot.c (grub_find_root_devices_from_mountinfo): Fix types.
...
(grub_util_biosdisk_get_grub_dev): Fix format specification.
2012-02-11 11:41:22 +01:00
Vladimir 'phcoder' Serbinenko
b77c2fb725
* grub-core/kern/emu/full.c (grub_arch_dl_get_tramp_got_size): Enable
...
on powerpc.
Reported by: Lennart Sorensen
2012-02-11 11:35:54 +01:00
Vladimir 'phcoder' Serbinenko
e3ec28abcf
* gentpl.py: Add missing license header.
...
* docs/grub.texi: Update copyright year.
2012-02-11 11:31:13 +01:00
Grégoire Sutre
c8d9ead677
Source grub-mkconfig_lib from the build directory at build time.
2012-02-10 18:16:27 +01:00
Vladimir 'phcoder' Serbinenko
ebcecdf1c3
Increase warning level.
...
* conf/Makefile.common (CFLAGS_GNULIB): Add -Wno-redundant-decls
-Wno-unreachable-code -Wno-conversion -Wno-old-style-definition.
* configure.ac (HOST_CFLAGS): Add bunch of -W arguments.
(TARGET_CFLAGS): Likewise.
(HOST_CFLAGS): Add -Werror unless --disable-werror is activated.
* grub-core/Makefile.core.def (decompressor_xz): Add
-Wno-unreachable-code.
(normal): Add -Wno-redundant-decls.
(xzio): Add -Wno-unreachable-code.
(lzopio): Add -Wno-redundant-decls -Wno-error.
* grub-core/commands/acpi.c: Add exception to -Wcast-align.
* grub-core/commands/lsacpi.c: Add exception to -Wcast-align.
* grub-core/gensymlist.sh: Add exception to -Wmissing-format-attribute.
* grub-core/kern/dl.c: Add exception to -Wcast-align.
* grub-core/kern/efi/efi.c (grub_efi_modules_addr): Likewise.
* grub-core/kern/i386/coreboot/init.c: Add exception to
-Wsuggest-attribute=noreturn.
* grub-core/kern/ia64/dl.c: Add exception to -Wcast-align.
* grub-core/kern/ia64/dl_helper.c: Likewise.
* grub-core/kern/mips/dl.c: Likewise.
* grub-core/kern/sparc64/dl.c: Likewise.
* grub-core/lib/LzmaEnc.c: Add exception to -Wshadow.
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (memcpy): Likewise.
(memcmp): Likewise.
* grub-core/lib/pbkdf2.c: Add exception to -Wunreachable-code.
* grub-core/loader/ia64/efi/linux.c: Add exception to -Wcast-align.
* grub-core/loader/mips/linux.c: Likewise.
* grub-core/loader/multiboot_elfxx.c: Likewise.
* grub-core/script/parser.y: Add exception to -Wunreachable-code.
* grub-core/video/sm712.c: Add exception to -Wcast-align.
* util/import_gcry.py: Add -Wno-cast-align to modules checked by hand.
* grub-core/font/font.c (grub_font_loader_init): Add explicit cast and
fixme.
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Likewise.
* grub-core/kern/i386/multiboot_mmap.c (grub_machine_mmap_init):
Fix prototype.
2012-02-10 16:48:48 +01:00
Vladimir 'phcoder' Serbinenko
37bb97fe9a
* grub-core/lib/i386/relocator16.S: Fix incorrect use of absolute
...
address.
2012-02-10 14:47:06 +01:00
Vladimir 'phcoder' Serbinenko
29a3550b61
* grub-core/commands/legacycfg.c (grub_cmd_legacy_kernel):
...
Avoid improper use of strings.
(grub_cmd_legacy_initrdnounzip): Likewise.
2012-02-10 14:30:19 +01:00
Vladimir 'phcoder' Serbinenko
dfdffd0d94
* include/grub/emu/misc.h (grub_util_warn): Add missing format
...
attribute.
(grub_util_info): Likewise.
(grub_util_error): Likewise.
2012-02-10 14:15:14 +01:00
Vladimir 'phcoder' Serbinenko
102fae4a1c
* util/grub-mount.c (fuse_init): Avoid improper use of strings.
...
* util/grub-fstest.c (fstest): Likewise.
2012-02-10 14:12:43 +01:00
Vladimir 'phcoder' Serbinenko
7e94d044ad
* grub-core/disk/geli.c (grub_md_sha256_real): Respect format security.
...
(grub_md_sha512_real): Likewise.
(grub_util_get_geli_uuid): Likewise.
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Likewise.
(grub_util_biosdisk_open): Fix format specification.
Respect format security.
* grub-core/kern/emu/misc.c (xmalloc): Respect format security.
(xrealloc): Likewise.
(xasprintf): Likewise.
2012-02-10 14:01:53 +01:00
Vladimir 'phcoder' Serbinenko
5ebd976935
* util/import_gcry.py: Include grub/crypto.h in init.c.
2012-02-10 13:58:53 +01:00
Vladimir 'phcoder' Serbinenko
495fc8c181
* util/grub-mkimage.c (compress_kernel_lzma): Respect format security.
...
(generate_image): Make prefix a const char *.
Fix format specifications. Respect format security.
Avoid void * arithmetics.
Avoid shadowing.
(argp_parser): Remove unused variable. Respect format security.
* util/grub-mkimagexx.c (relocate_symbols): Avoid shadowing.
(count_funcs) [!MKIMAGE_ELF64]: #if-out.
(count_funcs): Remove unused variable.
(relocate_addresses): Fix format specification.
Disable x86-64 with elf32. Remove unused variables.
(add_fixup_entry): Avoid shadowing.
(make_reloc_section): Fix format specification.
Use assert.
(locate_sections): Fix format specifications.
(load_image): Avoid shadowing.
2012-02-10 13:56:18 +01:00
Vladimir 'phcoder' Serbinenko
043c2ea33b
* util/grub-setup.c (setup): Remove unused variable. Avoid shadowing.
...
Fix format specifications. Respect format security.
Don't translate already translated grub_errmsg.
(argp_parser): Remove unused variable
2012-02-10 13:49:24 +01:00
Vladimir 'phcoder' Serbinenko
3ec65a8187
* util/grub-mkrelpath.c (argp_parser): Remove unused variable.
2012-02-10 13:47:04 +01:00
Vladimir 'phcoder' Serbinenko
a4d9fe4a95
* util/grub-mkpasswd-pbkdf2.c (argp_parser): Remove unused variable.
...
(main): Likewise. Use xmalloc. Respect format security.
2012-02-10 13:44:57 +01:00
Vladimir 'phcoder' Serbinenko
15b81d49bc
* util/grub-mklayout.c (console_grub_equivalence): Make "layout"
...
a const char *.
(argp_parser): Remove unused variable.
2012-02-10 13:42:00 +01:00
Vladimir 'phcoder' Serbinenko
31731fc04f
* util/grub-mkfont.c (grub_font_info): Make name a const char *.
...
(add_pixel): Make static.
(add_font): Likewise.
(write_string_section): Make name and str a const char *.
(write_be16_section): Make name a const char *.
(print_glyphs): Make static.
(write_font_ascii_bitmap): Likewise.
(write_font_width_spec): Likewise.
(write_font_pf2): Likewise.
(argp_parser): Remove unused variable.
Respect format security.
(main): Avoid shadowing. Respect format security.
2012-02-10 13:31:43 +01:00
Vladimir 'phcoder' Serbinenko
0809527b9d
* util/grub-editenv.c (argp_parser): Make static.
...
(create_envblk_file): Use xmalloc.
(open_envblk_file): Likewise.
Resepect format security.
(set_variables): Respect format security.
2012-02-10 13:26:19 +01:00
Vladimir 'phcoder' Serbinenko
45b0c8b797
* util/getroot.c (grub_find_device): Respect format security.
...
(get_mdadm_uuid): Remove unused variable.
(grub_util_pull_device): Dont call gettext on already translated
grub_errmsg.
(find_system_device): Remove unused variable.
(grub_util_get_grub_dev): Likewise.
(grub_make_system_path_relative_to_its_root): Respect format security.
2012-02-10 13:17:12 +01:00
Vladimir 'phcoder' Serbinenko
1b024b4ea0
* util/grub-fstest.c (execute_command): Make first argument
...
a const char *.
(read_file): Avoid shadowing.
Reuse underlying error message if device open fails.
(cmd_cmp): Respect format security.
(root): Make const char *.
(fstest): Remove args argument and use global copy.
Respect format security.
(argp_parser): Make static.
(main): Make default_root const char *.
2012-02-10 13:08:59 +01:00
Vladimir 'phcoder' Serbinenko
5d1d4e288f
* util/grub-mount.c (root): Make const char *.
...
(execute_command): Make first argument a const char *.
(fuse_init): Respect format security.
(argp_parser): Make static. Remove unused variable.
(main): Make default_root a const char *.
Respect format security.
2012-02-10 13:03:21 +01:00
Vladimir 'phcoder' Serbinenko
36eb7379b3
* util/grub-probe.c (probe): Don't call gettext on already translated
...
grub_errmsg.
Remove unused variables.
(argp_parser): Remove unused variable.
2012-02-10 12:57:00 +01:00
Vladimir 'phcoder' Serbinenko
76fb2ea93b
* util/grub-script-check.c (argp_parser): Remove unused variable.
...
(main): Rename read to curread to avoid shadowing.
2012-02-10 12:54:40 +01:00
Vladimir 'phcoder' Serbinenko
56c98584c7
* util/misc.c (grub_util_write_image_at): Fix format specification.
...
(grub_util_write_image): Likewise.
(grub_script_execute_argument_to_string): Removed (unused).
(grub_script_execute_menuentry): Likewise.
(grub_putchar): Likewise.
2012-02-10 12:52:46 +01:00
Vladimir 'phcoder' Serbinenko
164ebb480d
* include/grub/symbol.h (EXT_C) [GRUB_UTIL]: Removed.
...
(FUNCTION) [GRUB_UTIL]: Likewise.
(VARIABLE) [GRUB_UTIL]: Likewise.
2012-02-10 12:47:42 +01:00
Vladimir 'phcoder' Serbinenko
44318d6168
* include/grub/misc.h: Avoid evaluationg NEED_ENABLE_EXECUTE_STACK and
...
NEED_REGISTER_FRAME_INFO in GRUB_UTIL.
2012-02-10 12:45:32 +01:00
Vladimir 'phcoder' Serbinenko
31a2600267
* grub-core/partmap/bsdlabel.c (iterate_real): Fix freeing of static
...
buffer.
2012-02-10 12:43:11 +01:00
Vladimir 'phcoder' Serbinenko
6fa679671e
* grub-core/disk/ldm.c (grub_util_get_ldm): Remove unused variables.
...
(grub_util_ldm_embed): Likewise.
2012-02-10 12:36:02 +01:00
Vladimir 'phcoder' Serbinenko
9a7428e638
* util/grub-editenv.c (print_var): Rename name to varname to
...
avoid shadowing.
(main): Rename index to curindex to avoid shadowing.
MAke filename a const char *.
2012-02-10 12:28:34 +01:00
Vladimir 'phcoder' Serbinenko
4f96abd198
* grub-core/script/lexer.c (grub_script_lexer_init): Rename getline
...
to arg_getline to avoid shadowing.
2012-02-10 12:25:27 +01:00
Vladimir 'phcoder' Serbinenko
44d10dada6
* grub-core/partmap/gpt.c (gpt_partition_map_embed): Rename disk to
...
disk_ to avoid shadowing.
2012-02-10 12:24:03 +01:00
Vladimir 'phcoder' Serbinenko
340ba63ede
* grub-core/lib/LzFind.c (MatchFinder_GetIndexByte): Rename index to
...
curindex to avoid shadowing.
Make static.
(MatchFinder_GetNumAvailableBytes): Make static.
2012-02-10 12:21:28 +01:00
Vladimir 'phcoder' Serbinenko
22965bce9b
* grub-core/fs/squash4.c (direct_read): Rename read to curread to
...
avoid shadowing.
2012-02-10 12:17:40 +01:00
Vladimir 'phcoder' Serbinenko
7b5784d4d3
* grub-core/disk/cryptodisk.c (grub_cryptodisk_endecrypt): Rename
...
argument from encrypt to do_encrypt to avoid shadowing.
2012-02-10 12:11:50 +01:00
Vladimir 'phcoder' Serbinenko
6f48ca0143
* grub-core/loader/multiboot_elfxx.c (grub_multiboot_load_elf): Fix
...
incorrect nesting of #if's.
2012-02-09 23:53:27 +01:00
Vladimir 'phcoder' Serbinenko
a4ea2dff4b
* grub-core/commands/lsacpi.c (disp_acpi_xsdt_table): #if'-out the
...
checks which are always false on some platforms.
(grub_cmd_lsacpi): Likewise.
* grub-core/kern/misc.c (grub_strtoul): Likewise.
* grub-core/loader/multiboot.c (grub_multiboot_set_video_mode):
Likewise.
2012-02-09 23:48:34 +01:00
Vladimir 'phcoder' Serbinenko
def9fc1bb2
* grub-core/disk/diskfilter.c (read_segment): Renome unreachable code.
...
* grub-core/net/ip.c (grub_net_recv_ip4_packets): Likewise.
2012-02-09 23:43:43 +01:00
Vladimir 'phcoder' Serbinenko
a67b2a046c
* grub-core/gnulib/regex.h (re_pattern_buffer): Declare buffer as
...
re_dfa_t to avoid breaking alignment invariants.
* grub-core/gnulib/regex_internal.h (re_dfa_t): Moved to ...
* grub-core/gnulib/regex.h (re_dfa_t): ... here.
2012-02-09 23:40:17 +01:00
Vladimir 'phcoder' Serbinenko
44c6828db4
* grub-core/loader/i386/xnu.c (grub_xnu_boot): Fix printf.
...
* grub-core/loader/ia64/efi/linux.c (grub_cmd_fpswa): Likewise.
2012-02-09 23:32:03 +01:00
Vladimir 'phcoder' Serbinenko
bebe0dd022
* grub-core/kern/i386/qemu/mmap.c (grub_machine_mmap_init):
...
Fix declaration.
2012-02-09 23:25:14 +01:00
Vladimir 'phcoder' Serbinenko
a9cdb3cf18
* grub-core/bus/usb/ehci.c (grub_ehci_ehcc_read32): Restructure to
...
conserve alignment invariants.
(grub_ehci_ehcc_read16): Likewise.
(grub_ehci_oper_read32): Likewise.
(grub_ehci_oper_write32): Likewise.
(grub_ehci_pci_iter) [!GRUB_HAVE_UNALIGNED_ACCESS]: Check alignment.
Conserve alignment invariants.
2012-02-09 23:18:53 +01:00
Vladimir 'phcoder' Serbinenko
ccc3b1b898
* grub-core/kern/emu/full.c (grub_emu_post_init): Remove raid reinit.
...
* include/grub/disk.h [GRUB_MACHINE_EMU]: Remove now useless LVM/RAID
declarations.
2012-02-09 23:15:27 +01:00
Vladimir 'phcoder' Serbinenko
987fbd95d0
* grub-core/kern/emu/hostfs.c (grub_hostfs_close):
...
Remove unused variable.
2012-02-09 23:12:09 +01:00
Vladimir 'phcoder' Serbinenko
0df363f328
* grub-core/efiemu/loadcore_common.c (grub_efiemu_loadcore_load):
...
Remove set in if.
2012-02-09 22:57:51 +01:00
Vladimir 'phcoder' Serbinenko
b2c0c4a6c6
* include/grub/net.h: Remove double declarations.
2012-02-09 22:44:28 +01:00
Vladimir 'phcoder' Serbinenko
690c531fc5
Remove "payload" command in ia64 Linux loader since I couldn't
...
find any evidence of it being used for anything.
Replace "relocate" command with an environment variable
* grub-core/loader/ia64/efi/linux.c (ia64_boot_param): Remove extra
fields.
(ia64_boot_payload): Removed.
(last_payload): Likewise.
(RELOCATE_OFF): Likewise.
(RELOCATE_ON): Likewise.
(RELOCATE_FORCE): Likewise.
(relocate): Likewise.
(free_pages): Don't free payloads.
(grub_load_elf64): Use common error messages.
Use "linux_relocate" variable.
Increase the space after boot_params.
(grub_cmd_payload): Removed.
(grub_cmd_relocate): Likewise.
(grub_cmd_fpswa): Improve messages.
(cmd_payload): Removed.
(cmd_relocate): Likewise.
(GRUB_MOD_INIT): Don't register "payload" and "relocate".
(GRUB_MOD_FINI): Don't unregister "payload" and "relocate".
2012-02-09 15:09:40 +01:00
Vladimir 'phcoder' Serbinenko
01783768d2
Convert UHCI to DMA framework.
...
* grub-core/bus/usb/uhci.c (grub_uhci): Add chunk and phys members.
(grub_uhci_pci_iter): Fill new members
(grub_alloc_td): Use P2V and V2P functions.
(grub_free_queue): Likewise.
(grub_alloc_qh): Likewise.
(grub_uhci_setup_transfer): Likewise.
(grub_uhci_check_transfer): Likewise.
2012-02-09 15:00:05 +01:00
Vladimir 'phcoder' Serbinenko
432069398f
* grub-core/video/colors.c (grub_video_parse_color): Fix error message.
...
Remove assignment in if while on it.
2012-02-09 14:48:35 +01:00
Vladimir 'phcoder' Serbinenko
571e140e26
* util/grub-mkstandalone.in: Fix modules directory.
2012-02-09 14:45:56 +01:00
Vladimir 'phcoder' Serbinenko
a9d96eeb21
* util/grub-mkimage.c (image_targets): Set default_compression to lzma
...
on i386-pc target.
(argp_parser): Accept "auto" as compression specification.
2012-02-09 14:43:21 +01:00
Vladimir 'phcoder' Serbinenko
e4e37e8dfa
Fix `help' with unloaded modules.
...
* include/grub/normal.h (grub_dyncmd_get_cmd): New proto.
* grub-core/normal/dyncmd.c (grub_dyncmd_get_cmd): New function.
(grub_dyncmd_dispatcher): Small stylistic fix.
* grub-core/commands/help.c (grub_cmd_help): Load missing modules when
explicit help is requested.
2012-02-09 14:38:34 +01:00
Vladimir 'phcoder' Serbinenko
e1ea3ade95
* grub-core/fs/cpio.c (grub_cpio_dir): Fix a bug with multiple listing.
...
Explicitly init restart while on it.
2012-02-09 14:27:05 +01:00
Vladimir 'phcoder' Serbinenko
275568816c
* grub-core/lib/posix_wrap/wchar.h (mbrtowc): Set pwc to zero to avoid
...
uninited variable.
2012-02-09 14:24:55 +01:00
Vladimir 'phcoder' Serbinenko
d65f6b36de
* util/grub-mknetdir.in: Use . rather than source for POSIX
...
compatibility.
2012-02-08 20:27:46 +01:00
Vladimir 'phcoder' Serbinenko
0a1e473c9b
* util/grub-probe.c (main): Fix trailing space in compatibility hint.
2012-02-08 20:23:53 +01:00
Vladimir 'phcoder' Serbinenko
ce6647c83c
* grub-core/kern/partition.c (grub_partition_get_name): Fix uninited
...
variable.
2012-02-08 20:19:44 +01:00
Vladimir 'phcoder' Serbinenko
667478942a
* grub-core/commands/hdparm.c (grub_cmd_hdparm): Accept device name
...
without quotes.
2012-02-08 20:12:41 +01:00
Vladimir 'phcoder' Serbinenko
71645f6ec2
* grub-core/net/net.c (GRUB_MOD_INIT): Don't register netfs.
2012-02-08 20:10:17 +01:00
Vladimir 'phcoder' Serbinenko
0e1c1f61b6
* grub-core/kern/partition.c (grub_partition_get_name): Fix reverse
...
iteration of partitions.
2012-02-08 19:53:46 +01: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
215c90cb82
* grub-core/lib/i386/relocator16.S: Revert moving A20 code into PM
...
part. Instead setup the correct stack in RM.
* grub-core/lib/i386/relocator.c (grub_relocator16_boot): Reserve place
for stack.
* include/grub/i386/relocator_private.h: New file.
2012-02-07 22:31:14 +01:00
Vladimir 'phcoder' Serbinenko
b5c1f9bf41
* grub-core/commands/minicmd.c (GRUB_MOD_INIT): Add missing SIZE
...
argument.
* util/grub-fstest.c (options): Add missing DEVICE part.
2012-02-05 11:32:11 +01:00
Vladimir 'phcoder' Serbinenko
b525fd834d
Clarify and unify messages.
...
* grub-core/commands/hashsum.c (options): Unify messages.
* grub-core/commands/keystatus.c (GRUB_MOD_INIT): Don't mark a
literal-only message as translatable.
* grub-core/commands/lsacpi.c (GRUB_MOD_INIT): Likewise.
* grub-core/loader/ia64/efi/linux.c (GRUB_MOD_INIT): Likewise.
* grub-core/commands/legacycfg.c (GRUB_MOD_INIT): Add quoting around
commands.
* grub-core/commands/menuentry.c (options): Clarify that it's a keyboard
key, not the key used to unlock. Clarify what it's used for.
* grub-core/kern/emu/hostdisk.c (read_device_map): Unify error message.
* grub-core/loader/xnu.c (grub_xnu_load_driver): Remove erroneous colon.
* grub-core/script/main.c (GRUB_MOD_INIT): Clarify [n] to be [NUM].
* util/grub-editenv.c (options): Unify "verbose" message.
* util/grub-fstest.c (read_file): Unify error message.
(fstest): Add quotes around commands.
(options): Unify "verbose" message.
* util/grub-install.in: Add quotes around variable name.
* util/grub-kbdcomp.in: Unify error message.
* util/grub-mkfont.c (main): Likewise.
* util/grub-mkrescue.in: Likewise.
* util/grub-mklayout.c (options): Unify "verbose" message.
* util/grub-mkstandalone.in: Unify help and verbose messages.
* util/grub-mount.c (options): Unify "verbose" message.
* util/grub-probe.c (options): Likewise.
* util/grub-script-check.c (options): Likewise.
* util/grub-setup.c (setup): Unify no-terminator message.
(options): Use DEVICE and not DEV.
Unify "verbose" message.
* util/ieee1275/ofpath.c (xrealpath): Unify error message.
2012-02-05 11:23:47 +01:00
Vladimir 'phcoder' Serbinenko
0ae70393ba
Improve and unify messages.
...
* grub-core/kern/emu/hostdisk.c (grub_util_get_fd_sectors): Add argument
name. All users updated.
Print filename in error.
(read_device_map): Print filename in error.
* util/getroot.c (grub_guess_root_devices): Print filename in error.
(grub_util_get_os_disk): Likewise.
(grub_util_biosdisk_get_grub_dev): Likewise.
(grub_util_check_block_device): Likewise.
(grub_util_check_char_device): Likewise.
(grub_make_system_path_relative_to_its_root): Likewise.
* util/grub-editenv.c (create_envblk_file): Likewise.
(open_envblk_file): Likewise.
(write_envblk): Likewise.
* util/grub-fstest.c (cmd_cp): Likewise.
(cmd_cat): Likewise.
(cmd_cmp): Likewise.
* util/grub-menulst2cfg.c (main): Likewise.
* util/grub-mkfont.c (write_font_ascii_bitmap): Likewise.
(write_font_width_spec): Likewise.
(write_font_pf2): Likewise.
* util/grub-mkimage.c (generate_image): New argument outname.
All users updated.
Remove unreacheable message.
(options): Unify messages.
(help_filter): Likewise.
* util/grub-mklayout.c (usage): Removed (unused).
(main): Print filename in error.
* util/grub-mkrescue.in: Fix wrong quoting.
* util/grub-setup.c (setup): Print filename in error.
* util/ieee1275/ofpath.c (vendor_is_ATA): Likewise.
(check_sas): Likewise.
* util/misc.c (grub_util_get_fp_size): Removed.
(grub_util_get_image_size): Print filename in error.
(grub_util_read_at): Removed.
(grub_util_read_image): Print filename in error.
(grub_util_load_image): Likewise.
(grub_util_write_image_at): New argument filename. All users updated.
Print filename in error.
(grub_util_write_image): New argument filename. All users updated.
Print filename in error.
* util/raid.c (grub_util_raid_getmembers): Print filename in error.
* util/resolve.c (grub_util_resolve_dependencies): Likewise.
2012-02-05 11:07:33 +01:00
Vladimir 'phcoder' Serbinenko
0a96117de7
* grub-core/Makefile.core.def (pxechain): New module.
...
* grub-core/loader/i386/pc/pxechainloader.c: New file.
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_get_cached): New
function.
(grub_pc_net_config_real): Use grub_pxe_get_cached.
* include/grub/i386/pc/pxe.h (grub_pxe_get_cached): New proto.
2012-02-05 10:33:52 +01:00
Vladimir 'phcoder' Serbinenko
aca002f7e4
* grub-core/kern/err.c (GRUB_MAX_ERRMSG): Move to ...
...
* include/grub/err.h (GRUB_MAX_ERRMSG): ... here.
* include/grub/err.h (grub_error_saved): New struct.
(grub_errmsg): Make array size explicit.
* include/grub/misc.h (grub_error_save): New function.
(grub_error_load): Likewise.
* grub-core/kern/err.c (grub_error_stack_items): Use grub_error_saved.
(grub_error_push): Update `errno' member name.
(grub_error_pop): Likewise
* grub-core/net/tftp.c (tftp_data): New member save_err.
(tftp_receive): Save error.
(tftp_open): Restore error.
2012-02-05 10:24:53 +01:00
Vladimir 'phcoder' Serbinenko
a51dab1328
* grub-core/lib/i386/relocator16.S (grub_relocator16_start): Move switch
...
to real mode down to execute A20-related code in protected mode as
intended.
2012-02-05 10:12:18 +01:00
Grégoire Sutre
eb6e664936
* grub-core/disk/diskfilter.c (grub_diskfilter_make_raid): Return
...
NULL when the argument `level' has an unexpected value.
2012-02-05 01:22:04 +01:00
Vladimir 'phcoder' Serbinenko
92cd0f6e45
Move platform-dependent files from $prefix to $prefix/$platform.
...
* config.h.in (GRUB_TARGET_CPU): New definition.
(GRUB_PLATFORM): Likewise.
* configure.ac: Define GRUB_TARGET_CPU and GRUB_PLATFORM.
* grub-core/commands/parttool.c (grub_cmd_parttool): Update dir.
* grub-core/efiemu/main.c (grub_efiemu_autocore): Likewise.
* grub-core/kern/dl.c (grub_dl_load): Likewise.
* grub-core/normal/autofs.c (read_fs_list): Likewise.
* grub-core/normal/crypto.c (read_crypto_list): Likewise.
* grub-core/normal/dyncmd.c (read_command_list): Likewise.
* grub-core/normal/term.c (read_terminal_list): Likewise.
* grub-core/gettext/gettext.c (grub_mofile_open_lang): Use
$prefix/locale.
(grub_gettext_init_ext): Likewise.
* grub-core/normal/main.c (GRUB_MOD_INIT): Define grub_cpu and
grub_platform.
* util/grub-install.in: Update directories.
* util/grub-mknetdir.in: Likewise.
* util/grub-mkrescue.in: Likewise.
2012-02-04 21:47:29 +01:00
Vladimir 'phcoder' Serbinenko
db606889a9
* grub-core/kern/ieee1275/openfw.c (grub_claimmap): Change to
...
grub_error framework. All users updated.
2012-02-04 14:00:23 +01:00
Vladimir 'phcoder' Serbinenko
c39992a436
* grub-core/gettext/gettext.c: Mostly rewritten to avoid using
...
lists (by always binsearching), improve caching (cache strings
used for binsearch, not only results), improve
maintainability (by using more structured binary search) and correct
error handling.
2012-02-04 13:35:17 +01:00
Vladimir 'phcoder' Serbinenko
1e5ec32f2d
* grub-core/script/execute.c (grub_script_return): Fix warning.
2012-02-04 12:21:21 +01:00
Vladimir 'phcoder' Serbinenko
ac576cde1d
* grub-core/script/execute.c (grub_script_return): Fix potential
...
NULL-dereference.
Reported by: Jim Meyering.
2012-02-04 11:52:10 +01:00
Vladimir 'phcoder' Serbinenko
498453f661
* po/POTFILES.in: Regenerate.
...
* util/grub-install.in: Gettextize the strings missed in first pass.
2012-02-03 22:52:23 +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
4459819a52
* util/grub-reboot.in: Add missing datarootdir.
...
Add missing newline.
* util/grub-set-default.in: Add missing datarootdir.
* util/powerpc/ieee1275/grub-mkrescue.in: Add missing newline.
* util/grub-mkrescue.in: Likewise.
2012-02-03 21:30:05 +01:00
Vladimir 'phcoder' Serbinenko
f65741c7a4
* util/grub.d/30_os-prober.in: Fix TRANSLATORS comment.
2012-02-03 21:25:10 +01:00
Vladimir 'phcoder' Serbinenko
c1a33466d8
* util/grub-kbdcomp.in: Add decent help and gettextize.
...
* docs/man/grub-kbdcomp.h2m: New file.
2012-02-03 21:22:12 +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
57db0757f4
* util/grub-mkrescue.in: Use same message as
...
util/powerpc/ieee1275/grub-mkrescue.in with %s in place of command
for better translations.
2012-02-03 14:45:45 +01:00
Vladimir 'phcoder' Serbinenko
18534ad91e
* util/powerpc/ieee1275/grub-mkrescue.in: Gettextize. Unify the command
...
options with generic grub-mkrescue.in with the goal of future
merge.
2012-02-03 14:38:39 +01:00
Vladimir 'phcoder' Serbinenko
c84ba308b5
* grub-core/kern/mm.c: Add missing include of i18n.h
...
* grub-core/lib/relocator.c: Likewise.
2012-02-03 14:20:31 +01:00
Vladimir 'phcoder' Serbinenko
347998c27f
* grub-core/loader/ia64/efi/linux.c (find_mmap_size): Replace fatal with
...
error.
(allocate_pages): Check return value.
Replace fatal with error.
(grub_linux_boot): Replace printf with dprintf.
Check find_mmap_size return value.
Replace fatal with error.
Don't call grub_machine_fini.
(grub_load_elf64): Replace printf with dprintf.
(grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
(grub_cmd_payload): Likewise.
2012-02-03 13:53:12 +01:00
Vladimir 'phcoder' Serbinenko
c779226e6c
* grub-core/loader/i386/xnu.c (grub_cmd_devprop_load): Fix error
...
message.
* grub-core/video/radeon_fuloong2e.c
(grub_video_radeon_fuloong2e_setup): Likewise.
* grub-core/video/sis315pro.c (grub_video_sis315pro_setup): Likewise.
* grub-core/video/video.c (grub_video_set_mode): Don't override
standard out of memory message.
2012-02-03 12:47:07 +01:00
Grégoire Sutre
dc87d45a7a
NetBSD disk wedge support.
2012-02-03 12:32:21 +01:00
Mark Wooding
055f856f71
* util/grub-mkconfig.in: Use umask rather than chmod to create
...
grub.cfg.new to avoid insecure grub.cfg.
2012-02-03 12:15:53 +01:00
Vladimir 'phcoder' Serbinenko
4a9f8346c9
* grub-core/commands/ls.c: Gettextize.
...
* grub-core/commands/setpci.c: Likewise.
* grub-core/commands/videotest.c: Likewise.
* grub-core/disk/geli.c: Likewise.
* grub-core/kern/mm.c: Likewise.
* grub-core/lib/relocator.c: Likewise.
* grub-core/loader/efi/appleloader.c: Likewise.
* grub-core/loader/i386/xnu.c: Likewise.
* grub-core/loader/ia64/efi/linux.c: Likewise.
* grub-core/loader/xnu.c: Likewise.
* grub-core/net/dns.c: Likewise.
* grub-core/net/net.c: Likewise.
* grub-core/script/lexer.c: Likewise.
* grub-core/script/parser.y: Likewise.
* grub-core/script/yylex.l: Likewise.
* util/getroot.c: Likewise.
* util/grub-setup.c: Likewise.
2012-02-03 11:56:49 +01:00
Vladimir 'phcoder' Serbinenko
a646a366bb
* grub-core/fs/reiserfs.c (grub_reiserfs_get_item): Use proper error
...
number.
2012-02-03 11:50:18 +01:00
Vladimir 'phcoder' Serbinenko
54e2be2630
* grub-core/disk/ldm.c (grub_util_ldm_embed): Correct error message.
2012-02-03 11:48:42 +01:00
Vladimir 'phcoder' Serbinenko
f7c71e68b5
* grub-core/commands/search_file.c (SEARCH_TARGET): Remove obsolete
...
macro.
* grub-core/commands/search_label.c (SEARCH_TARGET): Likewise.
* grub-core/commands/search_uuid.c (SEARCH_TARGET): Likewise.
2012-02-03 11:46:18 +01:00
Vladimir 'phcoder' Serbinenko
a32d5c712d
* util/grub-mkstandalone.in: Fix help messages. Gettextize.
...
* util/grub-install.in: Gettextize.
* util/grub-mkconfig.in: Likewise.
* util/grub-mkconfig_lib.in: Replace gettext with echo -n and not echo
if not available.
(grub_warn): Gettextize.
* util/grub-mknetdir.in: Gettextize.
* util/grub-mkrescue.in: Likewise.
* util/grub-mkstandalone.in: Likewise.
* util/grub-reboot.in: Likewise.
* util/grub-set-default.in: Likewise.
* util/grub.d/00_header.in: Likewise.
* util/grub.d/10_hurd.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.
* po/POTFILES-shell.in: Regenerate.
2012-02-03 11:42:22 +01:00
Richard Laager
69edd81ab7
* util/grub-mkimage.c (main): Fix format-security warning.
...
* util/grub-mkrelpath.c (main): Likewise.
* util/grub-probe.c (main): Likewise.
2012-02-03 11:07:18 +01:00
Richard Laager
65f08dbfe0
* util/grub-probe.c (probe): Don't crash on canonicalize_file_name
...
failure.
Put back lost PRINT_DRIVE.
2012-02-03 11:02:06 +01:00
Richard Laager
e9084abefd
* util/getroot.c (find_root_devices_from_libzfs): Fix compilation error.
...
(grub_guess_root_devices): Replace strlen with sizeof.
Avoid crash.
(find_root_devices_from_poolname): Remove unused variable.
Handle raidzN.
2012-02-03 10:50:56 +01:00
Vladimir 'phcoder' Serbinenko
cf5f7ee788
Support install on multi-device filesystems.
...
* include/grub/emu/getroot.h (grub_guess_root_device): Renamed to ...
(grub_guess_root_devices): ...this. Return char **. All users updated.
* include/grub/emu/misc.h (grub_find_root_device_from_mountinfo):
Removed.
* util/getroot.c (find_root_device_from_libzfs): Moved pool logic to ...
(find_root_devices_from_poolname): ... here.
(grub_find_root_devices_from_mountinfo): Return char **. Make static.
Support zfs-fuse.
(grub_guess_root_device): Rename to ...
(grub_guess_root_devices): ... this. Return char **. All users updated.
* util/grub-install.in: Handle multi-device filesystems.
* util/grub-probe.c (probe). Make device_names a char **. Add delim
argument. All users updated.
Handle multi-device filesystems.
Use 'delim' as separator.
Remove device check to allow filesystems on file.
(main): Support -0 argument. Handle multi-device.
* util/grub-setup.c (setup): Remove root argument. Handle multi-device.
Fix a cross-device check while on it.
(arguments): Remove root_dev.
(argp_parser): Remove -r.
(main): Remove root_dev.
2012-02-03 10:35:28 +01:00
Vladimir 'phcoder' Serbinenko
2f53a9ed1f
* grub-core/fs/zfs/zfscrypt.c: Add link to documentation.
2012-02-01 18:30:51 +01:00
Vladimir 'phcoder' Serbinenko
17e1d934c7
* grub-core/commands/videotest.c (grub_cmd_videotest): Fix subset
...
symbol.
Reported by: NODA, Kai <nodakai>.
2012-02-01 17:47:47 +01:00
Vladimir 'phcoder' Serbinenko
d3e3fab52a
Fix ehci on amd64.
...
* grub-core/bus/usb/usbhub.c (grub_usb_hub_add_dev): Use %p to print
pointers.
* grub-core/bus/usb/ehci.c (grub_ehci_pci_iter): Likewise.
(grub_ehci_setup_qh): Likewise.
(grub_ehci_find_qh): Likewise.
(grub_ehci_transaction): Likewise.
(grub_ehci_setup_transfer): Likewise.
(grub_ehci_check_transfer): Likewise.
(grub_ehci_portstatus): Likewise.
(grub_ehci_detect_dev): Likewise.
(grub_ehci_transfer_controller_data): New field td_last_phys.
(grub_ehci_setup_transfer): Fill td_last_phys.
(grub_ehci_check_transfer): Use td_last_phys.
2012-02-01 16:13:17 +01:00
Seth Goldberg
3008675bea
* grub-core/normal/context.c (grub_env_extractor_close): Don't crash
...
if no submenu is present.
2012-02-01 15:35:30 +01:00
Aleš Nesrsta
fc9b5652f6
CBI support.
...
* include/grub/usb.h (grub_usbms_protocol_t): New values
GRUB_USBMS_PROTOCOL_CB and GRUB_USBMS_PROTOCOL_CBI.
* grub-core/disk/usbms.c (GRUB_USBMS_CBI_CMD_SIZE): New define.
(GRUB_USBMS_CBI_ADSC_REQ): Likewise.
(grub_usbms_dev): Add subclass, protocol and intrpt.
Remove in_maxsz and out_maxsz.
(grub_usbms_reset): Rename to ...
(grub_usbms_bo_reset): .. this.
(grub_usbms_cbi_cmd): New function.
(grub_usbms_cbi_reset): Likewise.
(grub_usbms_reset): Likewise.
(grub_usbms_attach): Recognize cbi. Same subclass and protocol.
(grub_usbms_transfer): Rename to ...
(grub_usbms_transfer_bo): ... this.
(grub_usbms_transfer_cbi): Likewise.
(grub_usbms_transfer): Likewise.
2012-02-01 15:19:10 +01:00
Aleš Nesrsta
a2b81d5399
EHCI support. All of the credit goes to Aleš Nesrsta. I've just added
...
the support for the CS5536 modification thereos and few bugfixes.
* grub-core/Makefile.core.def (ehci): New module.
* grub-core/bus/usb/ehci.c: New file.
* grub-core/bus/usb/usbhub.c (grub_usb_hub_add_dev): New arguments
port and hubaddr. All users updated.
Save port and hubaddr into dev structure.
* include/grub/cs5536.h (GRUB_CS5536_MSR_USB_BASE_SMI_ENABLE): New
define.
* include/grub/pci.h (grub_dma_phys2virt): New function.
(grub_dma_virt2phys): Likewise.
* include/grub/usb.h (grub_usb_device): New members port and hubaddr.
2012-02-01 14:18:43 +01:00
Vladimir 'phcoder' Serbinenko
b1d51f028b
* grub-core/fs/fat.c (grub_fat_mount) [!MODE_EXFAT]: Remove fstype
...
check as some mkfs implementations omit it.
2012-01-31 23:26:07 +01:00
Vladimir 'phcoder' Serbinenko
fc694106da
* docs/grub.texi (Unicode): Mention identifier and space limitations.
2012-01-31 22:59:32 +01:00
Vladimir 'phcoder' Serbinenko
6c0920e31b
* grub-core/fs/jfs.c (grub_jfs_sblock): Make volname a char array.
...
Add new member volname2.
(grub_jfs_label): Use volname2 if available.
2012-01-31 22:49:11 +01:00
Vladimir 'phcoder' Serbinenko
d1a46f9abd
* grub-core/fs/nilfs2.c (grub_nilfs2_super_block): Expand volume_name
...
over last_mounted as seen in image generated by mkfs.nilfs2.
(grub_nilfs2_label): Use sizeof for the size of s_volume_name.
2012-01-31 22:43:29 +01:00
Vladimir 'phcoder' Serbinenko
dec8ed14b9
* grub-core/fs/fat.c (grub_fat_dir_entry) [MODE_EXFAT]: Expand label
...
to 15 UTF-16 characters as seen in FS generated by mkexfatfs.
(grub_fat_label) [MODE_EXFAT]: Use macros for size.
2012-01-31 22:38:08 +01:00
Vladimir 'phcoder' Serbinenko
7397c69bb8
* grub-core/fs/romfs.c (grub_romfs_mount): Fix a bug with labels going
...
over the sector.
2012-01-31 22:25:07 +01:00
Vladimir 'phcoder' Serbinenko
b3fe42adb7
* grub-core/fs/zfs/zfs.c (get_filesystem_dnode): Support space in
...
subvolume name (by removing a bogus and useless check).
2012-01-31 22:20:37 +01:00
Vladimir 'phcoder' Serbinenko
10476bb0db
* grub-core/fs/ext2.c (grub_ext2_label): Fix field size. Change to
...
sizeof while on it.
2012-01-31 22:12:57 +01:00
Vladimir 'phcoder' Serbinenko
9c08ad8707
* grub-core/disk/scsi.c (grub_scsi_read_capacity): Renamed to ...
...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity16): New function.
(grub_scsi_open): Use read_capacity16 if read_capacity10 returned
0xffffffff.
Fix off-by-one error.
* include/grub/scsi.h (grub_scsi): Rename size to last_block and make it
64-bit unsigned.
* include/grub/scsicmd.h (grub_scsi_read_capacity): Rename to ...
(grub_scsi_read_capacity10): ... this.
(grub_scsi_read_capacity_data): Rename to ...
(grub_scsi_read_capacity10_data): ... this. Rename size to last_block.
(grub_scsi_read_capacity16): New struct.
(grub_scsi_read_capacity16_data): Likewise.
(grub_scsi_cmd_t): Rename grub_scsi_cmd_read_capacity to
grub_scsi_cmd_read_capacity10.
New command grub_scsi_cmd_read_capacity16.
2012-01-30 18:33:11 +01:00
Vladimir 'phcoder' Serbinenko
bc8d0f45a5
SCSI >2TiB support.
...
* grub-core/disk/scsi.c (grub_scsi_read16): New function.
(grub_scsi_write16): Likewise.
(grub_scsi_read): Use read16 when necessary.
(grub_scsi_write): Likewise.
* include/grub/scsicmd.h (grub_scsi_read16): New struct.
(grub_scsi_write16): Likewise.
(grub_scsi_cmd_t): Add READ16 and WRITE16.
2012-01-30 12:47:26 +01:00
Vladimir 'phcoder' Serbinenko
cc774926f1
SCSI write support (for usbms mainly).
...
* grub-core/disk/scsi.c (grub_scsi_write10): Uncomment. Make buffer
a const pointer.
(grub_scsi_write): Implement.
* include/grub/scsi.h (grub_scsi_dev): Make write buffer a const pointer
2012-01-30 12:26:11 +01:00
Vladimir 'phcoder' Serbinenko
67639fd75e
* grub-core/io/lzopio.c (uncompress_block): Fix use of incorrect
...
variable.
2012-01-30 01:18:02 +01:00
Vladimir 'phcoder' Serbinenko
9079d3ed4e
* grub-core/lib/posix_wrap/string.h (memchr): New function.
2012-01-29 23:58:42 +01:00
Vladimir 'phcoder' Serbinenko
c6a6f20445
* po/POTFILES.in: Regenerate.
2012-01-29 23:50:37 +01:00
Vladimir 'phcoder' Serbinenko
ecbf8cd1b7
* grub-core/lib/posix_wrap/assert.h (assert_real): Replace grub_fatal
...
with grub_printf to avoid unnecessary fatal failure.
2012-01-29 23:48:35 +01:00
Vladimir 'phcoder' Serbinenko
0b3b3b38bd
* grub-core/lib/posix_wrap/limits.h (SHRT_MAX): New define.
...
(INT_MAX): Likewise.
* grub-core/lib/posix_wrap/stdio.h (snprintf): New function.
* grub-core/lib/posix_wrap/stdlib.h (abs): Likewise.
* grub-core/lib/posix_wrap/string.h (memcmp): Likewise.
(strcpy): Likewise.
(strstr): Likewise.
(strchr): Likewise.
(strncpy): Likewise.
(strcat): Likewise.
(strncat): Likewise.
(strcoll): Likewise.
* include/grub/types.h (GRUB_SHRT_MAX): New define.
(GRUB_INT_MAX): Likewise.
2012-01-29 23:27:31 +01:00
Vladimir 'phcoder' Serbinenko
db7337a3d3
* grub-core/gnulib/regcomp.c (regerror): Don't use abort on
...
unexpected error.
(optimize_utf8): Likewise.
* grub-core/lib/posix_wrap/stdlib.h (abort): Removed.
2012-01-29 23:22:57 +01:00
Vladimir 'phcoder' Serbinenko
f37c87e1ba
* grub-core/boot/i386/pc/lnxboot.S: Use
...
GRUB_DECOMPRESSOR_MAX_DECOMPRESSOR_SIZE.
* grub-core/boot/i386/pc/startup_raw.S: Ensure about boot_dev
location.
* include/grub/offsets.h (GRUB_DECOMPRESSOR_I386_PC_BOOT_DEVICE): New
definition.
(GRUB_DECOMPRESSOR_I386_PC_MAX_DECOMPRESSOR_SIZE): Likewise.
2012-01-29 23:20:02 +01:00
Vladimir 'phcoder' Serbinenko
63fe43f3c3
* util/getroot.c (grub_util_get_dm_node_linear_info): Fix memory leak.
...
* grub-core/disk/cryptodisk.c (cryptodisk_cleanup): Disable for
now to avoid double free.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_dev): Rename to
hostdisk.
* include/grub/disk.h (grub_disk_dev_id): New id HOSTDISK.
* util/grub-probe.c (escape_of_path): Always return a new copy.
(print_full_name): Escape path.
(probe): Don't call grub_util_devname_to_ofpath on NULL.
Fix hints on abstractions.
2012-01-29 21:49:44 +01:00
Vladimir 'phcoder' Serbinenko
ebe2c96154
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device):
...
Don't add "root" line if no compatibility hont is available.
Suggested by: Seth Goldberg.
2012-01-29 20:52:37 +01:00
Vladimir 'phcoder' Serbinenko
2b5336a24a
* include/grub/ata.h (grub_ata): Add a new element maxbuffer.
...
* grub-core/disk/ata.c (grub_ata_readwrite): Limit to ata->maxbuffer.
* grub-core/disk/pata.c (grub_pata_open): Set ata->maxbuffer.
* grub-core/disk/ahci.c (grub_ahci_open): Likewise.
2012-01-29 19:00:30 +01:00
Vladimir 'phcoder' Serbinenko
74310bd8a7
* include/grub/zfs/dnode.h (DN_MIN_INDBLKSHIFT): Removed.
2012-01-29 18:56:44 +01:00
Vladimir 'phcoder' Serbinenko
c30582ba5d
* util/grub-pe2elf.c (ehdr): Make static.
...
(shdr): Likewise.
(num_sections): Likewise.
(offset): Likewise.
2012-01-29 18:53:38 +01:00
Vladimir 'phcoder' Serbinenko
5f47782c29
Eliminate ofpath limits and possible overflows.
...
* util/ieee1275/ofpath.c (grub_util_info) [STANDALONE]: New function.
(OF_PATH_MAX): Removed.
(MAX_DISK_CAT): New const.
(find_obppath): Use allocated rather than preallocated buffer.
Return result. Argument of_path removed. All users updated.
Add missing fdstat.
(xrealpath): New function.
(block_device_get_sysfs_path_and_link): Remove sysfs argument.
Allocate rather than use preallocated buffer. All users updated.
(__of_path_common): Use allocated rather than preallocatecd buffer.
Return result. Argument of_path removed. All users updated.
(vendor_is_ATA): Read only needed part form the file.
(check_sas): Allocate depending on contents rather than fixed.
(main) [STANDALONE]: Handle NULL result.
2012-01-29 18:51:21 +01:00
Vladimir 'phcoder' Serbinenko
f990cbf90e
* grub-core/normal/completion.c (iterate_dev): Close the disk.
2012-01-29 18:20:02 +01:00
Vladimir 'phcoder' Serbinenko
9c6e84b838
Cryptodisk write support.
...
* grub-core/disk/cryptodisk.c (grub_crypto_pcbc_encrypt): New function.
(grub_cryptodisk_decrypt): Moved logic to ...
(grub_cryptodisk_endecrypt): ...this. New argument "encrypt".
(grub_cryptodisk_write): Implement.
* grub-core/kern/emu/hostdisk.c (nwrite): Rename to ...
(grub_util_fd_write): ... this. Make global.
* include/grub/emu/hostdisk.h (grub_util_fd_write): New proto.
2012-01-29 18:16:48 +01:00
Vladimir 'phcoder' Serbinenko
87cf97447e
* include/grub/list.h (grub_list_remove): Don't crash if element is
...
removed twice.
2012-01-29 18:09:53 +01:00
Vladimir 'phcoder' Serbinenko
ca8c0baf25
Rename ofconsole to console.
...
* grub-core/commands/terminal.c (handle_command): Handle ofconsole
as sysnonym to console.
* grub-core/term/ieee1275/ofconsole.c: Renamed to ..
* grub-core/term/ieee1275/console.c: ... this. All users updated.
Rename grub_ofconsole_ to grub_console_. All users updated
(grub_console_term_output): Rename "ofconsole" to "console".
* grub-core/term/terminfo.c (grub_cmd_terminfo): Handle "ofconsole"
as "console".
2012-01-29 17:01:27 +01:00
Vladimir 'phcoder' Serbinenko
64c8b8f64c
* grub-core/loader/i386/pc/plan9.c (grub_cmd_plan9): Remove PXE
...
handling.
* include/grub/disk.h (grub_disk_dev_id): Remove obsolete
GRUB_DISK_DEVICE_UUID_ID, GRUB_DISK_DEVICE_PXE_ID and
GRUB_DISK_DEVICE_FILE_ID.
2012-01-29 16:34:39 +01:00
Vladimir 'phcoder' Serbinenko
f6c434d581
* grub-core/kern/partition.c (grub_partition_get_name): Simplify logic
...
and improve performance.
2012-01-29 16:24:07 +01:00
Vladimir 'phcoder' Serbinenko
5858b42d07
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname): Fix
...
missing ieee1275/ prefix on whole disk.
2012-01-29 16:22:23 +01:00
Vladimir 'phcoder' Serbinenko
4ed3c26b0d
* include/grub/powerpc/ieee1275/util/biosdisk.h: Remove.
...
* include/grub/powerpc/ieee1275/biosdisk.h: Likewise.
2012-01-29 16:20:41 +01:00
Vladimir 'phcoder' Serbinenko
df71143ea1
* grub-core/fs/cpio.c (handle_symlink): Fix a bug.
2012-01-29 15:36:06 +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
8a7f9b9c50
Simplify root device discover and don't fail when trying to open
...
incorrect devices.
* grub-core/disk/efi/efidisk.c (get_diskname_from_path_real): New
function.
(get_diskname_from_path): Likewise.
(grub_efidisk_get_device_name): Use get_diskname_from_path instead
of iterating.
2012-01-28 13:26:20 +01:00
Vladimir 'phcoder' Serbinenko
30545b8567
* grub-core/Makefile.core.def (setpci): Enable on all PCI platforms.
2012-01-27 13:52:48 +01:00
Vladimir 'phcoder' Serbinenko
28ea58cf69
* grub-core/fs/zfs/zfs.c (nvlist_find_value): Check that we don't go
...
pastthe end.
2012-01-27 13:50:21 +01:00
Vladimir 'phcoder' Serbinenko
692dabca8c
* util/grub-install.in: Add missing \.
...
Reported by: gentoofan
2012-01-27 13:12:00 +01:00
Vladimir 'phcoder' Serbinenko
f6e4ea709f
* grub-core/fs/squash4.c (xz_decompress): Fix return value.
...
(direct_read): Use correct compressed size.
(grub_squash_read_data): Likewise.
2012-01-27 13:09:57 +01:00
Vladimir 'phcoder' Serbinenko
ca1dacea3c
* docs/grub.texi (Platform limitations): New section.
...
(Platform-specific operations): Likewise.
* docs/grub-dev.texi (Porting): Likewise.
2012-01-26 19:40:47 +01:00
Vladimir 'phcoder' Serbinenko
7626111087
IEEE1275 disk write support.
...
* grub-core/kern/ieee1275/ieee1275.c (grub_ieee1275_write): Make buffer
const void *.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_write): Likewise.
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_read): Move open
and seek loginc to ...
(grub_ofdisk_prepare): ... here.
(grub_ofdisk_write): Implement.
2012-01-25 18:32:08 +01:00
Vladimir 'phcoder' Serbinenko
fc36d6038b
ARC disk write support.
...
* grub-core/disk/arc/arcdisk.c (handle_writable): New var.
(reopen): New argument writable. All users updated.
Handle required access mode.
(grub_arcdisk_write): Implement.
* include/grub/arc/arc.h (grub_arc_file_access): New enum.
(grub_arc_firmware_vector): Make buffer to write a const buffer.
2012-01-25 16:13:34 +01:00
Vladimir 'phcoder' Serbinenko
e06c2e7abc
* grub-core/fs/btrfs.c (grub_btrfs_device): New field size.
...
(read_sblock): Don't attempt to read superblocks outside the disk size.
2012-01-25 15:10:56 +01:00
Vladimir 'phcoder' Serbinenko
ff4479581d
* grub-core/fs/nilfs2.c (grub_nilfs2_load_sb): Use device size from
...
first superblock to find the second one when possible.
2012-01-25 15:09:00 +01:00
Vladimir 'phcoder' Serbinenko
9e88df393a
* util/grub-install.in: Fix an ARC bug.
...
Print a warning if no platform-specific setup is available.
2012-01-25 15:06:27 +01:00
Vladimir 'phcoder' Serbinenko
bb26e4ff16
Use static allocation rather than scratch pointer in reed_solomon.
...
It decreases its size significantly and avoids a variable in .text.
* grub-core/lib/reed_solomon.c (scratch): Removed.
(chosenstat): New const or static array.
(sigma): Likewise.
(errpot): Likewise.
(errpos): Likewise.
(sy): Likewise.
(mstat): Likewise.
(errvals): Likewise.
(eqstat): Likewise.
(pol_evaluate): Replace x with log_x argument. All users updated.
(syndroms): Removed.
(gauss_solve): Use statically allocated arrays.
(rs_recover): Likewise.
Calculate syndroms directly.
(decode_block): Use statically allocated arrays.
(grub_reed_solomon_add_redundancy) [TEST]: Fix -DTEST compilation.
(main) [TEST]: Allow -DTEST -DSTANDALONE.
2012-01-24 14:49:31 +01:00
Vladimir 'phcoder' Serbinenko
2e13ede59e
Eliminate fixed limit on reed solomon decoder length.
...
* grub-core/boot/i386/pc/lnxboot.S: Scan for multiboot signature
rather than hardcoding the address.
* grub-core/boot/i386/pc/startup_raw.S: Add new data field
no_reed_solomon_length.
Move gate_a20 to no-reed-solomon part.
Don't force a particular size of no reed-solomon part.
* include/grub/offsets.h (GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_PART):
Removed.
(GRUB_KERNEL_I386_PC_NO_REED_SOLOMON_LENGTH): New define.
* util/grub-setup.c (setup): Read no_rs_length from the image itself.
2012-01-24 14:39:29 +01:00
Vladimir 'phcoder' Serbinenko
f8a9ab1245
* grub-core/commands/wildcard.c (match_files): Handle filenames
...
without explicit device.
(wildcard_expand): Don't add explicit device if not already present.
* tests/grub_script_echo1.in: Add a new expansion test.
2012-01-24 13:34:36 +01:00
Vladimir 'phcoder' Serbinenko
87edb8940a
Replace single-linked with double-linked lists. It results in more
...
compact and more efficient code.
* grub-core/kern/list.c (grub_list_push): Moved from here ...
* include/grub/list.h (grub_list_push): ... to here. Set prev.
(grub_list_remove): Moved from here ...
* include/grub/list.h (grub_list_remove): ... here. Use and set prev.
(grub_prio_list_insert): Set prev.
* include/grub/list.h (grub_list): Add prev. All users updated.
2012-01-24 13:31:12 +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
Seth Goldberg
e555f379be
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Relax checks as
...
a workaround for intel problem.
2012-01-24 03:01:46 +01:00
Paulo de Rezende Pinatti
668327923f
* util/grub-install.in: Support dd'in into PreP partition.
...
* util/grub-probe.c (probe): Support discovering partition type.
(main): Support -t msdos_parttype.
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
Also-By: pfsmorigo <>
2012-01-23 19:33:40 +01:00
Vladimir 'phcoder' Serbinenko
7816a17ed1
* grub-core/normal/crypto.c (grub_crypto_autoload): Prevent
...
infinite recursion using counter.
* grub-core/lib/xzembed/xz_dec_stream.c (xz_dec_init): Defer s->crc32
init to skip it if the magic check fails.
(dec_stream_header): Init s->crc32.
2012-01-23 03:39:37 +01:00
Zachary Bedell
8f9d3a8c36
* grub-core/fs/zfs/zfs.c (uberblock_verify): New parameter size.
...
All users updated.
(find_bestub): Determine correct size.
(fill_vdev_info_real): Fill ashift. New argument. All users updated.
(scan_disk): Align the size down.
Call check pool before find_bestub to have ashift.
Note: real text was accidently commited 2 commits ago.
Also-By: Richard Laager <rlaager@wiktel.com>
Also-By: Vladimir Serbinenko <phcoder@gmail.com>
2012-01-23 03:37:06 +01:00
Vladimir 'phcoder' Serbinenko
b055dd326a
* grub-core/lib/relocator.c (malloc_in_range): Remove couple of
...
dprintf in no-malloc zone.
Note: actual code was already committed by mistake in last commit.
2012-01-23 03:31:17 +01:00
Mario Limonciello
d779e9bdac
* configure.ac: Add back in test for limits.h.
2012-01-22 16:43:14 +01:00
Vladimir 'phcoder' Serbinenko
b508af6989
Support 4K-sector NTFS.
...
* include/grub/ntfs.h (GRUB_NTFS_MAX_MFT): Increase to 8.
(grub_ntfs_data): Remove blocksize.
* grub-core/fs/ntfs.c (fixup): Fix size comparison.
Remove data argument. All users updated.
2012-01-20 15:01:35 +01:00
Vladimir 'phcoder' Serbinenko
dad9c8b59e
* grub-core/kern/mips/arc/init.c (grub_total_modules_size): Mark as
...
being in .text to avoid dprel references.
* include/grub/mips/loongson/kernel.h (grub_arch_machine): Likewise.
* include/grub/mips/loongson/memory.h (grub_arch_memsize): Likewise.
(grub_arch_highmemsize): Likewise.
* include/grub/mips/loongson/time.h (grub_arch_busclock): Likewise.
* include/grub/mips/qemu_mips/memory.h (grub_arch_memsize): Likewise.
* include/grub/mips/time.h (grub_arch_cpuclock): Likewise.
2012-01-20 14:48:26 +01:00
Vladimir 'phcoder' Serbinenko
d43a777e45
Support powerpc with GCC that defines __PPC__ but not __powerpc__.
...
* config.h.in (__powerpc__) [__PPC__ && !__powerpc__]: New definition.
* grub-core/lib/setjmp.S: Treat __PPC__ as equivalent to __powerpc__.
2012-01-18 14:04:52 +01:00
Vladimir 'phcoder' Serbinenko
34e4208ffe
* include/grub/datetime.h (grub_get_datetime_cmos): Don't define in
...
GRUB_UTIL.
(grub_set_datetime_cmos): Likewise.
2012-01-18 14:01:11 +01:00
Vladimir 'phcoder' Serbinenko
3ec0fc1c3b
Make XZ compression parameters dependent on target and not host CPU.
...
* configure.ac: Define GRUB_TARGET_CPU_XYZ series.
* grub-core/lib/xzembed/xz_config.h: Use GRUB_TARGET_CPU_XYZ.
2012-01-18 13:59:03 +01:00
Vladimir 'phcoder' Serbinenko
22489834b3
* grub-core/kern/powerpc/dl.c (grub_arch_dl_get_tramp_got_size): Remove
...
set but not used variable.
2012-01-18 13:54:59 +01:00
Vladimir 'phcoder' Serbinenko
8502fbca04
* grub-core/fs/reiserfs.c (grub_reiserfs_uuid): Reject 0-uuid as
...
created when no uuid support is compiled into mkfs.reiser.
2012-01-14 23:36:21 +01:00
Vladimir 'phcoder' Serbinenko
76df2068c4
* grub-core/fs/hfs.c (macroman_to_utf8): Convert / to :.
...
(utf8_to_macroman): Do the opposite.
* grub-core/fs/hfsplus.c (grub_hfsplus_iterate_dir): Convert / to :.
2012-01-14 23:34:33 +01:00
Vladimir 'phcoder' Serbinenko
64e3f8f6fe
* configure.ac: Refise build qemu_mips w/o unifont.
2012-01-14 23:32:18 +01:00
Vladimir 'phcoder' Serbinenko
9c2710789f
Eliminate grub_min/grub_max prone to overflow usage.
...
* grub-core/bus/usb/usbhub.c (grub_usb_add_hub): Eliminate grub_min.
(poll_nonroot_hub): Likewise.
* grub-core/fs/affs.c (grub_affs_iterate_dir): Likewise.
(grub_affs_label): Likewise.
* grub-core/fs/btrfs.c (grub_btrfs_lzo_decompress): Likewise.
* grub-core/fs/hfs.c (grub_hfs_dir): Likewise.
(grub_hfs_label): Likewise.
* grub-core/fs/hfsplus.c (grub_hfsplus_cmp_catkey): Likewise.
* grub-core/fs/zfs/zfs.c (MIN): Remove.
(zap_leaf_array_equal): Use grub_size. Remove MIN.
(zap_leaf_array_get): Likewise.
(dnode_get_path): Likewise.
* grub-core/io/lzopio.c (grub_lzopio_read): Eliminate grub_min.
* grub-core/io/xzio.c (grub_xzio_read): Likewise.
* grub-core/script/execute.c (grub_script_break): Likewise.
* grub-core/script/lexer.c (grub_script_lexer_record): Eliminate
grub_max.
* grub-core/script/yylex.l (grub_lexer_yyrealloc): Likewise.
* include/grub/misc.h (grub_min): Removed.
(grub_max): Likewise.
2012-01-14 15:44:34 +01:00
Vladimir 'phcoder' Serbinenko
80662dbc5d
* grub-core/fs/ext2.c (grub_ext2_iterate_dir): Ignore entries with
...
direct.inode = 0.
2012-01-14 11:55:20 +01:00
Vladimir 'phcoder' Serbinenko
e6da146746
* grub-core/lib/posix_wrap/wctype.h (CHARCLASS_NAME_MAX): New define.
2012-01-14 11:53:29 +01:00
Vladimir 'phcoder' Serbinenko
b1ac4cb1f9
* include/grub/datetime.h (grub_datetime2unixtime): Fix offset.
2012-01-14 11:51:52 +01:00
Vladimir 'phcoder' Serbinenko
b4bf7c3b20
* grub-core/lib/posix_wrap/stdlib.h (MB_CUR_MAX): Moved from here ...
...
* grub-core/lib/posix_wrap/wchar.h (MB_CUR_MAX): ... here. Value fixed.
2012-01-14 11:48:56 +01:00
Vladimir 'phcoder' Serbinenko
8ee1101a97
* grub-core/fs/fshelp.c (grub_fshelp_find_file): Use grub_strcasecmp
...
rather than a hack for grub_strncasemap.
2012-01-14 11:46:13 +01:00
Vladimir 'phcoder' Serbinenko
4d1e2bc9e3
* grub-core/disk/dmraid_nvidia.c (grub_dmraid_nv_detect): Skip
...
disks with unknown size.
* grub-core/disk/raid.c (scan_devices): Allow disks with unknown sizes.
2012-01-14 11:37:34 +01:00
Vladimir 'phcoder' Serbinenko
75b49ebed9
Remove defines pertaining to arbitrary limits not affecting GRUB
...
anymore.
* grub-core/fs/ext2.c (EXT2_PATH_MAX): Removed.
(EXT2_MAX_SYMLINKCNT): Likewise.
* grub-core/fs/nilfs2.c (NILFS_BTREE_LEVEL_MAX): Likewise.
* grub-core/net/tftp.c (TFTP_MAX_PACKET): Likewise.
* include/grub/i386/pc/pxe.h (GRUB_PXE_MIN_BLKSIZE): Likewise.
(GRUB_PXE_MAX_BLKSIZE): Likewise.
* include/grub/normal.h (GRUB_MAX_CMDLINE): Likewise.
* include/grub/zfs/dnode.h (DN_MAX_INDBLKSHIFT): Likewise.
(DN_MAX_OBJECT_SHIFT): Likewise.
(DN_MAX_OFFSET_SHIFT): Likewise.
(DN_MAX_OBJECT): Likewise.
(DNODES_PER_LEVEL_SHIFT): Likewise.
* include/grub/zfs/spa.h (SPA_MAXBLOCKSHIFT): Likewise.
(SPA_MAXBLOCKSIZE): Likewise.
(SPA_BLOCKSIZES): Likewise.
* include/grub/zfs/zap_impl.h (MZAP_MAX_BLKSHIFT): Likewise.
(MZAP_MAX_BLKSZ): Likewise.
2012-01-14 11:30:43 +01:00
Vladimir 'phcoder' Serbinenko
74a1dce71d
* grub-core/fs/zfs/zfs.c (grub_zfs_read): Remove useless alloc and
...
handle NULL appropriately.
Remove MIN.
2012-01-14 11:23:51 +01:00
Vladimir 'phcoder' Serbinenko
30c7d3ce34
Fix efiemu.
...
* grub-core/efiemu/runtime/efiemu.c: explicitly include right
cpu/types.h.
(efiemu_set_virtual_address_map): Remove UINT_TO_PTR.
* configure.ac: Fix efiemu check.
2012-01-13 15:12:28 +01:00
Vladimir 'phcoder' Serbinenko
3c76ea0c2c
* util/grub.d/30_os-prober.in: Fix occurence of grub-probe instead of
...
grub_probe.
Reported by: adamwill
2012-01-13 13:54:24 +01:00
Seth Goldberg
7e532280bd
* grub-core/lib/arg.c (grub_arg_parse): Fix NULL pointer dereference.
2012-01-12 22:20:29 +01:00
Vladimir 'phcoder' Serbinenko
3049237440
Fix handling of wide characters in gfxterm.
...
* grub-core/term/gfxterm.c (grub_colored_char): Remove width and index.
(clear_char): Likewise.
(paint_char): Skip code == NULL chars.
(grub_gfxterm_putchar): Set code = NULL on "shadowed" positions.
2012-01-12 22:16:07 +01:00
Vladimir 'phcoder' Serbinenko
e70cb72f73
* grub-core/normal/charset.c: Move comment to right place.
2012-01-12 22:13:20 +01:00
Vladimir 'phcoder' Serbinenko
5c827cf971
* grub-core/fs/affs.c (grub_affs_bblock): Revert flags.
...
(GRUB_AFFS_FLAG_FFS): Put back where it was.
(grub_affs_mount): Revert the correct version checking.
2012-01-11 12:53:38 +01:00
Vladimir 'phcoder' Serbinenko
53603892df
* docs/grub.texi (Unicode): Mention several other unsupported features.
2012-01-11 12:50:04 +01:00
Vladimir 'phcoder' Serbinenko
ff094b9b57
* grub-core/fs/squash4.c (squash_mount): Mark endian conversion in
...
case statements as compile-time one.
(direct_read): Prevent spurious warnings.
(grub_squash_read_data): Likewise.
2012-01-11 12:46:50 +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
7a45a539db
Don't override more informative errors.
...
* grub-core/commands/acpi.c (grub_cmd_acpi): Don't override errors.
* grub-core/font/font.c (open_section): Likewise.
* grub-core/loader/i386/bsd.c (grub_bsd_load_aout): New argument
filename. Don't override errors.
(grub_cmd_openbsd_ramdisk): Don't override errors.
* grub-core/loader/i386/linux.c (grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* grub-core/loader/i386/pc/linux.c (grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
* grub-core/loader/ia64/efi/linux.c (grub_load_elf64): Likewise.
(grub_cmd_linux): Likewise.
(grub_cmd_initrd): Likewise.
(grub_cmd_payload): Likewise.
* grub-core/loader/mips/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/multiboot.c (grub_cmd_multiboot): Likewise.
(grub_cmd_module): Likewise.
* grub-core/loader/powerpc/ieee1275/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/sparc64/ieee1275/linux.c (grub_cmd_initrd): Likewise.
* grub-core/loader/xnu.c (grub_xnu_load_driver): Likewise.
(grub_cmd_xnu_mkext): Likewise.
(grub_cmd_xnu_ramdisk): Likewise.
(grub_xnu_check_os_bundle_required): Likewise.
(grub_xnu_load_kext_from_dir): Likewise.
(grub_cmd_xnu_kextdir): Likewise.
* grub-core/loader/xnu_resume.c (grub_xnu_resume): Likewise.
2011-12-26 12:58:08 +01:00
Vladimir 'phcoder' Serbinenko
b2d004db18
* grub-core/fs/minix.c (grub_minix_mount) [MODE_MINIX3]: Treat 0xffff
...
as 1024 in block size field. Found on one of my test images.
Small optimisation while on it.
2011-12-25 22:44:42 +01:00
Vladimir 'phcoder' Serbinenko
ec000eaca9
* docs/grub.texi (Filesystems): Mention SFS as Latin1 filesystem.
...
* grub-core/fs/sfs.c (grub_sfs_mount): Fix a memory leak while on it.
(grub_sfs_iterate_dir): Convert Latin1 to UTF8. Stylistic and
performance fixes while on it.
(grub_sfs_close): Fix memory leak while on it.
(grub_sfs_label): Convert Latin1 to UTF-8.
2011-12-25 22:39:56 +01:00
Vladimir 'phcoder' Serbinenko
f50e11653e
* grub-core/fs/hfs.c (grub_hfs_dir): Cap keylen to actually available
...
space to avoid overflows.
(grub_hfs_label): Convert from macroman to UTF-8.
2011-12-25 22:23:05 +01:00
Vladimir 'phcoder' Serbinenko
2ae254de13
* grub-core/fs/affs.c (grub_affs_label): Interpret label as latin1.
2011-12-25 22:07:15 +01:00
Vladimir 'phcoder' Serbinenko
0108f49101
* grub-core/normal/menu.c (menu_init): Don't stop menu init at gfxterm.
2011-12-25 17:41:55 +01:00
Vladimir 'phcoder' Serbinenko
f45f5f89ff
* unicode: Import Unicode 6.0 data.
2011-12-25 16:17:25 +01:00
Vladimir 'phcoder' Serbinenko
63fa8ef94e
* grub-core/term/gfxterm.c (grub_gfxterm_putchar): Don't set values
...
outside of range.
2011-12-25 16:15:01 +01:00
Vladimir 'phcoder' Serbinenko
4d8c476536
Avoid cutting in the middle of UTF-8 string.
...
* include/grub/charset.h (grub_getend): New function.
* grub-core/script/function.c (grub_script_function_find): Use
grub_getend.
* grub-core/normal/completion.c (add_completion): Likewise.
2011-12-25 16:11:41 +01:00
Vladimir 'phcoder' Serbinenko
f3cb4a4e57
* grub-core/normal/charset.c (grub_ucs4_to_utf8): Small stylistic fix.
...
(grub_bidi_line_logical_to_visual): Skip tags. They are deprecated.
* include/grub/unicode.h (GRUB_UNICODE_TAG_START): New enum value.
(GRUB_UNICODE_TAG_END): Likewise.
(GRUB_UNICODE_LAST_VALID): Likewise.
2011-12-25 16:07:33 +01:00
Vladimir 'phcoder' Serbinenko
5da8dbc5bc
* include/grub/unicode.h (grub_unicode_compact_range): Replace end with
...
len and make it smaller. All users updated.
* util/import_unicode.py: Put length and not end character.
Check length.
2011-12-25 16:03:42 +01:00
Vladimir 'phcoder' Serbinenko
8569f13d8d
Make better Unicode-compliant and unify some UTF-8 code pathes.
...
* grub-core/normal/charset.c (grub_utf8_to_utf16): Don't eat possibly
valid character.
(grub_is_valid_utf8): Use grub_utf8_process.
Check resulting code range.
(grub_utf8_to_ucs4): Use grub_utf8_process.
* include/grub/charset.h (grub_utf16_to_utf8): Don't eat up a possibly
valid character.
2011-12-25 15:57:50 +01:00
Vladimir 'phcoder' Serbinenko
cc4fddf5f5
* grub-core/io/bufio.c (grub_bufio_read): Fix handling of corner cases.
2011-12-25 15:43:15 +01:00
Vladimir 'phcoder' Serbinenko
bbc47747ad
* docs/grub.texi (Filesystems): Mention AFS.
2011-12-25 15:40:43 +01:00
Vladimir 'phcoder' Serbinenko
f63d6bf4a1
* docs/grub.texi (Filesystems): Clarify restrictions.
...
(Regexp): Mention non-Unicode regexp behaviour.
(Other): Mention non-Unicode matching behaviour.
2011-12-25 14:46:44 +01:00
Vladimir 'phcoder' Serbinenko
74bbf0dbae
Make HFS implementation use MacRoman.
...
* grub-core/fs/hfs.c (MAX_UTF8_PER_MAC_ROMAN): New define.
(macroman): New const array.
(macroman_to_utf8): New function.
(utf8_to_macroman): Likewise.
(grub_hfs_find_dir): Use utf8_to_macroman.
(grub_hfs_dir): Use macroman_to_utf8.
Set case_insensitive.
2011-12-24 20:20:41 +01:00
Vladimir 'phcoder' Serbinenko
4ea0316e67
* docs/grub.texi (Filesystems): Add IEEE1275 full-path example.
2011-12-24 15:38:53 +01:00
Vladimir 'phcoder' Serbinenko
d3c13cbd62
Integrate hints into autogeneration scripts.
...
* docs/grub.texi (Filesystems): Add a hostdisk example.
* Makefile.util.def (grub-mkdevicemap): Remove ofpath.
(grub-probe): Add ofpath.
* gentpl.py: Remove group nosparc64.
* grub-core/commands/search.c (cache_entry): New struct.
(cache): New var.
(FUNC_NAME): Use and save cache. Fix handling of trailing comma.
* grub-core/commands/search_wrap.c (options): Add platform-specific
hint options.
(grub_cmd_search): Handle platform-specific hints.
(GRUB_MOD_INIT): Declare grub_cmd_search as accept_dash.
* grub-core/kern/emu/hostdisk.c (map): New field device_map.
(grub_util_biosdisk_data): Likewise.
(grub_util_biosdisk_open): Set device_map.
(read_device_map): Handle "" as indication of no map.
Set device_map.
(find_system_device): Add hostdisk/ prefix for autogenerated entries.
(grub_util_biosdisk_get_compatibility_hint): New function.
* grub-core/normal/main.c (features): Add feature_platform_search_hint.
* include/grub/emu/hostdisk.h
(grub_util_biosdisk_get_compatibility_hint): New proto.
* util/grub-install.in: Don't call grub-mkdevicemap.
Add platform-specific hint to load.cfg.
* util/grub-mkconfig.in: Don't call grub-mkdevicemap.
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Add
hints. Set root preliminary to compatibility hint, not to OS name.
* util/grub-probe.c (PRINT_*): Add hints.
(print): Make static.
(escape_of_path): New function.
(guess_bios_drive): Likewise.
(guess_efi_drive): Likewise.
(guess_baremetal_drive): Likewise.
(print_full_name): Likewise.
(probe): Handle hints.
(main): Likewise.
* util/ieee1275/devicemap.c: Removed.
* util/ieee1275/ofpath.c (find_obppath): Allow to fail. All users
updated.
(grub_util_devname_to_ofpath): Return NULL on failure.
* grub-core/kern/emu/hostdisk.c (grub_util_biosdisk_get_grub_dev): Fix
resource leak.
* util/getroot.c (grub_util_pull_device): Fix memory leak.
* po/POTFILES.in: Regenerated.
Allow purely long options
* grub-core/lib/arg.c (SHORT_ARG_HELP): Removed.
(SHORT_ARG_USAGE): Likewise.
(grub_arg_show_help): Compare opt with help_options.
(parse_option): Receive opt as argument. If makes big simplificatons.
All users updated
2011-12-24 15:09:26 +01:00
Vladimir 'phcoder' Serbinenko
00ce2df3d4
* grub-core/lib/libgcrypt_wrap/cipher_wrap.h (WORDS_BIGENDIAN):
...
Restructure to avoid warning.
2011-12-24 13:12:01 +01:00
Vladimir 'phcoder' Serbinenko
e77e325f6f
* util/grub-install.in: Account for possible escaped comma in device
...
name.
2011-12-24 02:50:30 +01:00
Vladimir 'phcoder' Serbinenko
165099ea42
* util/ieee1275/ofpath.c (of_path_of_ide): Fix address for secondary
...
channel.
2011-12-24 02:46:47 +01:00
Vladimir 'phcoder' Serbinenko
ce4a999d4d
* grub-core/kern/ieee1275/openfw.c (grub_devalias_iterate): Fix
...
allocation and zero-setting.
(grub_ieee1275_get_devname): Check that alias is complete.
2011-12-24 02:45:17 +01:00
Vladimir 'phcoder' Serbinenko
379586ad7d
* grub-core/kern/disk.c (grub_disk_read): Fix hook calling for
...
unaligned segments.
2011-12-24 02:43:21 +01:00
Vladimir 'phcoder' Serbinenko
9197b0ade5
* grub-core/disk/ieee1275/ofdisk.c (grub_ofdisk_iterate): Add ieee1275/
...
prefix.
(grub_ofdisk_open): Check and discard ieee1275 prefix.
* grub-core/kern/ieee1275/openfw.c (grub_ieee1275_encode_devname):
Add ieee1275 prefix.
2011-12-24 02:40:18 +01:00
Vladimir 'phcoder' Serbinenko
edddb7f9b2
* docs/grub.texi (Filesystems): Update.
2011-12-23 17:05:36 +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
58eba9eec7
Fix handling of tar numbers occupying the whole field.
...
* grub-core/fs/cpio.c (read_number): New function.
(grub_cpio_find_file): Use read_number instead of strtoull.
2011-12-23 14:11:31 +01:00
Vladimir 'phcoder' Serbinenko
a54a0e1270
* grub-core/fs/cpio.c (grub_cpio_find_file): Fix handling of names
...
occupying the whole field size.
2011-12-23 13:38:21 +01:00
Lukas Anzinger
a6120aca2e
* util/grub-mkconfig_lib.in (version_test_gt): Fix variable names.
2011-12-23 12:01:25 +01:00
Vladimir 'phcoder' Serbinenko
a93964ce11
* grub-core/net/net.c (grub_cmd_delroute): Add missing out condition.
2011-12-23 11:54:08 +01:00
Seth Goldberg
3ea1ca46c1
* grub-core/Makefile.core.def (lzma_decompress): Add missing
...
TARGET_IMG_LDFLAGS.
2011-12-23 11:39:30 +01:00
Vladimir 'phcoder' Serbinenko
b87f7ef26b
* util/getroot.c (ESCAPED_PATH_MAX): New define.
...
(mountinfo_entry): Increase the field size to take escaping into
account.
(find_root_device_from_libzfs): Add one byte to size of strings for
security.
2011-12-23 11:36:31 +01:00
Vladimir 'phcoder' Serbinenko
6209239517
missing ChangeLog
2011-12-23 10:24:08 +01:00
Vladimir 'phcoder' Serbinenko
1f0b1a7730
* grub-core/boot/i386/pc/startup_raw.S: Add missing argument for
...
_LzmaDecodeA.
2011-12-23 10:21:27 +01:00
Vladimir 'phcoder' Serbinenko
8eba9997db
* docs/grub.texi (Internationalisation): New section.
2011-12-22 20:55:55 +01:00
Vladimir 'phcoder' Serbinenko
dd0c91e98e
* docs/grub.texi (Loopback booting): New section.
2011-12-22 17:43:51 +01:00
Keshav P R
86717cbe08
* util/grub-mkstandalone.in: Fix minor typo errors.
2011-12-22 13:05:19 +01:00
Vladimir 'phcoder' Serbinenko
198e150aaf
IPv6, TCP, HTTP, ICMP and DNS support. Several cleanups and bugfixes.
...
* grub-core/Makefile.core.def (net): Add net/dns.c, net/tcp.c,
net/icmp.c and net/icmp6.c.
(http): New module.
(priority_queue): Likewise.
* grub-core/io/bufio.c: Rewritten.
* grub-core/lib/legacy_parse.c (legacy_command): New argument type
TYPE_WITH_CONFIGFILE_OPTION.
(legacy_commands): Add bootp and dhcp.
(is_option): Handle TYPE_WITH_CONFIGFILE_OPTION.
(grub_legacy_parse): Likewise.
* grub-core/lib/priority_queue.c: New file.
* grub-core/net/arp.c: Add missing license header.
(arp_find_entry): Removed.
(arp_find_entry): Likewise.
(grub_net_arp_resolve): Rename to ...
(grub_net_arp_send_request): ...this.
(grub_net_arp_receive): New card argument.
* grub-core/net/bootp.c (parse_dhcp_vendor): Clean up.
Set router and DNS server.
(grub_net_configure_by_dhcp_ack): Handle routing information.
(grub_cmd_bootp): Set checksum.
(grub_bootp_init): Remove net_dhcp.
* grub-core/net/dns.c: New file.
* grub-core/net/drivers/efi/efinet.c (send_card_buffer): Wait for
completion.
(get_card_packet): Handle allocation.
(grub_efinet_findcards): Set mtu.
* grub-core/net/drivers/emu/emunet.c: Add missing license header.
(get_card_packet): Handle allocation.
(emucard): Set mtu.
* grub-core/net/drivers/i386/pc/pxe.c (grub_pxe_recv): Handle allocation
(GRUB_MOD_INIT): Set mtu.
* grub-core/net/drivers/ieee1275/ofnet.c (grub_ofnetcard_data): Remove
mtu.
(get_card_packet): Handle allocation.
(grub_ofnet_findcards): Set mtu.
* grub-core/net/ethernet.c (send_ethernet_packet): Add compile time
assert.
(grub_net_recv_ethernet_packet): Handle IPv6.
* grub-core/net/http.c: New file.
* grub-core/net/icmp.c: Likewise.
* grub-core/net/icmp6.c: Likewise.
* grub-core/net/ip.c (ip6addr): New type.
(ip6hdr): Likewise.
(reassemble): Likewise.
(cmp): New function.
(reassembles): New variable.
(grub_net_ip_chksum): Handle 0xffff sum and unaligned buffers.
(id): New variable.
(send_fragmented): New function.
(grub_net_send_ip_packet): Rename to ...
(grub_net_send_ip4_packet): ... this. Send fragmented if needed.
Handle non-UDP.
(grub_net_recv_ip_packets): Rename to ...
(handle_dgram): ... this. Check checksum. Handle non-UDP.
(free_rsm): New function.
(free_old_fragments): Likewise.
(grub_net_recv_ip4_packets): New function.
(grub_net_send_ip6_packet): Likewise.
(grub_net_send_ip_packet): Likewise.
(grub_net_recv_ip6_packets): Likewise.
(grub_net_recv_ip_packets): Likewise.
* grub-core/net/net.c (grub_net_link_layer_entry): New struct.
(LINK_LAYER_CACHE_SIZE): New const.
(link_layer_find_entry): New function.
(grub_net_link_layer_add_address): Likewise.
(grub_net_link_layer_resolve_check): Likewise.
(grub_net_link_layer_resolve): Likewise.
(grub_net_ipv6_get_slaac): Likewise.
(grub_net_ipv6_get_link_local): Likewise.
(grub_cmd_ipv6_autoconf): Likewise.
(parse_ip): Handle one number representation.
(parse_ip6): New functoion.
(match_net): Handle IPv6.
(grub_net_resolve_address): Handle IPv6 and DNS.
(grub_net_resolve_net_address): Handle IPv6.
(route_cmp): New function.
(grub_net_route_address): Find best route.
(grub_net_addr_to_str): Handle IPv6.
(grub_net_addr_cmp): New function.
(grub_net_add_addr): Register local route.
(print_net_address): Handle net address.
(grub_net_poll_cards): Retransmit TCP.
(grub_net_poll_cards_idle_real): Likewise.
(have_ahead): New function.
(grub_net_seek_real): Use underlying seek.
(GRUB_MOD_INIT): Register net_ipv6_autoconf and init dns.
* grub-core/net/tcp.c: New file.
* grub-core/net/tftp.c (tftp_data): Add priority_queue.
(cmp): New function.
(ack): Likewise.
(tftp_receive): Handle unordered input.
(destroy_pq): New function.
(tftp_close): Close pq.
* grub-core/net/udp.c: Put missing license header.
(grub_net_udp_socket): New function.
(udp_socket_register): Likewise.
(grub_net_udp_close): Likewise.
(grub_net_recv_udp_packet): Check checksum.
* include/grub/efi/api.h (grub_efi_simple_network): Add status.
* include/grub/misc.h (grub_memchr): New function.
* include/grub/net.h (GRUB_NET_*_SIZE): New enum.
(grub_net_card_driver): Return buf in recv.
(grub_net_slaac_mac_list): New struct.
(grub_network_level_protocol_id): Add ipv6.
(grub_net_network_level_addr): Likewise.
(grub_net_network_level_net_addr): Likewise.
(grub_net_app_protocol): Add seek.
(grub_net_socket): Removed.
(grub_net_sockets): Likewise.
(grub_net_socket_register): Likewise.
(grub_net_socket_unregister): Likewise.
(FOR_NET_SOCKETS): Likewise.
(grub_net_add_addr): Add const.
(GRUB_NET_BOOTP_*): New enum.
(grub_net_addr_cmp): New proto.
(GRUB_NET_MAX_STR_ADDR_LEN): Take IPV6 into account.
(GRUB_NET_MAX_STR_HWADDR_LEN): New define.
(grub_net_hwaddr_to_str): NEw proto.
(FOR_NET_NETWORK_LEVEL_INTERFACES): New macro.
(FOR_NET_NETWORK_LEVEL_INTERFACES_SAFE): Handle NULL.
(grub_dns_init): New proto.
(grub_dns_fini): Likewise.
(grub_net_tcp_retransmit): Likewise.
(grub_net_link_layer_add_address): Likewise.
(grub_net_link_layer_resolve_check): Likewise.
(grub_net_link_layer_resolve): Likewise.
(grub_net_dns_lookup): Likewise.
(grub_net_add_dns_server): Likewise.
(grub_net_remove_dns_server): Likewise.
(GRUB_NET_TRIES): New const.
(GRUB_NET_INTERVAL): Likewise.
* include/grub/net/arp.h: Mostly rewritten.
* include/grub/net/ethernet.h (grub_net_ethertype_t): New enum.
* include/grub/net/ip.h: Mostly rewritten.
* include/grub/net/netbuff.h: Indent.
* include/grub/net/tcp.h: New file.
* include/grub/net/udp.h: Mostly rewritten.
* include/grub/priority_queue.h: New file.
* include/grub/types.h (PRIdGRUB_SSIZE): New define.
(grub_swap_bytes64_compile_time): Likewise.
(grub_cpu_to_be16_compile_time): Likewise.
(grub_cpu_to_be32_compile_time): Likewise.
(grub_cpu_to_be64_compile_time): Likewise.
(grub_be_to_cpu64_compile_time): Likewise.
2011-12-20 18:17:07 +01:00
Vladimir 'phcoder' Serbinenko
215c18008e
* grub-core/commands/i386/pc/drivemap.c (int13slot): Replace
...
UINT_TO_PTR with cast.
2011-12-16 17:46:28 +01:00