From d1855c8895d3c9b4c5fbca572dec8384bbb0c51b Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Sat, 10 Apr 2010 17:13:21 +0000 Subject: [PATCH] New -boot_image isolinux partition_table=on, -as mkisofs -isohybrid-mbr --- xorriso/xorriso.c | 28 +++++++++++++++++++--------- xorriso/xorriso_timestamp.h | 2 +- xorriso/xorrisoburn.c | 4 ++++ 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/xorriso/xorriso.c b/xorriso/xorriso.c index 909e1f91..00300f99 100644 --- a/xorriso/xorriso.c +++ b/xorriso/xorriso.c @@ -6997,9 +6997,10 @@ bin_path:; Text_shellsafe(xorriso->system_area_disk_path, sfe, 0)); if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); - is_default= ((xorriso->system_area_options & 1) == 0); - sprintf(line,"-boot_image grub partition_table=%s\n", - xorriso->system_area_options & 1 ? "on" : "off"); + is_default= ((xorriso->system_area_options & 3) == 0); + sprintf(line,"-boot_image %s partition_table=%s\n", + xorriso->system_area_options & 2 ? "isolinux" : "grub", + xorriso->system_area_options & 3 ? "on" : "off"); if(!(is_default && no_defaults)) Xorriso_status_result(xorriso,filter,fp,flag&2); @@ -11603,15 +11604,18 @@ not_enough_args:; /* was already handled in first argument scan */; } else if(strcmp(argv[i], "--embedded-boot")==0 || strcmp(argv[i], "-generic-boot")==0 || - strcmp(argv[i], "-G") == 0) { + strcmp(argv[i], "-G") == 0 || + strcmp(argv[i], "-isohybrid-mbr")==0) { if(i+1>=argc) goto not_enough_args; i++; ret= Xorriso_set_system_area_path(xorriso, argv[i], 0); if(ret <= 0) goto ex; + if(strcmp(argv[i - 1], "-isohybrid-mbr")==0) + xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2; } else if(strcmp(argv[i], "--protective-msdos-label")==0) { - xorriso->system_area_options|= 1; + xorriso->system_area_options= (xorriso->system_area_options & ~3) | 1; } else if(strncmp(argv[i], "--modification-date=", 20)==0) { ret= Xorriso_option_volume_date(xorriso, "uuid", argv[i] + 20, 0); if(ret <= 0) @@ -13858,13 +13862,19 @@ int Xorriso_option_boot_image(struct XorrisO *xorriso, char *form, ret= Xorriso_set_system_area_path(xorriso, treatpt + 12, 0); if(ret <= 0) return(ret); + if(strcmp(formpt, "isolinux")==0) + xorriso->system_area_options= (xorriso->system_area_options & ~3) | 2; } else if(strncmp(treatpt, "partition_table=", 16)==0) { if(strcmp(treatpt + 16, "off") == 0) - xorriso->system_area_options&= ~1; - else if(strcmp(treatpt + 16, "on") == 0) - xorriso->system_area_options|= 1; - else + xorriso->system_area_options&= ~3; + else if(strcmp(treatpt + 16, "on") == 0) { + xorriso->system_area_options&= ~3; + if(strcmp(formpt, "isolinux")==0) + xorriso->system_area_options|= 2; + else + xorriso->system_area_options|= 1; + } else was_ok= 0; } else if(strncmp(treatpt, "isohybrid=", 10) == 0 && diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 75fbf554..0a315633 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2010.04.10.170927" +#define Xorriso_timestamP "2010.04.10.171214" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index c30b4e1e..28e801ad 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -1718,6 +1718,10 @@ int Xorriso_set_system_area(struct XorrisO *xorriso, bufpt= buf; do_set:; + sprintf(xorriso->info_text, "Copying to System Area: %d bytes from file ", + ret); + Text_shellsafe(xorriso->system_area_disk_path, xorriso->info_text, 1); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "NOTE", 0); ret= isoburn_igopt_set_system_area(sopts, bufpt, xorriso->system_area_options); if(ret != ISO_SUCCESS) {