libisoburn  1.5.4
About: libisoburn is a frontend for the libraries libburn and libisofs which enables creation and expansion of ISO-9660 filesystems on all media and file types supported by libburn. It implements the API and command interpreter of program xorriso, and installs this program as small dynamically linked binary. xorriso is suitable for incremental data backup and for production of bootable ISO 9660 images. A statically linked version is available as GNU xorriso.
  Fossies Dox: libisoburn-1.5.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

iso_tree.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define Xorriso_pvt_iso_tree_includeD   yes
 
#define LIBISO_ISDIR(node)   (iso_node_get_type(node) == LIBISO_DIR)
 
#define LIBISO_ISREG(node)   (iso_node_get_type(node) == LIBISO_FILE)
 
#define LIBISO_ISLNK(node)   (iso_node_get_type(node) == LIBISO_SYMLINK)
 
#define LIBISO_ISCHR(node)
 
#define LIBISO_ISBLK(node)
 
#define LIBISO_ISFIFO(node)
 
#define LIBISO_ISSOCK(node)
 
#define LIBISO_ISBOOT(node)   (iso_node_get_type(node) == LIBISO_BOOT)
 

Functions

int Xorriso_node_from_path (struct XorrisO *xorriso, IsoImage *volume, char *path, IsoNode **node, int flag)
 
int Xorriso_get_node_by_path (struct XorrisO *xorriso, char *in_path, char *eff_path, IsoNode **node, int flag)
 
int Xorriso_dir_from_path (struct XorrisO *xorriso, char *purpose, char *path, IsoDir **dir_node, int flag)
 
int Xorriso_node_get_dev (struct XorrisO *xorriso, IsoNode *node, char *path, dev_t *dev, int flag)
 
int Xorriso_fake_stbuf (struct XorrisO *xorriso, char *path, struct stat *stbuf, IsoNode **node, int flag)
 
int Xorriso_node_is_valid (struct XorrisO *xorriso, IsoNode *in_node, int flag)
 
int Xorriso_path_from_node (struct XorrisO *xorriso, IsoNode *in_node, char path[SfileadrL], int flag)
 
int Xorriso_path_from_lba (struct XorrisO *xorriso, IsoNode *node, int lba, char path[SfileadrL], int flag)
 
int Xorriso_get_attr_value (struct XorrisO *xorriso, void *in_node, char *path, char *name, size_t *value_length, char **value, int flag)
 
int Xorriso_stream_type (struct XorrisO *xorriso, IsoNode *node, IsoStream *stream, char type_text[], int flag)
 
int Xorriso_show_du_subs (struct XorrisO *xorriso, IsoDir *dir_node, char *abs_path, char *rel_path, off_t *size, off_t boss_mem, int flag)
 
int Xorriso_sorted_dir_i (struct XorrisO *xorriso, IsoDir *dir_node, int *filec, char ***filev, off_t boss_mem, int flag)
 
int Xorriso_obtain_pattern_files_i (struct XorrisO *xorriso, char *wd, IsoDir *dir, int *filec, char **filev, int count_limit, off_t *mem, int *dive_count, int flag)
 
int Xorriso__start_end_lbas (IsoNode *node, int *lba_count, int **start_lbas, int **end_lbas, off_t **section_sizes, off_t *size, int flag)
 
int Xorriso__file_start_lba (IsoNode *node, int *lba, int flag)
 
int Xorriso_file_eval_damage (struct XorrisO *xorriso, IsoNode *node, off_t *damage_start, off_t *damage_end, int flag)
 
int Xorriso_report_lba (struct XorrisO *xorriso, char *show_path, IsoNode *node, uint32_t *last_block, int flag)
 
int Xorriso_report_damage (struct XorrisO *xorriso, char *show_path, IsoNode *node, int flag)
 
int Xorriso_getfname (struct XorrisO *xorriso, char *path, int flag)
 
int Xorriso_retrieve_disk_path (struct XorrisO *xorriso, IsoNode *node, char disk_path[SfileadrL], int flag)
 

Macro Definition Documentation

◆ LIBISO_ISBLK

#define LIBISO_ISBLK (   node)
Value:
(iso_node_get_type(node) == LIBISO_SPECIAL && \
S_ISBLK(iso_node_get_mode(node)))

Definition at line 22 of file iso_tree.h.

◆ LIBISO_ISBOOT

#define LIBISO_ISBOOT (   node)    (iso_node_get_type(node) == LIBISO_BOOT)

Definition at line 28 of file iso_tree.h.

◆ LIBISO_ISCHR

#define LIBISO_ISCHR (   node)
Value:
(iso_node_get_type(node) == LIBISO_SPECIAL && \
S_ISCHR(iso_node_get_mode(node)))

Definition at line 20 of file iso_tree.h.

◆ LIBISO_ISDIR

#define LIBISO_ISDIR (   node)    (iso_node_get_type(node) == LIBISO_DIR)

Definition at line 17 of file iso_tree.h.

◆ LIBISO_ISFIFO

#define LIBISO_ISFIFO (   node)
Value:
(iso_node_get_type(node) == LIBISO_SPECIAL && \
S_ISFIFO(iso_node_get_mode(node)))

Definition at line 24 of file iso_tree.h.

◆ LIBISO_ISLNK

#define LIBISO_ISLNK (   node)    (iso_node_get_type(node) == LIBISO_SYMLINK)

Definition at line 19 of file iso_tree.h.

◆ LIBISO_ISREG

#define LIBISO_ISREG (   node)    (iso_node_get_type(node) == LIBISO_FILE)

Definition at line 18 of file iso_tree.h.

◆ LIBISO_ISSOCK

#define LIBISO_ISSOCK (   node)
Value:
(iso_node_get_type(node) == LIBISO_SPECIAL && \
S_ISSOCK(iso_node_get_mode(node)))

Definition at line 26 of file iso_tree.h.

◆ Xorriso_pvt_iso_tree_includeD

#define Xorriso_pvt_iso_tree_includeD   yes

Definition at line 14 of file iso_tree.h.

Function Documentation

◆ Xorriso__file_start_lba()

int Xorriso__file_start_lba ( IsoNode *  node,
int *  lba,
int  flag 
)

Definition at line 2259 of file iso_tree.c.

