Small adjustments in new code after review.

This commit is contained in:
Thomas Schmitt 2009-04-29 12:52:32 +02:00
parent d20da80767
commit 19fd87ef7b
2 changed files with 10 additions and 6 deletions

View File

@ -341,7 +341,8 @@ int img_register_ino(IsoImage *image, IsoNode *node, int flag)
if (ret < 0) if (ret < 0)
return ret; return ret;
if (ret > 0 && ino >= image->used_inodes_start && if (ret > 0 && ino >= image->used_inodes_start &&
ino < image->used_inodes_start + ISO_USED_INODE_RANGE) { ino <= image->used_inodes_start + (ISO_USED_INODE_RANGE - 1)) {
/* without -1 : rollover hazard on 32 bit */
/* <<< */ /* <<< */
if (ino && if (ino &&
@ -366,7 +367,7 @@ int img_register_ino(IsoImage *image, IsoNode *node, int flag)
int img_collect_inos(IsoImage *image, IsoDir *dir, int flag) int img_collect_inos(IsoImage *image, IsoDir *dir, int flag)
{ {
int ret, register_dir = 1; int ret, register_dir = 1;
IsoDirIter *iter; IsoDirIter *iter = NULL;
IsoNode *node; IsoNode *node;
IsoDir *subdir; IsoDir *subdir;
@ -405,7 +406,8 @@ int img_collect_inos(IsoImage *image, IsoDir *dir, int flag)
} }
ret = 1; ret = 1;
ex:; ex:;
iso_dir_iter_free(iter); if (iter != NULL)
iso_dir_iter_free(iter);
return ret; return ret;
} }
@ -511,7 +513,7 @@ int img_update_ino(IsoImage *image, IsoNode *node, int flag)
int img_make_inos(IsoImage *image, IsoDir *dir, int flag) int img_make_inos(IsoImage *image, IsoDir *dir, int flag)
{ {
int ret; int ret;
IsoDirIter *iter; IsoDirIter *iter = NULL;
IsoNode *node; IsoNode *node;
IsoDir *subdir; IsoDir *subdir;
@ -537,7 +539,8 @@ int img_make_inos(IsoImage *image, IsoDir *dir, int flag)
} }
ret = 1; ret = 1;
ex:; ex:;
iso_dir_iter_free(iter); if (iter != NULL)
iso_dir_iter_free(iter);
return ret; return ret;
} }

View File

@ -5288,13 +5288,14 @@ struct burn_source {
/* Hardlinks : Override Libisofs_new_fs_image_inO and preserve inode numbers /* Hardlinks : Override Libisofs_new_fs_image_inO and preserve inode numbers
from session to session. from session to session.
>>> STILL IMMATURE. DO NOT USE YET.
*/ */
#define Libisofs_hardlink_prooF yes #define Libisofs_hardlink_prooF yes
/* Experiment: Ignore PX inode numbers, /* Experiment: Ignore PX inode numbers,
have boot image inode number counted by fs_give_ino_number() have boot image inode number counted by fs_give_ino_number()
Overridden if Libisofs_hardlink_prooF is defined.
*/ */
#define Libisofs_new_fs_image_inO yes #define Libisofs_new_fs_image_inO yes