* util/mkisofs/msdos_partition.h: New file (based on
include/grub/msdos_partition.h).
* util/mkisofs/mkisofs.c (use_protective_msdos_label): New variable.
(OPTION_PROTECTIVE_MSDOS_LABEL): New macro.
(ld_options, main): Recognize --protective-msdos-label.
* util/mkisofs/mkisofs.h (use_protective_msdos_label): New declaration.
* util/mkisofs/write.c: Include `"msdos_partition.h"'.
(padblock_write): If `use_protective_msdos_label' is set, patch a
protective DOS-style label in the output image.
* util/grub-mkrescue.in: Use --protective-msdos-label.
* util/mkisofs/mkisofs.c (use_embedded_boot, boot_image_embed): New
variables.
(ld_options, main): Recognize `--embedded-boot'.
* util/mkisofs/mkisofs.h (use_embedded_boot, boot_image_embed): New
declarations.
* util/mkisofs/write.c (PADBLOCK_SIZE): New variable.
(padblock_size): Use `PADBLOCK_SIZE' instead of hardcoding 16.
(padblock_write): Likewise. Rewrite to support embedded boot image.
* util/grub-mkrescue.in: When building i386-pc images, embed core.img
for BIOS-based disk boot instead of only ElTorito.
* util/mkisofs/mkisofs.c (ld_options): Mark all `arg' strings as
translatable.
(usage): Translate `arg' strings using gettext().
Thanks to Jordi Mallach for the suggestion.
* Makefile.in ($(srcdir)/po/$(PACKAGE).pot): Pass --keyword=N_ to
`$(XGETTEXT)'.
* include/grub/i18n.h (N_): New macro.
* util/mkisofs/mkisofs.h: Likewise.
* util/mkisofs/mkisofs.c (ld_options): Wrap all translatable strings
around N_().
(usage): Use gettext() to translate help strings when printing them.
Fix build for systems without error().
* gnulib/error.c: New file (imported from Gnulib).
* gnulib/error.h: Likewise.
* conf/common.rmk (grub_mkisofs_SOURCES): Add `gnulib/error.c'.
* util/mkisofs/mkisofs.c (program_name): Remove `static' qualifier
(this variable is now used by error()).
Support for El Torito without floppy emulation.
* util/mkisofs/eltorito.c: Include `<errno.h>'.
(init_boot_catalog): Improve error handling.
(get_torito_desc): Don't use floppy emulation unless requested by
user. Patch boot information table when requested via
`-boot-info-table'.
* util/mkisofs/iso9660.h (struct eltorito_boot_info): New struct.
* util/mkisofs/mkisofs.c (use_eltorito_emul_floppy)
(use_boot_info_table): New variables.
(OPTION_BOOT_INFO_TABLE, OPTION_NO_EMUL_BOOT)
(OPTION_ELTORITO_EMUL_FLOPPY): New macros.
(ld_options): Handle `-boot-info-table', `-no-emul-boot' and
`--eltorito-emul-floppy'.
(main): Handle `OPTION_BOOT_INFO_TABLE', `OPTION_NO_EMUL_BOOT'
and `OPTION_ELTORITO_EMUL_FLOPPY'.
* util/mkisofs/mkisofs.h (use_eltorito_emul_floppy)
(use_boot_info_table, get_731): New prototypes.
* util/mkisofs/write.c (get_731): New function.
Large file support for grub-mkisofs.
* conf/common.rmk (grub_mkisofs_CFLAGS): Add `-D_FILE_OFFSET_BITS=64'.
* util/mkisofs/mkisofs.c (next_extent, last_extent)
(session_start): Upgrade type to `uint64_t'. Update all users.
* util/mkisofs/mkisofs.h: Include `<stdint.h>'.
(struct directory_entry): Upgrade type of `starting_block' and
`size' to `uint64_t'. Update all users.
(struct deferred): Remove unused structure.
(xfwrite): Upgrade type of `count' and `size' to `uint64_t'.
Update all users.
* util/mkisofs/tree.c (stat_filter, lstat_filter): Return -1 when
file is larger than `UINT32_MAX'.
* util/mkisofs/write.c (xfwrite): Upgrade type of `count' and
`size' to `uint64_t'. Update all users. Fix handling of fwrite()
return value.
(struct deferred_write): Upgrade type of `extent' and `size' to
`uint64_t'. Update all users.
(last_extent_written): Upgrade type to `uint64_t'. Update all
users.
(write_one_file): Upgrade type of `count' and `size' to `uint64_t'.
Update all users. Upgrade type of `remain' to `int64_t' and
`use' to `size_t'. Use error() to handle fread() errors.
(write_files): Rely on write_one_file() rather than calling
xfwrite() directly.