2261 {
2262  int *start_lbas= NULL, *end_lbas= NULL, lba_count= 0, i, ret;
2263  off_t size, *section_sizes= NULL;
2264 
2265  *lba= -1;
2266  ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
2267  &section_sizes, &size, 0);
2268  if(ret <= 0)
2269  return(ret);
2270  for(i= 0; i < lba_count; i++) {
2271  if(*lba < 0 || start_lbas[i] < *lba)
2272  *lba= start_lbas[i];
2273  }
2274  if(start_lbas != NULL)
2275  free((char *) start_lbas);
2276  if(end_lbas != NULL)
2277  free((char *) end_lbas);
2278  if(section_sizes != NULL)
2279  free((char *) section_sizes);
2280  if(*lba < 0)
2281  return(0);
2282  return(1);
2283 }
int Xorriso__start_end_lbas(IsoNode *node, int *lba_count, int **start_lbas, int **end_lbas, off_t **section_sizes, off_t *size, int flag)
Definition: iso_tree.c:2210

Referenced by Xorriso_is_plain_image_file(), and Xorriso_stream_type().

◆ Xorriso__start_end_lbas()

int Xorriso__start_end_lbas ( IsoNode *  node,
int *  lba_count,
int **  start_lbas,
int **  end_lbas,
off_t **  section_sizes,
off_t *  size,
int  flag 
)

Definition at line 2210 of file iso_tree.c.

2213 {
2214  int section_count= 0, ret, i;
2215  struct iso_file_section *sections= NULL;
2216 
2217  *lba_count= 0;
2218  *start_lbas= *end_lbas= NULL;
2219  *section_sizes= NULL;
2220  *size= 0;
2221  if(!LIBISO_ISREG(node))
2222  return(0);
2223  *size= iso_file_get_size((IsoFile *) node);
2224  ret= iso_file_get_old_image_sections((IsoFile *) node, &section_count,
2225  &sections, 0);
2226  if(ret < 0)
2227  {ret= -1; goto ex;}
2228  if(ret != 1 || section_count <= 0)
2229  {ret= 0; goto ex;}
2230  *start_lbas= calloc(section_count, sizeof(int));
2231  *end_lbas= calloc(section_count, sizeof(int));
2232  *section_sizes= calloc(section_count, sizeof(off_t));
2233  if(*start_lbas == NULL || *end_lbas == NULL || *section_sizes == NULL)
2234  {ret= -1; goto ex;}
2235  for(i= 0; i < section_count; i++) {
2236  (*start_lbas)[i]= sections[i].block;
2237  (*end_lbas)[i]= sections[i].block + sections[i].size / 2048 - 1;
2238  if(sections[i].size % 2048)
2239  (*end_lbas)[i]++;
2240  (*section_sizes)[i]= sections[i].size;
2241  }
2242  *lba_count= section_count;
2243  ret= 1;
2244 ex:;
2245  if(sections != NULL)
2246  free((char *) sections);
2247  if(ret <= 0) {
2248  if((*start_lbas) != NULL)
2249  free((char *) *start_lbas);
2250  if((*end_lbas) != NULL)
2251  free((char *) *end_lbas);
2252  *start_lbas= *end_lbas= NULL;
2253  *lba_count= 0;
2254  }
2255  return(ret);
2256 }
#define LIBISO_ISREG(node)
Definition: iso_tree.h:18

References LIBISO_ISREG.

Referenced by Exprtest_match(), Xorriso__file_start_lba(), Xorriso_file_eval_damage(), Xorriso_read_file_data(), and Xorriso_report_lba().

◆ Xorriso_dir_from_path()

int Xorriso_dir_from_path ( struct XorrisO xorriso,
char *  purpose,
char *  path,
IsoDir **  dir_node,
int  flag 
)

Definition at line 2687 of file iso_tree.c.

2689 {
2690  IsoImage *volume;
2691  IsoNode *node;
2692  int ret, is_dir= 0;
2693 
2694  ret= Xorriso_get_volume(xorriso, &volume, 0);
2695  if(ret<=0)
2696  return(ret);
2697 
2698  ret= Xorriso_node_from_path(xorriso, volume, path, &node, flag & 3);
2699  if(ret<=0)
2700  goto wdi_is_not_a_dir;
2701  if(LIBISO_ISDIR(node))
2702  is_dir= 1;
2703  if(!is_dir) {
2704 wdi_is_not_a_dir:;
2705  sprintf(xorriso->info_text,
2706  "%s path does not lead to a directory in ISO image", purpose);
2707  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
2708  return(0);
2709  }
2710  *dir_node= (IsoDir *) node;
2711  return(1);
2712 }
int Xorriso_get_volume(struct XorrisO *xorriso, IsoImage **volume, int flag)
Definition: iso_img.c:966
int Xorriso_node_from_path(struct XorrisO *xorriso, IsoImage *volume, char *path, IsoNode **node, int flag)
Definition: iso_tree.c:2650
#define LIBISO_ISDIR(node)
Definition: iso_tree.h:17
char info_text[10 *4096]
int Xorriso_msgs_submit(struct XorrisO *xorriso, int error_code, char msg_text[], int os_errno, char severity[], int flag)
Submit a problem message to the xorriso problem reporting and handling system.
Definition: text_io.c:2504

References XorrisO::info_text, LIBISO_ISDIR, Xorriso_get_volume(), Xorriso_msgs_submit(), and Xorriso_node_from_path().

Referenced by Xorriso_clone_under(), and Xorriso_ls().

◆ Xorriso_fake_stbuf()

int Xorriso_fake_stbuf ( struct XorrisO xorriso,
char *  path,
struct stat *  stbuf,
IsoNode **  node,
int  flag 
)

Definition at line 245 of file iso_tree.c.

