From 11aec9579d2fbd04c0444079a617f88ecb1ad28f Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Tue, 23 Jun 2009 16:43:33 +0000 Subject: [PATCH] Deprecated -hardlinks modes "start_update", "end_update" for "perform_update" --- libisoburn/trunk/xorriso/xorriso.c | 36 +++++++++++++++++--- libisoburn/trunk/xorriso/xorriso_timestamp.h | 2 +- libisoburn/trunk/xorriso/xorrisoburn.c | 5 ++- 3 files changed, 36 insertions(+), 7 deletions(-) diff --git a/libisoburn/trunk/xorriso/xorriso.c b/libisoburn/trunk/xorriso/xorriso.c index 1afc460e..7c42c4b3 100644 --- a/libisoburn/trunk/xorriso/xorriso.c +++ b/libisoburn/trunk/xorriso/xorriso.c @@ -15723,14 +15723,15 @@ int Xorriso_option_hardlinks(struct XorrisO *xorriso, char *mode, int flag) int ret; if(strcmp(mode, "off") == 0) { + Xorriso_finish_hl_update(xorriso, 0); xorriso->ino_behavior|= 1 | 2 | 4; xorriso->ino_behavior&= ~8; } else if(strcmp(mode, "on") == 0) { xorriso->ino_behavior&= ~(1 | 2 | 4 | 8); } else if(strcmp(mode, "without_update") == 0) { + Xorriso_finish_hl_update(xorriso, 0); xorriso->ino_behavior&= ~(1 | 2 | 4); xorriso->ino_behavior|= 8; - Xorriso_finish_hl_update(xorriso, 0); } else if(strcmp(mode, "start_update") == 0) { xorriso->ino_behavior&= ~(1 | 2 | 4 | 8); ret= Xorriso_make_di_array(xorriso, 1); @@ -15738,6 +15739,8 @@ int Xorriso_option_hardlinks(struct XorrisO *xorriso, char *mode, int flag) return(ret); } else if(strcmp(mode, "end_update") == 0) { Xorriso_finish_hl_update(xorriso, 0); + } else if(strcmp(mode, "perform_update") == 0) { + Xorriso_finish_hl_update(xorriso, 0); } else if(strcmp(mode, "start_extract") == 0) { xorriso->do_restore_sort_lba= 0; xorriso->ino_behavior&= ~(1 | 2 | 4); @@ -16850,8 +16853,13 @@ ex:; i= optc; Sfile_destroy_argv(&i, &eff_tgt_array, 0); (*idx)= end_idx; + +#ifdef NIX + /* <<< */ if(made_di_array) Xorriso_finish_hl_update(xorriso, 0); +#endif + if(made_hln_array) Xorriso_destroy_hln_array(xorriso, 0); Xorriso_opt_args(xorriso, cmd, argc, argv, *idx, &end_idx, &optc, &optv, 256); @@ -18762,10 +18770,15 @@ report_outcome:; Xorriso_info(xorriso,0); ex:; + +#ifdef NIX + /* <<< */ if(made_di_array) { /* Dispose all-image node array sorted by isofs.di */ Xorriso_finish_hl_update(xorriso, 0); } +#endif + if(ret < 0) return(ret); return(1); @@ -20158,15 +20171,26 @@ char *Xorriso__get_version_text(int flag) #ifdef Xorriso_with_maiN +#ifdef Xorriso_without_subS + +/* xorriso consists only of a main() stub which has an own version to match + the version of libxorriso header and runtime code. +*/ #define Xorriso_main_program_versioN "0.3.9" +#else /* Xorriso_without_subS */ -static int yell_xorriso() +/* Make sure that both version tests always match. */ +#define Xorriso_main_program_versioN Xorriso_program_versioN + +#endif /* ! Xorriso_without_subS */ + + +static void yell_xorriso() { fprintf(stderr, "xorriso %s : RockRidge filesystem manipulator, libburnia project.\n\n", Xorriso_main_program_versioN); - return(1); } @@ -20214,12 +20238,13 @@ int main(int argc, char **argv) yell_xorriso(); + /* The following functions are allowed only after this initialization */ ret= Xorriso_startup_libraries(xorriso, 0); if(ret <= 0) exit(4); Xorriso_process_msg_queues(xorriso, 0); - /* Interpret startup file */ + /* Interpret startup files */ ret= Xorriso_read_rc(xorriso, 0); if(ret == 3) goto end_sucessfully; @@ -20236,7 +20261,8 @@ int main(int argc, char **argv) goto end_sucessfully; if(ret <= 0) exit(5); - + + /* Enter dialog mode if it has been activated meanwhile */ ret= Xorriso_dialog(xorriso, 0); if(ret <= 0) exit(6); diff --git a/libisoburn/trunk/xorriso/xorriso_timestamp.h b/libisoburn/trunk/xorriso/xorriso_timestamp.h index b28b2f6a..4ec9816d 100644 --- a/libisoburn/trunk/xorriso/xorriso_timestamp.h +++ b/libisoburn/trunk/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2009.06.23.133210" +#define Xorriso_timestamP "2009.06.23.164351" diff --git a/libisoburn/trunk/xorriso/xorrisoburn.c b/libisoburn/trunk/xorriso/xorrisoburn.c index f2acca5b..ac027628 100644 --- a/libisoburn/trunk/xorriso/xorrisoburn.c +++ b/libisoburn/trunk/xorriso/xorrisoburn.c @@ -12017,6 +12017,8 @@ ex:; } +/* @param flag bit0= do not destroy di_array +*/ int Xorriso_finish_hl_update(struct XorrisO *xorriso, int flag) { int ret, zero= 0; @@ -12041,7 +12043,8 @@ int Xorriso_finish_hl_update(struct XorrisO *xorriso, int flag) } ret= 1; ex:; - Xorriso_destroy_di_array(xorriso, 0); + if(!(flag & 1)) + Xorriso_destroy_di_array(xorriso, 0); return(ret); }