diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-12-11 09:52:31 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-12-11 09:52:31 +0200 |
commit | 284de053fdbc7cd9de2614dc4af042d29abfd190 (patch) | |
tree | 3f8bc3c3d29a3fc75879a36c901b6da206e4841a /lib/fsm.c | |
parent | f7275ffa1321e6d123ff434e00e4c39b302f83f0 (diff) | |
download | rpm-284de053fdbc7cd9de2614dc4af042d29abfd190.tar.gz rpm-284de053fdbc7cd9de2614dc4af042d29abfd190.tar.bz2 rpm-284de053fdbc7cd9de2614dc4af042d29abfd190.zip |
Avoid bunch of now unnecessary direct accesses to rpmfi struct in fsm
Diffstat (limited to 'lib/fsm.c')
-rw-r--r-- | lib/fsm.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -639,16 +639,16 @@ static int fsmMapPath(FSM_t fsm) fsm->action = FA_UNKNOWN; i = fsm->ix; - if (fi && i >= 0 && i < fi->fc) { + if (fi && i >= 0 && i < rpmfiFC(fi)) { rpmte te = fsmGetTe(fsm); rpmfs fs = rpmteGetFileStates(te); /* XXX these should use rpmfiFFlags() etc */ fsm->action = rpmfsGetAction(fs, i); - fsm->fflags = (fi->fflags ? fi->fflags[i] : RPMFILE_NONE); + fsm->fflags = rpmfiFFlagsIndex(fi, i); /* src rpms have simple base name in payload. */ - fsm->dirName = fi->dnl[fi->dil[i]]; - fsm->baseName = fi->bnl[i]; + fsm->dirName = rpmfiDNIndex(fi, fi->dil[i]); + fsm->baseName = rpmfiBNIndex(fi, i); switch (fsm->action) { case FA_SKIP: @@ -1571,7 +1571,7 @@ static int fsmStage(FSM_t fsm, fileStage stage) /* On non-install, mode must be known so that dirs don't get suffix. */ if (fsm->goal != FSM_PKGINSTALL) { rpmfi fi = fsmGetFi(fsm); - st->st_mode = fi->fmodes[fsm->ix]; + st->st_mode = rpmfiFModeIndex(fi, fsm->ix); } /* Generate file path. */ @@ -1905,8 +1905,7 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break; if (!rc) { time_t mtime = st->st_mtime; rpmfi fi = fsmGetFi(fsm); - if (fi->fmtimes) - st->st_mtime = fi->fmtimes[fsm->ix]; + st->st_mtime = rpmfiFMtimeIndex(fi, fsm->ix); rc = fsmNext(fsm, FSM_UTIME); st->st_mtime = mtime; } |