247 {
248  int ret, min_hl, max_hl, node_idx, i;
249  IsoImage *volume;
250  IsoBoot *bootcat;
251  uint32_t lba;
252  char *catcontent = NULL;
253  off_t catsize;
254  dev_t dev_number;
255 
256  memset((char *) stbuf, 0, sizeof(struct stat));
257  if(!(flag&1)) {
258  ret= Xorriso_get_volume(xorriso, &volume, 0);
259  if(ret<=0)
260  return(-1);
261  ret= Xorriso_node_from_path(xorriso, volume, path, node,
262  ((flag >> 4) & 2) | !(flag&4));
263  if(ret<=0)
264  *node= NULL;
265  }
266  if(*node==NULL)
267  return(0);
268 
269  /* >>> stbuf->st_dev */
270  /* >>> stbuf->st_ino */
271 
272  if(flag & 8)
273  stbuf->st_mode= iso_node_get_perms_wo_acl(*node) & 07777;
274  else
275  stbuf->st_mode= iso_node_get_permissions(*node) & 07777;
276  if(LIBISO_ISDIR(*node))
277  stbuf->st_mode|= S_IFDIR;
278  else if(LIBISO_ISREG(*node))
279  stbuf->st_mode|= S_IFREG;
280  else if(LIBISO_ISLNK(*node))
281  stbuf->st_mode|= S_IFLNK;
282  else if(LIBISO_ISCHR(*node)) {
283  stbuf->st_mode|= S_IFCHR;
284  Xorriso_node_get_dev(xorriso, *node, path, &dev_number, 0);
285  stbuf->st_rdev= dev_number;
286  } else if(LIBISO_ISBLK(*node)) {
287  stbuf->st_mode|= S_IFBLK;
288  /* ts B11124:
289  Debian mips and mipsel have sizeof(stbuf.st_rdev) == 4
290  whereas sizeof(dev_t) is 8.
291  This workaround assumes that the returned numbers fit into 4 bytes.
292  The may stem from the local filesystem or from the ISO image.
293  At least there will be no memory corruption but only an integer rollover.
294  */
295  Xorriso_node_get_dev(xorriso, *node, path, &dev_number, 0);
296  stbuf->st_rdev= dev_number;
297  } else if(LIBISO_ISFIFO(*node))
298  stbuf->st_mode|= S_IFIFO;
299  else if(LIBISO_ISSOCK(*node))
300  stbuf->st_mode|= S_IFSOCK;
301  else if(LIBISO_ISBOOT(*node))
302  stbuf->st_mode|= Xorriso_IFBOOT;
303 
304  /* >>> With directories this should be : number of subdirs + 2 */
305  /* >>> ??? How to obtain RR hardlink number for other types ? */
306  /* This may get overridden farther down */
307  stbuf->st_nlink= 1;
308 
309  stbuf->st_uid= iso_node_get_uid(*node);
310  stbuf->st_gid= iso_node_get_gid(*node);
311 
312  if(LIBISO_ISREG(*node))
313  stbuf->st_size= iso_file_get_size((IsoFile *) *node)+ (2048 * !!(flag&2));
314  else if(LIBISO_ISBOOT(*node)) {
315  ret= Xorriso_get_volume(xorriso, &volume, 0);
316  if(ret <= 0)
317  return(-1);
318  ret= iso_image_get_bootcat(volume, &bootcat, &lba, &catcontent, &catsize);
319  if(catcontent != NULL)
320  free(catcontent);
321  if(ret < 0) {
322  Xorriso_process_msg_queues(xorriso,0);
323  return(-1);
324  }
325  stbuf->st_size= catsize;
326  } else
327  stbuf->st_size= 0;
328 
329  stbuf->st_blksize= 2048;
330  stbuf->st_blocks= stbuf->st_size / (off_t) 2048;
331  if(stbuf->st_blocks * (off_t) 2048 != stbuf->st_size)
332  stbuf->st_blocks++;
333 
334  stbuf->st_atime= iso_node_get_atime(*node);
335  stbuf->st_mtime= iso_node_get_mtime(*node);
336  stbuf->st_ctime= iso_node_get_ctime(*node);
337 
338  if(LIBISO_ISDIR(*node) || (xorriso->ino_behavior & 1) || (!(flag & 16)) ||
339  xorriso->hln_array == NULL)
340  return(1);
341 
342  /* Try to obtain a better link count */
343  ret= Xorriso_search_hardlinks(xorriso, *node, &node_idx, &min_hl, &max_hl, 0);
344  if(ret < 0)
345  return(ret);
346  if(ret > 0 && node_idx >= 0) {
347  for(i= min_hl; i <= max_hl; i++) {
348  if(i == node_idx)
349  continue;
350  /* Check whether node is still valid */
351  if(iso_node_get_parent(xorriso->hln_array[i]) != NULL)
352  stbuf->st_nlink++;
353  }
354  }
355  return(1);
356 }
int Xorriso_search_hardlinks(struct XorrisO *xorriso, IsoNode *node, int *node_idx, int *min_hl, int *max_hl, int flag)
Definition: iso_tree.c:2601
int Xorriso_node_get_dev(struct XorrisO *xorriso, IsoNode *node, char *path, dev_t *dev, int flag)
Definition: iso_tree.c:229
#define LIBISO_ISBOOT(node)
Definition: iso_tree.h:28
#define LIBISO_ISBLK(node)
Definition: iso_tree.h:22
#define LIBISO_ISCHR(node)
Definition: iso_tree.h:20
#define LIBISO_ISSOCK(node)
Definition: iso_tree.h:26
#define LIBISO_ISFIFO(node)
Definition: iso_tree.h:24
#define LIBISO_ISLNK(node)
Definition: iso_tree.h:19
int Xorriso_process_msg_queues(struct XorrisO *xorriso, int flag)
Forward any pending messages from the library message queues to the xorriso message system which puts...
Definition: lib_mgt.c:519
void ** hln_array
int ino_behavior
#define Xorriso_IFBOOT
Definition: xorrisoburn.h:573

References XorrisO::hln_array, XorrisO::ino_behavior, LIBISO_ISBLK, LIBISO_ISBOOT, LIBISO_ISCHR, LIBISO_ISDIR, LIBISO_ISFIFO, LIBISO_ISLNK, LIBISO_ISREG, LIBISO_ISSOCK, Xorriso_get_volume(), Xorriso_IFBOOT, Xorriso_node_from_path(), Xorriso_node_get_dev(), Xorriso_process_msg_queues(), and Xorriso_search_hardlinks().

Referenced by Xorriso_findi(), Xorriso_findi_action(), Xorriso_get_dus(), Xorriso_identify_split(), Xorriso_iso_lstat(), Xorriso_ls(), Xorriso_ls_filev(), Xorriso_paste_in(), Xorriso_restore(), Xorriso_restore_implicit_properties(), Xorriso_restore_properties(), and Xorriso_restore_tree().

◆ Xorriso_file_eval_damage()

int Xorriso_file_eval_damage ( struct XorrisO xorriso,
IsoNode *  node,
off_t *  damage_start,
off_t *  damage_end,
int  flag 
)

Definition at line 2477 of file iso_tree.c.

