From 1ef9b3578ea4870aa524521af3aa04870addd954 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Mon, 6 May 2013 16:17:42 +0000 Subject: [PATCH] New -hardlinks mode "lsl_count" / "no_lsl_count" --- xorriso/base_obj.c | 2 +- xorriso/opts_d_h.c | 4 ++++ xorriso/opts_i_o.c | 2 +- xorriso/text_io.c | 4 +++- xorriso/xorriso_private.h | 2 ++ xorriso/xorriso_timestamp.h | 2 +- 6 files changed, 12 insertions(+), 4 deletions(-) diff --git a/xorriso/base_obj.c b/xorriso/base_obj.c index 16b8d700..f395b15a 100644 --- a/xorriso/base_obj.c +++ b/xorriso/base_obj.c @@ -132,7 +132,7 @@ int Xorriso_new(struct XorrisO ** xorriso,char *progname, int flag) m->add_plainly= 0; m->split_size= 0; strcpy(m->list_delimiter, "--"); - m->ino_behavior= 7; + m->ino_behavior= 1 | 2 | 4 | 32; /* off:no_lsl_count */ m->iso_level= 3; m->iso_level_is_default= 1; m->do_joliet= 0; diff --git a/xorriso/opts_d_h.c b/xorriso/opts_d_h.c index 2e995f4b..80734445 100644 --- a/xorriso/opts_d_h.c +++ b/xorriso/opts_d_h.c @@ -1463,6 +1463,10 @@ int Xorriso_option_hardlinks(struct XorrisO *xorriso, char *mode, int flag) xorriso->ino_behavior&= ~16; } else if(strcmp(what, "cheap_sorted_extract") == 0) { xorriso->ino_behavior|= 16; + } else if(strcmp(what, "lsl_count") == 0) { + xorriso->ino_behavior&= ~32; + } else if(strcmp(what, "no_lsl_count") == 0) { + xorriso->ino_behavior|= 32; } else { sprintf(xorriso->info_text, "-hardlinks: unknown mode '%s' in '%s'", what, mode); diff --git a/xorriso/opts_i_o.c b/xorriso/opts_i_o.c index 0cc3798f..f72b2e64 100644 --- a/xorriso/opts_i_o.c +++ b/xorriso/opts_i_o.c @@ -374,7 +374,7 @@ no_memory:; } } - if((flag & 1) && !(xorriso->ino_behavior & 1)) { + if((flag & 1) && !(xorriso->ino_behavior & 32)) { ret= Xorriso_make_hln_array(xorriso, 0); /* for stbuf.st_nlink */ if(ret < 0) return(ret); diff --git a/xorriso/text_io.c b/xorriso/text_io.c index 3e72df2b..616a626a 100644 --- a/xorriso/text_io.c +++ b/xorriso/text_io.c @@ -3217,7 +3217,9 @@ int Xorriso_status(struct XorrisO *xorriso, char *filter, FILE *fp, int flag) break; case 8: form= "without_update"; break; default: form= "off"; } - sprintf(line,"-hardlinks %s:%s\n", form, + sprintf(line,"-hardlinks %s:%s:%s\n", form, + xorriso->ino_behavior & 32 ? + "no_lsl_count" : "lsl_count", xorriso->ino_behavior & 16 ? "cheap_sorted_extract" : "normal_extract"); if(!(is_default && no_defaults)) diff --git a/xorriso/xorriso_private.h b/xorriso/xorriso_private.h index e673f27b..f56f5e22 100644 --- a/xorriso/xorriso_private.h +++ b/xorriso/xorriso_private.h @@ -135,6 +135,8 @@ struct XorrisO { /* the global context of xorriso */ Do not try to detect hardlink splits and joinings. bit4= with extract: Do not create or use hln arrays if sort_lba_on + bit5= with command -lsl + Do not create hln array for hard link count */ int iso_level; diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index 9deb8c45..e82aec56 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2013.05.03.135424" +#define Xorriso_timestamP "2013.05.06.161651"