summaryrefslogtreecommitdiff
path: root/lib/psm.c
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2009-03-09 14:48:47 +0200
committerPanu Matilainen <pmatilai@redhat.com>2009-03-09 14:48:47 +0200
commit2b4507d852ac8469608bef2ce8e219d76b0c543e (patch)
treef84c267d55aec8752ae5f199cc22392f610837d8 /lib/psm.c
parent1c1faec7a30099f62c12ccef2f15e37a202e6518 (diff)
downloadrpm-2b4507d852ac8469608bef2ce8e219d76b0c543e.tar.gz
rpm-2b4507d852ac8469608bef2ce8e219d76b0c543e.tar.bz2
rpm-2b4507d852ac8469608bef2ce8e219d76b0c543e.zip
Fix RPMTAG_FILESTATES in rpmdb
- sizeof(rpmfileState) != sizeof(char), and char is what goes to headers resulting in some pretty weird states despite being correct on disk - add rpm_fstate_t type for the header presentation of states and use where appropriate
Diffstat (limited to 'lib/psm.c')
-rw-r--r--lib/psm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/psm.c b/lib/psm.c
index 112d344ce..b493b3372 100644
--- a/lib/psm.c
+++ b/lib/psm.c
@@ -1417,11 +1417,11 @@ rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
rpm_time_t installTime = (rpm_time_t) time(NULL);
rpmfs fs = rpmteGetFileStates(psm->te);
rpm_count_t fc = rpmfsFC(fs);
- rpmfileState * fileStates = rpmfsGetStates(fs);
+ rpm_fstate_t * fileStates = rpmfsGetStates(fs);
Header h = rpmteHeader(psm->te);
if (fileStates != NULL && fc > 0) {
- headerPutChar(h, RPMTAG_FILESTATES, (char *) fileStates, fc);
+ headerPutChar(h, RPMTAG_FILESTATES, fileStates, fc);
}
headerPutUint32(h, RPMTAG_INSTALLTIME, &installTime, 1);