2480 {
2481  int *start_lbas= NULL, *end_lbas= NULL, lba_count= 0, sect;
2482  int i, sectors, sector_size, ret;
2483  off_t sect_base= 0, size= 0, byte, *section_sizes= NULL;
2484  struct SectorbitmaP *map;
2485 
2486  *damage_start= *damage_end= -1;
2487  map= xorriso->in_sector_map;
2488  if(map == NULL)
2489  return(0);
2491  sector_size/= 2048;
2492 
2493  ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
2494  &section_sizes, &size, 0);
2495  if(ret <= 0) {
2496  Xorriso_process_msg_queues(xorriso, 0);
2497  return(ret);
2498  }
2499  for(sect= 0; sect < lba_count; sect++) {
2500  for(i= start_lbas[sect]; i <= end_lbas[sect]; i+= sector_size) {
2501  if(Sectorbitmap_is_set(map, i / sector_size, 0) == 0) {
2502  byte= ((off_t) 2048) * ((off_t) (i - start_lbas[sect])) + sect_base;
2503  if(*damage_start < 0 || byte < *damage_start)
2504  *damage_start= byte;
2505  if(byte + (off_t) 2048 > *damage_end)
2506  *damage_end= byte + (off_t) 2048;
2507  }
2508  }
2509  sect_base+= ((off_t) 2048) *
2510  ((off_t) (end_lbas[sect] - start_lbas[sect] + 1));
2511  }
2512  if(*damage_end > size)
2513  *damage_end= size;
2514  if(start_lbas != NULL)
2515  free((char *) start_lbas);
2516  if(end_lbas != NULL)
2517  free((char *) end_lbas);
2518  if(section_sizes != NULL)
2519  free((char *) section_sizes);
2520  if(*damage_start < 0)
2521  return(0);
2522  return(1);
2523 }
int Sectorbitmap_is_set(struct SectorbitmaP *o, int sector, int flag)
Definition: check_media.c:477
int Sectorbitmap_get_layout(struct SectorbitmaP *o, int *sectors, int *sector_size, int flag)
Definition: check_media.c:498
unsigned char * map
Definition: check_media.h:58
struct SectorbitmaP * in_sector_map

References XorrisO::in_sector_map, SectorbitmaP::map, SectorbitmaP::sector_size, Sectorbitmap_get_layout(), Sectorbitmap_is_set(), SectorbitmaP::sectors, Xorriso__start_end_lbas(), and Xorriso_process_msg_queues().

Referenced by Exprtest_match(), and Xorriso_report_damage().

◆ Xorriso_get_attr_value()

int Xorriso_get_attr_value ( struct XorrisO xorriso,
void *  in_node,
char *  path,
char *  name,
size_t *  value_length,
char **  value,
int  flag 
)

Definition at line 1263 of file iso_tree.c.

1265 {
1266  int ret;
1267  size_t num_attrs= 0, *value_lengths= NULL, i;
1268  char **names = NULL, **values= NULL;
1269 
1270  *value= NULL;
1271  *value_length= 0;
1272  ret= Xorriso_get_attrs(xorriso, in_node, path, &num_attrs, &names,
1273  &value_lengths, &values, 8);
1274  if(ret <= 0)
1275  goto ex;
1276 
1277  for(i= 0; i < num_attrs; i++) {
1278  if(strcmp(name, names[i]) != 0)
1279  continue;
1280  *value= calloc(value_lengths[i] + 1, 1);
1281  if(*value == NULL)
1282  {ret= -1; goto ex;}
1283  memcpy(*value, values[i], value_lengths[i]);
1284  (*value)[value_lengths[i]]= 0;
1285  *value_length= value_lengths[i];
1286  ret= 1; goto ex;
1287  }
1288  ret= 0;
1289 ex:
1290  Xorriso_get_attrs(xorriso, in_node, path, &num_attrs, &names,
1291  &value_lengths, &values, 1 << 15);
1292  return(ret);
1293 }
int Xorriso_get_attrs(struct XorrisO *xorriso, void *in_node, char *path, size_t *num_attrs, char ***names, size_t **value_lengths, char ***values, int flag)
Definition: iso_tree.c:1188

References Xorriso_get_attrs().

Referenced by Xorriso_findi_action(), and Xorriso_record_dev_inode().

◆ Xorriso_get_node_by_path()

int Xorriso_get_node_by_path ( struct XorrisO xorriso,
char *  in_path,
char *  eff_path,
IsoNode **  node,
int  flag 
)

Definition at line 199 of file iso_tree.c.

202 {
203  int ret;
204  char *path= NULL;
205  IsoImage *volume;
206 
207  Xorriso_alloc_meM(path, char, SfileadrL);
208 
209  ret= Xorriso_normalize_img_path(xorriso, xorriso->wdi, in_path, path, 0);
210  if(ret<=0)
211  goto ex;
212  if(eff_path!=NULL)
213  strcpy(eff_path, path);
214  ret= Xorriso_get_volume(xorriso, &volume, 0);
215  if(ret<=0)
216  goto ex;
217  ret= Xorriso_node_from_path(xorriso, volume, path, node, 0);
218  if(ret<=0)
219  {ret= 0; goto ex;}
220  ret= 1;
221 ex:;
222  Xorriso_free_meM(path);
223  return(ret);
224 }
#define SfileadrL
int Xorriso_normalize_img_path(struct XorrisO *xorriso, char *wd, char *img_path, char eff_path[], int flag)
Definition: iso_tree.c:55
#define Xorriso_free_meM(pt)
Definition: sfile.h:27
#define Xorriso_alloc_meM(pt, typ, count)
Definition: sfile.h:19
char wdi[4096]

References SfileadrL, XorrisO::wdi, Xorriso_alloc_meM, Xorriso_free_meM, Xorriso_get_volume(), Xorriso_node_from_path(), and Xorriso_normalize_img_path().

Referenced by Xorriso_check_md5(), Xorriso_copy_properties(), Xorriso_findi_sorted(), Xorriso_get_attrs(), Xorriso_get_md5(), Xorriso_getfacl(), Xorriso_is_plain_image_file(), Xorriso_iso_file_open(), Xorriso_make_md5(), Xorriso_set_filter(), Xorriso_set_gid(), Xorriso_set_hidden(), Xorriso_set_st_mode(), Xorriso_set_time(), Xorriso_set_uid(), Xorriso_setfacl(), Xorriso_setfattr(), and Xorriso_show_stream().

◆ Xorriso_getfname()

int Xorriso_getfname ( struct XorrisO xorriso,
char *  path,
int  flag 
)

Definition at line 2719 of file iso_tree.c.

