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
Vladimir 'phcoder' Serbinenko
d68538e928
merge mainline into cbi
2012-02-01 14:30:40 +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
08491b6a5a
Fix type errors. Don't stop after first EHCI controller is found.
2012-02-01 14:08:58 +01:00
Vladimir 'phcoder' Serbinenko
cefa01261b
merge mainline into ehci
2012-02-01 13:19:42 +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