From d46d643f43aac930db7d1bfe85a296dd2f7ec609 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 12 Jun 2012 11:35:05 +0000 Subject: [PATCH] Provisory new -as mkisofs options -prep-boot-part, -efi-boot-part --- xorriso/base_obj.c | 2 ++ xorriso/emulators.c | 17 ++++++++++++++++- xorriso/write_run.c | 10 ++++++++++ xorriso/xorriso_private.h | 4 ++++ xorriso/xorriso_timestamp.h | 2 +- 5 files changed, 33 insertions(+), 2 deletions(-) diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index 8e3bf58b..b5b38641 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -256,6 +256,8 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->partition_offset= 0; m->partition_secs_per_head= 0; m->partition_heads_per_cyl= 0; + m->prep_partition[0]= 0; + m->efi_boot_partition[0]= 0; for(i= 0; i < Xorriso_max_appended_partitionS; i++) { m->appended_partitions[i]= NULL; m->appended_part_types[i]= 0; diff --git a/xorriso/emulators.c b/xorriso/emulators.c index 7255a3a1..7e392028 100644 --- a/xorriso/emulators.c +++ b/xorriso/emulators.c @@ -608,7 +608,7 @@ int Xorriso_genisofs_count_args(struct XorrisO *xorriso, int argc, char **argv, "--stdio_sync", "--quoted_path_list", "--efi-boot", "--embedded-boot", "-isohybrid-mbr", "-e", "-partition_offset", "-partition_hd_cyl", "-partition_sec_hd", "-partition_cyl_align", "-untranslated_name_len", - "-rr_reloc_dir", "-hfsplus-serial-no", + "-rr_reloc_dir", "-hfsplus-serial-no", "-prep-boot-part", "-efi-boot-part", "" }; static char arg2_options[][41]= { @@ -1794,7 +1794,22 @@ not_enough_args:; ret= Xorriso_option_jigdo(xorriso, argpt, argv[i], 0); if(ret <= 0) goto problem_handler_2; + + } else if(strcmp(argpt, "-prep-boot-part") == 0) { + if(i + 1 >= argc) + goto not_enough_args; + i++; + strcpy(xorriso->prep_partition, argv[i]); + + } else if(strcmp(argpt, "-efi-boot-part") == 0) { + if(i + 1 >= argc) + goto not_enough_args; + i++; + strcpy(xorriso->efi_boot_partition, argv[i]); + } else if(strcmp(argpt, "-append_partition") == 0) { + if(i + 3 >= argc) + goto not_enough_args; i+= 3; ret= Xorriso_option_append_partition(xorriso, argv[i - 2], argv[i - 1], argv[i], 0); diff --git a/xorriso/write_run.c b/xorriso/write_run.c index 5dc439c1..be3b5d4e 100644 --- a/xorriso/write_run.c +++ b/xorriso/write_run.c @@ -850,6 +850,16 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag) isoburn_igopt_set_scdbackup_tag(sopts, xorriso->scdbackup_tag_name, xorriso->scdbackup_tag_time, xorriso->scdbackup_tag_written); + if(xorriso->prep_partition[0]) { + ret= isoburn_igopt_set_prep_partition(sopts, xorriso->prep_partition, 0); + if(ret <= 0) + {ret= 0; goto ex;} + } + if(xorriso->efi_boot_partition[0]) { + ret= isoburn_igopt_set_efi_bootp(sopts, xorriso->efi_boot_partition, 0); + if(ret <= 0) + {ret= 0; goto ex;} + } for(i= 0; i < Xorriso_max_appended_partitionS; i++) { if(xorriso->appended_partitions[i] == NULL) continue; diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index 1f1c6adf..98bcfe31 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -393,6 +393,10 @@ struct XorrisO { /* the global context of xorriso */ /* 1 to 255, 0= disabled/default */ int partition_heads_per_cyl; + /* Disk file paths of content of PreP partition and EFI system partition */ + char prep_partition[SfileadrL]; + char efi_boot_partition[SfileadrL]; + /* Path and type of image files to be appended as MBR partitions */ char *appended_partitions[Xorriso_max_appended_partitionS]; uint8_t appended_part_types[Xorriso_max_appended_partitionS]; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 7e37de2b..3b774031 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2012.06.12.113220" +#define Xorriso_timestamP "2012.06.12.113552"