2720 {
2721  int ret, path_offset= 0, bsl_mem;
2722  char *bsl_path= NULL;
2723 
2724  if(path[0] == '/' && !(flag & 1))
2725  path_offset= 1;
2726 
2727  /* backslash escaped path rather than shellsafe path */
2728  ret= Sfile_bsl_encoder(&bsl_path, path + path_offset,
2729  strlen(path + path_offset), 8);
2730  if(ret <= 0)
2731  return(-1);
2732  if(flag & 2) {
2733  sprintf(xorriso->result_line + strlen(xorriso->result_line),
2734  "%s\n", bsl_path[0] ? bsl_path : ".");
2735  } else {
2736  sprintf(xorriso->result_line, "# file: %s\n", bsl_path[0] ? bsl_path : ".");
2737  }
2738  free(bsl_path);
2739  bsl_path= NULL;
2740  /* temporarily disable -backslash_codes with result output */
2741  bsl_mem= xorriso->bsl_interpretation;
2742  xorriso->bsl_interpretation= 0;
2743  Xorriso_result(xorriso, 0);
2744  xorriso->bsl_interpretation= bsl_mem;
2745  return(1);
2746 }
int Sfile_bsl_encoder(char **result, char *text, size_t text_len, int flag)
Definition: sfile.c:562
int bsl_interpretation
char result_line[10 *4096]
int Xorriso_result(struct XorrisO *xorriso, int flag)
Definition: text_io.c:2337

References XorrisO::bsl_interpretation, XorrisO::result_line, Sfile_bsl_encoder(), and Xorriso_result().

Referenced by Xorriso_get_md5(), Xorriso_getfacl(), and Xorriso_getfattr().

◆ Xorriso_node_from_path()

int Xorriso_node_from_path ( struct XorrisO xorriso,
IsoImage *  volume,
char *  path,
IsoNode **  node,
int  flag 
)

Definition at line 2650 of file iso_tree.c.

2652 {
2653  int ret;
2654  char *path_pt;
2655 
2656  path_pt= path;
2657  if(path[0]==0)
2658  path_pt= "/";
2659  if(volume == NULL) {
2660  ret= Xorriso_get_volume(xorriso, &volume, 0);
2661  if(ret <= 0)
2662  return(ret);
2663  }
2664  *node= NULL;
2665  ret= 2;
2666  if(!(flag & 2))
2667  ret= iso_image_path_to_node(volume, path_pt, node);
2668  if(ret == 2)
2669  ret= iso_tree_path_to_node(volume, path_pt, node);
2670  Xorriso_process_msg_queues(xorriso,0);
2671  if(ret<=0 || (*node)==NULL) {
2672  if(!(flag&1)) {
2673  sprintf(xorriso->info_text, "Cannot find path ");
2674  Text_shellsafe(path_pt, xorriso->info_text, 1);
2675  strcat(xorriso->info_text, " in loaded ISO image");
2676  Xorriso_msgs_submit(xorriso, 0, xorriso->info_text, 0, "FAILURE", 0);
2677  }
2678  return(0);
2679  }
2680  return(1);
2681 }
char * Text_shellsafe(char *in_text, char *out_text, int flag)
Definition: misc_funct.c:1044

References XorrisO::info_text, Text_shellsafe(), Xorriso_get_volume(), Xorriso_msgs_submit(), and Xorriso_process_msg_queues().

Referenced by Xorriso_add_tree(), Xorriso_attach_boot_image(), Xorriso_clone_tree(), Xorriso_clone_under(), Xorriso_dir_from_path(), Xorriso_expand_pattern(), Xorriso_extract_cut(), Xorriso_fake_stbuf(), Xorriso_findi(), Xorriso_get_node_by_path(), Xorriso_hardlink_update(), Xorriso_hfsplus_bless(), Xorriso_hfsplus_file_creator_type(), Xorriso_identify_split(), Xorriso_ls_filev(), Xorriso_mark_update_merge(), Xorriso_normalize_img_path(), Xorriso_rename(), Xorriso_restore_disk_object(), Xorriso_restore_is_identical(), Xorriso_rmi(), and Xorriso_set_system_area().

◆ Xorriso_node_get_dev()

int Xorriso_node_get_dev ( struct XorrisO xorriso,
IsoNode *  node,
char *  path,
dev_t *  dev,
int  flag 
)

Definition at line 229 of file iso_tree.c.

231 {
232  *dev= iso_special_get_dev((IsoSpecial *) node);
233  return(1);
234 }

Referenced by Xorriso_fake_stbuf(), and Xorriso_tree_restore_node().

◆ Xorriso_node_is_valid()

int Xorriso_node_is_valid ( struct XorrisO xorriso,
IsoNode *  in_node,
int  flag 
)

Definition at line 384 of file iso_tree.c.

385 {
386  IsoNode *node, *parent;
387 
388  for(node= in_node; 1; node= parent) {
389  parent= (IsoNode *) iso_node_get_parent(node);
390  if(parent == node)
391  break;
392  if(parent == NULL)
393  return(0); /* Node is not in the tree (any more) */
394  }
395  return(1);
396 }

Referenced by Xorriso_remake_hln_array().

◆ Xorriso_obtain_pattern_files_i()

int Xorriso_obtain_pattern_files_i ( struct XorrisO xorriso,
char *  wd,
IsoDir *  dir,
int *  filec,
char **  filev,
int  count_limit,
off_t *  mem,
int *  dive_count,
int  flag 
)

Definition at line 2014 of file iso_tree.c.

