2009-12-21 Robert Millan <rmh.grub@aybabtu.com>

* 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.
This commit is contained in:
Robert Millan 2009-12-21 20:22:12 +00:00
parent e930981361
commit 9b214e3a53
6 changed files with 129 additions and 6 deletions

View file

@ -91,6 +91,7 @@ int extension_record_size = 0;
int use_eltorito = 0;
int use_eltorito_emul_floppy = 0;
int use_embedded_boot = 0;
int use_protective_msdos_label = 0;
int use_boot_info_table = 0;
int use_RockRidge = 0;
int use_Joliet = 0;
@ -199,6 +200,8 @@ struct ld_option
#define OPTION_VERSION 173
#define OPTION_PROTECTIVE_MSDOS_LABEL 174
static const struct ld_option ld_options[] =
{
{ {"all-files", no_argument, NULL, 'a'},
@ -213,6 +216,8 @@ static const struct ld_option ld_options[] =
'\0', N_("FILE"), N_("Set Copyright filename"), ONE_DASH },
{ {"embedded-boot", required_argument, NULL, 'G'},
'G', N_("FILE"), N_("Set embedded boot image name"), TWO_DASHES },
{ {"protective-msdos-label", no_argument, NULL, OPTION_PROTECTIVE_MSDOS_LABEL },
'\0', NULL, N_("Patch a protective DOS-style label in the image"), TWO_DASHES },
{ {"eltorito-boot", required_argument, NULL, 'b'},
'b', N_("FILE"), N_("Set El Torito boot image name"), ONE_DASH },
{ {"eltorito-catalog", required_argument, NULL, 'c'},
@ -726,11 +731,14 @@ int FDECL2(main, int, argc, char **, argv){
error (1, 0, _("Required boot image pathname missing"));
break;
case 'G':
use_embedded_boot++;
use_embedded_boot = 1;
boot_image_embed = optarg; /* pathname of the boot image on host filesystem */
if (boot_image_embed == NULL)
error (1, 0, _("Required boot image pathname missing"));
break;
case OPTION_PROTECTIVE_MSDOS_LABEL:
use_protective_msdos_label = 1;
break;
case 'c':
use_eltorito++;
boot_catalog = optarg; /* pathname of the boot image on cd */