Caused image root to memorize its eventual PX inode number.

release-1.5.4.branch
Thomas Schmitt 14 years ago
parent 1195614881
commit f18d5157dc
  1. 10
      libisofs/ecma119_tree.c
  2. 12
      libisofs/fs_image.c

@ -112,19 +112,15 @@ int create_ecma119_node(Ecma119Image *img, IsoNode *iso, Ecma119Node **node)
/* TODO #00009 : add true support for harlinks and inode numbers */
ecma->nlink = 1;
/* >>> One needs to find groups of nodes with identical id numbers
resp. with other reasons for being hard links.
This will replace the file source unifier by rbtree
in iso_file_src_create() and iso_file_src_add().
*/
/*ts A90428 */
#ifdef Libisofs_hardlink_prooF
/*ts A90428 */
/* Looking only for valid ISO image inode numbers. */
ret = iso_node_get_id(iso, &fs_id, &dev_id, &(ecma->ino), 1);
if (ret < 0) {
return ret;
} else if (ret == 0) {
/* What has not got a valid ISO image inode yet, gets it now. */
ecma->ino = img_give_ino_number(img->image, 0);
}

@ -3010,6 +3010,18 @@ int iso_image_import(IsoImage *image, IsoDataSource *src,
if (ret < 0)
goto import_revert;
#ifdef Libisofs_hardlink_prooF
/* ts A90501 */
/* Attach ino as xinfo if valid */
if (ret > 0 && info.st_ino != 0 && !data->make_new_ino) {
ret = iso_node_set_ino(&(image->root->node), info.st_ino, 0);
if (ret < 0)
goto import_revert;
}
#endif /* Libisofs_hardlink_prooF */
}
/* if old image has el-torito, add a new catalog */

Loading…
Cancel
Save