2018 {
2019  int ret, failed_at;
2020  IsoDirIter *iter= NULL;
2021  IsoNode *node;
2022  char *name;
2023  char *adr= NULL;
2024 
2025  adr= malloc(SfileadrL);
2026  if(adr==NULL) {
2027  Xorriso_no_malloc_memory(xorriso, &adr, 0);
2028  {ret= -1; goto ex;}
2029  }
2030 
2031  if(!(flag&2))
2032  *dive_count= 0;
2033  else
2034  (*dive_count)++;
2035  ret= Xorriso_check_for_root_pattern(xorriso, filec, filev, count_limit,
2036  mem, (flag&1)|2);
2037  if(ret!=2)
2038  goto ex;
2039 
2040  ret= iso_dir_get_children(dir, &iter);
2041  if(ret<0) {
2042  Xorriso_cannot_create_iter(xorriso, ret, 0);
2043  {ret= -1; goto ex;}
2044  }
2045  while(iso_dir_iter_next(iter, &node) == 1) {
2046  name= (char *) iso_node_get_name(node);
2047  ret= Xorriso_make_abs_adr(xorriso, wd, name, adr, flag&4);
2048  if(ret<=0)
2049  goto ex;
2050  ret= Xorriso_regexec(xorriso, adr, &failed_at, 1);
2051  if(ret) { /* no match */
2052  if(failed_at <= *dive_count) /* no hope for a match */
2053  continue;
2054 
2055  if(!LIBISO_ISDIR(node)) {
2056 
2057  /* >>> How to deal with softlinks ? */
2058 
2059  continue;
2060  }
2061  /* dive deeper */
2063  xorriso, adr, (IsoDir *) node,
2064  filec, filev, count_limit, mem, dive_count, flag|2);
2065  if(ret<=0)
2066  goto ex;
2067  } else {
2068  ret= Xorriso_register_matched_adr(xorriso, adr, count_limit,
2069  filec, filev, mem, (flag&1)|2);
2070  if(ret<=0)
2071  goto ex;
2072  }
2073  }
2074  ret= 1;
2075 ex:;
2076  if(adr!=NULL)
2077  free(adr);
2078  if(flag&2)
2079  (*dive_count)--;
2080  if(iter != NULL)
2081  iso_dir_iter_free(iter);
2082  return(ret);
2083 }
int Xorriso_cannot_create_iter(struct XorrisO *xorriso, int iso_error, int flag)
Definition: iso_manip.c:2509
int Xorriso_obtain_pattern_files_i(struct XorrisO *xorriso, char *wd, IsoDir *dir, int *filec, char **filev, int count_limit, off_t *mem, int *dive_count, int flag)
Definition: iso_tree.c:2014
int Xorriso_register_matched_adr(struct XorrisO *xorriso, char *adr, int count_limit, int *filec, char **filev, off_t *mem, int flag)
Definition: match.c:396
int Xorriso_check_for_root_pattern(struct XorrisO *xorriso, int *filec, char **filev, int count_limit, off_t *mem, int flag)
Definition: match.c:364
int Xorriso_regexec(struct XorrisO *xorriso, char *to_match, int *failed_at, int flag)
Definition: match.c:225
int Xorriso_make_abs_adr(struct XorrisO *xorriso, char *wd, char *name, char adr[], int flag)
Definition: parse_exec.c:2812
int Xorriso_no_malloc_memory(struct XorrisO *xorriso, char **to_free, int flag)
Definition: text_io.c:4077

References LIBISO_ISDIR, SfileadrL, Xorriso_cannot_create_iter(), Xorriso_check_for_root_pattern(), Xorriso_make_abs_adr(), Xorriso_no_malloc_memory(), Xorriso_regexec(), and Xorriso_register_matched_adr().

Referenced by Xorriso_expand_pattern().

◆ Xorriso_path_from_lba()

int Xorriso_path_from_lba ( struct XorrisO xorriso,
IsoNode *  node,
int  lba,
char  path[SfileadrL],
int  flag 
)

◆ Xorriso_path_from_node()

int Xorriso_path_from_node ( struct XorrisO xorriso,
IsoNode *  in_node,
char  path[SfileadrL],
int  flag 
)

◆ Xorriso_report_damage()

int Xorriso_report_damage ( struct XorrisO xorriso,
char *  show_path,
IsoNode *  node,
int  flag 
)

Definition at line 2570 of file iso_tree.c.

2572 {
2573  int ret;
2574  off_t size= 0, damage_start, damage_end;
2575 
2576  ret= Xorriso_file_eval_damage(xorriso, node, &damage_start, &damage_end, 0);
2577  if(ret < 0)
2578  return(0);
2579 
2580  if(LIBISO_ISREG(node))
2581  size= iso_file_get_size((IsoFile *) node);
2582  if(ret > 0) {
2583  sprintf(xorriso->result_line, "File damaged : %8.f , %8.f , %8.f , ",
2584  (double) damage_start, (double) (damage_end - damage_start) ,
2585  (double) size);
2586  } else {
2587  sprintf(xorriso->result_line, "File seems ok: %8.f , %8.f , %8.f , ",
2588  -1.0, -1.0, (double) size);
2589  }
2590  Text_shellsafe(show_path, xorriso->result_line, 1);
2591  strcat(xorriso->result_line, "\n");
2592  Xorriso_result(xorriso, 0);
2593  return(1);
2594 }
int Xorriso_file_eval_damage(struct XorrisO *xorriso, IsoNode *node, off_t *damage_start, off_t *damage_end, int flag)
Definition: iso_tree.c:2477

References LIBISO_ISREG, XorrisO::result_line, Text_shellsafe(), Xorriso_file_eval_damage(), and Xorriso_result().

Referenced by Xorriso_findi_action().

◆ Xorriso_report_lba()

int Xorriso_report_lba ( struct XorrisO xorriso,
char *  show_path,
IsoNode *  node,
uint32_t *  last_block,
int  flag 
)

Definition at line 2529 of file iso_tree.c.

2531 {
2532  int ret, *start_lbas= NULL, *end_lbas= NULL, lba_count, i;
2533  off_t size, *section_sizes= NULL;
2534 
2535  ret= Xorriso__start_end_lbas(node, &lba_count, &start_lbas, &end_lbas,
2536  &section_sizes, &size, 0);
2537  if(ret < 0) {
2538  Xorriso_process_msg_queues(xorriso, 0);
2539  {ret= -1; goto ex;}
2540  }
2541  if(ret == 0)
2542  {ret= 1; goto ex;} /* it is ok to ignore other types */
2543  for(i= 0; i < lba_count; i++) {
2544  if(flag & 1)
2545  size= section_sizes[i];
2546  if(flag & 2) {
2547  if(end_lbas[i] > 0 && (uint32_t) end_lbas[i] > *last_block)
2548  *last_block= end_lbas[i];
2549  } else {
2550  sprintf(xorriso->result_line,
2551  "File data lba: %2d , %8d , %8d , %8.f , ",
2552  i, start_lbas[i], end_lbas[i] + 1 - start_lbas[i], (double) size);
2553  Text_shellsafe(show_path, xorriso->result_line, 1);
2554  strcat(xorriso->result_line, "\n");
2555  Xorriso_result(xorriso, 0);
2556  }
2557  }
2558  ret= 1;
2559 ex:;
2560  if(start_lbas != NULL)
2561  free((char *) start_lbas);
2562  if(end_lbas != NULL)
2563  free((char *) end_lbas);
2564  if(section_sizes != NULL)
2565  free((char *) section_sizes);
2566  return(ret);
2567 }

