diff --git a/xorriso/xorriso.c b/xorriso/xorriso.c index 115488d4..2d2bd65f 100644 --- a/xorriso/xorriso.c +++ b/xorriso/xorriso.c @@ -71,18 +71,6 @@ or */ -#define PROG_VERSION "0.0.1" - -/** The source code release timestamp */ -#include "xorriso_timestamp.h" -#ifndef Xorriso_timestamP -#define Xorriso_timestamP "-none-given-" -#endif - -/** The binary build timestamp is to be set externally by the compiler */ -#ifndef Xorriso_build_timestamP -#define Xorriso_build_timestamP "-none-given-" -#endif #include #include @@ -8401,12 +8389,13 @@ int Xorriso_option_use_readline(struct XorrisO *xorriso, char *mode, int flag) int Xorriso_option_version(struct XorrisO *xorriso, int flag) { sprintf(xorriso->result_line, - "xorriso %s : RockRidge filesystem manipulator\n", PROG_VERSION); + "xorriso %s : RockRidge filesystem manipulator\n", + Xorriso_program_versioN); sprintf(xorriso->result_line+strlen(xorriso->result_line), "Copyright (C) 2008, Thomas Schmitt , libburnia project\n"); Xorriso_result(xorriso, 0); sprintf(xorriso->result_line, - "xorriso version : %s\n", PROG_VERSION); + "xorriso version : %s\n", Xorriso_program_versioN); sprintf(xorriso->result_line+strlen(xorriso->result_line), "Version timestamp : %s\n",Xorriso_timestamP); sprintf(xorriso->result_line+strlen(xorriso->result_line), @@ -9194,7 +9183,7 @@ int Xorriso_main(int argc, char **argv) if(argc<2) { fprintf(stderr, "xorriso %s : RockRidge filesystem manipulator, libburnia project.\n\n", - PROG_VERSION); + Xorriso_program_versioN); fprintf(stderr,"usage : %s [options]\n", argv[0]); fprintf(stderr," More is told by option -help\n"); @@ -9217,7 +9206,7 @@ int Xorriso_main(int argc, char **argv) fprintf(stderr, "xorriso %s : RockRidge filesystem manipulator, libburnia project.\n\n", - PROG_VERSION); + Xorriso_program_versioN); ret= Xorriso_startup_libraries(xorriso, 0); if(ret<=0) exit(4); diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index 1ea10de1..44cea47b 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -18,6 +18,19 @@ #ifndef Xorriso_private_includeD #define Xorriso_private_includeD yes +#define Xorriso_program_versioN "0.0.1" + +/** The source code release timestamp */ +#include "xorriso_timestamp.h" +#ifndef Xorriso_timestamP +#define Xorriso_timestamP "-none-given-" +#endif + +/** The binary build timestamp is to be set externally by the compiler */ +#ifndef Xorriso_build_timestamP +#define Xorriso_build_timestamP "-none-given-" +#endif + /* Because regex_t is mentioned in struct XorrisO */ #ifdef Xorriso_with_regeX diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 4ac493db..9852072e 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2008.02.14.120557" +#define Xorriso_timestamP "2008.02.14.175623" diff --git a/xorriso/xorrisoburn.c b/xorriso/xorrisoburn.c index 4ba4fe0e..45615bde 100644 --- a/xorriso/xorrisoburn.c +++ b/xorriso/xorrisoburn.c @@ -720,8 +720,9 @@ int Xorriso_make_write_options( */ int Xorriso_write_session(struct XorrisO *xorriso, int flag) { - int ret, media_space, img_sectors, padding= 0, profile= 0, relax= 0; - char profile_name[80]; + int ret, media_space, img_sectors, padding= 0, profile= 0, relax= 0, i; + int major, minor, micro; + char profile_name[80], xorriso_id[128+1], *img_id; struct isoburn_imgen_opts *sopts= NULL; struct burn_drive_info *dinfo, *source_dinfo; struct burn_drive *drive, *source_drive; @@ -830,6 +831,30 @@ int Xorriso_write_session(struct XorrisO *xorriso, int flag) sopts.fifo_size= xorriso->fs * 2048; #endif /* NIX */ + if(image!=NULL) { + sprintf(xorriso_id, "XORRISO-%s %s", + Xorriso_program_versioN, Xorriso_timestamP); + isoburn_version(&major, &minor, µ); + sprintf(xorriso_id+strlen(xorriso_id), + ", LIBISOBURN-%d.%d.%d", major, minor, micro); + iso_lib_version(&major, &minor, µ); + sprintf(xorriso_id+strlen(xorriso_id), + ", LIBISOFS-%d.%d.%d", major, minor, micro); + burn_version(&major, &minor, µ); + sprintf(xorriso_id+strlen(xorriso_id), + ", LIBBURN-%d.%d.%d", major, minor, micro); + img_id= (char *) iso_image_get_data_preparer_id(image); + if(img_id!=NULL) { + for(i= strlen(img_id)-1; i>=0 && img_id[i]==' '; i--); + if(i>0) { + sprintf(xorriso->info_text, "Overwrote previous preparer id '%s'", + img_id); + Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "DEBUG", 0); + } + } + iso_image_set_data_preparer_id(image, xorriso_id); + } + /* Make final abort check before starting expensive activities */ ret= Xorriso_eval_problem_status(xorriso, 1, 0); if(ret<0)