References XorrisO::result_line, Text_shellsafe(), Xorriso__start_end_lbas(), Xorriso_process_msg_queues(), and Xorriso_result().

Referenced by Xorriso_findi_action().

◆ Xorriso_retrieve_disk_path()

int Xorriso_retrieve_disk_path ( struct XorrisO xorriso,
IsoNode *  node,
char  disk_path[SfileadrL],
int  flag 
)

◆ Xorriso_show_du_subs()

int Xorriso_show_du_subs ( struct XorrisO xorriso,
IsoDir *  dir_node,
char *  abs_path,
char *  rel_path,
off_t *  size,
off_t  boss_mem,
int  flag 
)

Definition at line 1415 of file iso_tree.c.

1418 {
1419  int i, ret, no_sort= 0, filec= 0, l;
1420  IsoDirIter *iter= NULL;
1421  IsoNode *node, **node_array= NULL;
1422  char *name;
1423  off_t sub_size, report_size, mem= 0;
1424  char *path= NULL, *show_path= NULL, *sfe= NULL;
1425 
1426  Xorriso_alloc_meM(sfe, char, 5 * SfileadrL);
1427  Xorriso_alloc_meM(path, char, SfileadrL);
1428  Xorriso_alloc_meM(show_path, char, SfileadrL);
1429 
1430  *size= 0;
1431  ret= iso_dir_get_children(dir_node, &iter);
1432  if(ret<0) {
1433 cannot_create_iter:;
1434  Xorriso_cannot_create_iter(xorriso, ret, 0);
1435  {ret= -1; goto ex;}
1436  }
1437  for(i= 0; iso_dir_iter_next(iter, &node) == 1; ) {
1438  sub_size= 0;
1439  name= (char *) iso_node_get_name(node);
1440  strcpy(show_path, rel_path);
1441  if(Sfile_add_to_path(show_path, name, 0)<=0)
1442  goto much_too_long;
1443  if(LIBISO_ISDIR(node)) {
1444  strcpy(path, abs_path);
1445  if(Sfile_add_to_path(path, name, 0)<=0) {
1446 much_too_long:;
1447  Xorriso_much_too_long(xorriso, strlen(path)+strlen(name)+1, 2);
1448  {ret= -1; goto ex;}
1449  }
1450  filec++;
1451  l= strlen(rel_path)+1;
1452  mem+= l;
1453  if(l % sizeof(char *))
1454  mem+= sizeof(char *)-(l % sizeof(char *));
1455  if(flag&1) /* diving and counting is done further below */
1456  continue;
1457  ret= Xorriso_show_du_subs(xorriso, (IsoDir *) node,
1458  path, show_path, &sub_size, boss_mem, 0);
1459  if(ret<0)
1460  goto ex;
1461  if(ret==0)
1462  continue;
1463  }
1464 
1465  if(LIBISO_ISREG(node)) {
1466  sub_size+= iso_file_get_size((IsoFile *) node)+2048;
1467 /*
1468  sub_size+= iso_file_get_size((IsoFile *) node)+strlen(name)+1;
1469 */
1470  }
1471 
1472  if(sub_size>0)
1473  (*size)+= sub_size;
1474  Xorriso_process_msg_queues(xorriso,0);
1475  }
1476 
1477  if(filec<=0 || !(flag&1))
1478  {ret= 1; goto ex;}
1479 
1480  /* Reset iteration */
1481  iso_dir_iter_free(iter);
1482  iter= NULL;
1483  Xorriso_process_msg_queues(xorriso,0);
1484 
1485  ret= Xorriso_sorted_node_array(xorriso, dir_node, &filec, &node_array,
1486  boss_mem, 1|2|4);
1487  if(ret<0)
1488  goto ex;
1489  if(ret==0) {
1490  no_sort= 1;
1491  ret= iso_dir_get_children(dir_node, &iter);
1492  if(ret<0)
1493  goto cannot_create_iter;
1494  }
1495 
1496  for(i= 0; (no_sort || i<filec) && !(xorriso->request_to_abort); i++) {
1497  if(no_sort) {
1498  ret= iso_dir_iter_next(iter, &node);
1499  if(ret!=1)
1500  break;
1501  if(!LIBISO_ISDIR(node))
1502  continue;
1503  } else
1504  node= node_array[i];
1505 
1506  sub_size= 0;
1507  name= (char *) iso_node_get_name(node);
1508  strcpy(show_path, rel_path);
1509  if(Sfile_add_to_path(show_path, name, 0)<=0)
1510  goto much_too_long;
1511  strcpy(path, abs_path);
1512  if(Sfile_add_to_path(path, name, 0)<=0)
1513  goto much_too_long;
1514  ret= Xorriso_show_du_subs(xorriso, (IsoDir *) node,
1515  path, show_path, &sub_size, boss_mem+mem, flag&1);
1516  if(ret<0)
1517  goto ex;
1518 
1519  if(LIBISO_ISREG(node)) {
1520  sub_size+= iso_file_get_size((IsoFile *) node)+2048;
1521 /*
1522  sub_size+= iso_tree_node_get_size((IsoFile *) node)+strlen(name)+1;
1523 */
1524  }
1525  if(sub_size>0)
1526  (*size)+= sub_size;
1527  report_size= sub_size/1024;
1528  if(report_size*1024<sub_size)
1529  report_size++;
1530  if(!(flag & 4)) {
1531  if(xorriso->sh_style_result)
1532  sprintf(xorriso->result_line, "%-7.f ",(double) (report_size));
1533  else
1534  sprintf(xorriso->result_line, "%7.f ",(double) (report_size));
1535  sprintf(xorriso->result_line+strlen(xorriso->result_line), "%s\n",
1536  Xorriso_esc_filepath(xorriso, show_path, sfe, 0));
1537  Xorriso_result(xorriso, 0);
1538  }
1539  }
1540  ret= 1;
1541 ex:;
1542  Xorriso_free_meM(sfe);
1543  Xorriso_free_meM(path);
1544  Xorriso_free_meM(show_path);
1545  if(iter!=NULL)
1546  iso_dir_iter_free(iter);
1547  if(node_array!=NULL)
1548  free((char *) node_array);
1549  Xorriso_process_msg_queues(xorriso,0);
1550  return(ret);
1551 }
int Xorriso_show_du_subs(struct XorrisO *xorriso, IsoDir *dir_node, char *abs_path, char *rel_path, off_t *size, off_t boss_mem, int flag)
Definition: iso_tree.c:1415
int Sfile_add_to_path(char path[4096], char *addon, int flag)
Definition: sfile.c:137
int Xorriso_sorted_node_array(struct XorrisO *xorriso, IsoDir *dir_node, int *nodec, IsoNode ***node_array, off_t boss_mem, int flag)
Definition: sort_cmp.c:337
int sh_style_result
int request_to_abort
char * Xorriso_esc_filepath(struct XorrisO *xorriso, char *in_text, char *out_text, int flag)
Definition: text_io.c:4742
int Xorriso_much_too_long(struct XorrisO *xorriso, int len, int flag)
Definition: text_io.c:4097

References LIBISO_ISDIR, LIBISO_ISREG, XorrisO::request_to_abort, XorrisO::result_line, Sfile_add_to_path(), SfileadrL, XorrisO::sh_style_result, Xorriso_alloc_meM, Xorriso_cannot_create_iter(), Xorriso_esc_filepath(), Xorriso_free_meM, Xorriso_much_too_long(), Xorriso_process_msg_queues(), Xorriso_result(), and Xorriso_sorted_node_array().

Referenced by Xorriso_get_dus(), and Xorriso_ls_filev().

◆ Xorriso_sorted_dir_i()

int Xorriso_sorted_dir_i ( struct XorrisO xorriso,
IsoDir *  dir_node,
int *  filec,
char ***  filev,
off_t  boss_mem,
int  flag 
)

Definition at line 1554 of file iso_tree.c.

1556 {
1557  int i,j,ret;
1558  IsoDirIter *iter= NULL;
1559  IsoNode *node;
1560  char *name;
1561  off_t mem;
1562 
1563  (*filec)= 0;
1564  (*filev)= NULL;
1565 
1566  ret= iso_dir_get_children(dir_node, &iter);
1567  if(ret<0) {
1568 cannot_iter:;
1569  Xorriso_cannot_create_iter(xorriso, ret, 0);
1570  {ret= -1; goto ex;}
1571  }
1572  mem= 0;
1573  for(i= 0; iso_dir_iter_next(iter, &node) == 1; ) {
1574  name= (char *) iso_node_get_name(node);
1575  mem+= sizeof(char *)+strlen(name)+8;
1576  (*filec)++;
1577  }
1578  iso_dir_iter_free(iter);
1579  iter= NULL;
1580  if(*filec==0)
1581  {ret= 1; goto ex;}
1582 
1583  ret= Xorriso_check_temp_mem_limit(xorriso, mem+boss_mem, 2);
1584  if(ret<=0)
1585  goto ex;
1586  (*filev)= (char **) calloc(*filec, sizeof(char *));
1587  if(*filev==NULL)
1588  {ret= -1; goto ex; }
1589  ret= iso_dir_get_children(dir_node, &iter);
1590  if(ret<0)
1591  goto cannot_iter;
1592  for(i= 0; i<*filec; i++) {
1593  ret= iso_dir_iter_next(iter, &node);
1594  if(ret!=1)
1595  break;
1596  name= (char *) iso_node_get_name(node);
1597  (*filev)[i]= strdup(name);
1598  if((*filev)[i]==NULL) {
1599  for(j= 0; j<i; j++)
1600  if((*filev)[j]!=NULL)
1601  free((*filev)[j]);
1602  free((char *) (*filev));
1603  ret= -1; goto ex;
1604  }
1605  }
1606  Sort_argv(*filec, *filev, 0);
1607  ret= 1;
1608 ex:;
1609  if(iter!=NULL)
1610  iso_dir_iter_free(iter);
1611  return(ret);
1612 }
int Sort_argv(int argc, char **argv, int flag)
Definition: misc_funct.c:40
int Xorriso_check_temp_mem_limit(struct XorrisO *xorriso, off_t mem, int flag)
Definition: parse_exec.c:2896

References Sort_argv(), Xorriso_cannot_create_iter(), and Xorriso_check_temp_mem_limit().

Referenced by Xorriso_ls_filev().

◆ Xorriso_stream_type()

int Xorriso_stream_type ( struct XorrisO xorriso,
IsoNode *  node,
IsoStream *  stream,
char  type_text[],
int  flag 
)

Definition at line 1296 of file iso_tree.c.

1298 {
1299  int ret, lba, stream_type, block_size_log2;
1300  uint8_t zisofs_algo[2], algo_num;
1301  char text[5];
1302 
1303  strncpy(text, stream->class->type, 4);
1304  text[4]= 0;
1305  if(strcmp(text, "fsrc") == 0) {
1306  ret= Xorriso__file_start_lba(node, &lba, 0);
1307  if(ret > 0 && lba > 0)
1308  strcpy(type_text, "image");
1309  else
1310  strcpy(type_text, "disk");
1311  } else if(strcmp(text, "ziso") == 0 || strcmp(text, "osiz") == 0) {
1312  if(strcmp(text, "ziso") == 0)
1313  strcpy(type_text, "--zisofs");
1314  else
1315  strcpy(type_text, "--zisofs-decode");
1316  ret= iso_stream_get_zisofs_par(stream, &stream_type, zisofs_algo, &algo_num,
1317  &block_size_log2, 0);
1318  if(ret == 1)
1319  sprintf(type_text + strlen(type_text), ":%c%c:%dk",
1320  zisofs_algo[0], zisofs_algo[1], 1 << (block_size_log2 - 10));
1321  } else if(strcmp(text, "gzip") == 0) {
1322  strcpy(type_text, "--gzip");
1323  } else if(strcmp(text, "pizg") == 0) {
1324  strcpy(type_text, "--gunzip");
1325  } else if(strcmp(text, "cout") == 0 || strcmp(text, "boot") == 0 ||
1326  strcmp(text, "user") == 0 || strcmp(text, "extf") == 0) {
1327  strcpy(type_text, text);
1328  } else {
1329  Text_shellsafe(text, type_text, 0);
1330  }
1331  return(1);
1332 }
int Xorriso__file_start_lba(IsoNode *node, int *lba, int flag)
Definition: iso_tree.c:2259

References Text_shellsafe(), and Xorriso__file_start_lba().

Referenced by Xorriso_retrieve_disk_path(), and Xorriso_show_stream().