diff options
author | Panu Matilainen <pmatilai@redhat.com> | 2008-02-05 13:09:13 +0200 |
---|---|---|
committer | Panu Matilainen <pmatilai@redhat.com> | 2008-02-05 13:09:13 +0200 |
commit | 9b0967588abde9599751a6ede176fa429202dd72 (patch) | |
tree | 79e210d777017ab2acbd848ff77ae876e3f28409 | |
parent | e5116e43d753114f9966ff42f507310a61f620eb (diff) | |
download | rpm-9b0967588abde9599751a6ede176fa429202dd72.tar.gz rpm-9b0967588abde9599751a6ede176fa429202dd72.tar.bz2 rpm-9b0967588abde9599751a6ede176fa429202dd72.zip |
More rpm-headerdata types: rpm_dev_t and rpm_ino_t, use where spotted
- both hardwired to 32bit internally
-rw-r--r-- | build/files.c | 8 | ||||
-rw-r--r-- | lib/rpmfi.c | 6 | ||||
-rw-r--r-- | lib/rpmfi.h | 2 | ||||
-rw-r--r-- | lib/rpmfi_internal.h | 2 | ||||
-rw-r--r-- | lib/rpmtypes.h | 2 |
5 files changed, 11 insertions, 9 deletions
diff --git a/build/files.c b/build/files.c index 0709d9b3e..c268128ea 100644 --- a/build/files.c +++ b/build/files.c @@ -1161,16 +1161,16 @@ static void genCpioListAndHeader(FileList fl, (void) headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE, &(flp->fl_rdev), 1); } - if (sizeof(flp->fl_dev) != sizeof(uint32_t)) { - uint32_t pdevice = (uint32_t)flp->fl_dev; + if (sizeof(flp->fl_dev) != sizeof(rpm_dev_t)) { + rpm_dev_t pdevice = (rpm_dev_t)flp->fl_dev; (void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE, &(pdevice), 1); } else { (void) headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE, &(flp->fl_dev), 1); } - if (sizeof(flp->fl_ino) != sizeof(uint32_t)) { - uint32_t ino = (uint32_t)flp->fl_ino; + if (sizeof(flp->fl_ino) != sizeof(rpm_ino_t)) { + rpm_ino_t ino = (rpm_ino_t)flp->fl_ino; (void) headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE, &(ino), 1); } else { diff --git a/lib/rpmfi.c b/lib/rpmfi.c index d476865c9..92022984b 100644 --- a/lib/rpmfi.c +++ b/lib/rpmfi.c @@ -215,9 +215,9 @@ rpm_rdev_t rpmfiFRdev(rpmfi fi) return frdev; } -uint32_t rpmfiFInode(rpmfi fi) +rpm_ino_t rpmfiFInode(rpmfi fi) { - uint32_t finode = 0; + rpm_ino_t finode = 0; if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { if (fi->finodes != NULL) @@ -298,7 +298,7 @@ uint32_t rpmfiFNlink(rpmfi fi) if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) { /* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */ if (fi->finodes && fi->frdevs) { - uint32_t finode = fi->finodes[fi->i]; + rpm_ino_t finode = fi->finodes[fi->i]; rpm_rdev_t frdev = fi->frdevs[fi->i]; int j; diff --git a/lib/rpmfi.h b/lib/rpmfi.h index c6f40e421..35b417273 100644 --- a/lib/rpmfi.h +++ b/lib/rpmfi.h @@ -237,7 +237,7 @@ rpm_rdev_t rpmfiFRdev(rpmfi fi); * @param fi file info set * @return current file inode, 0 on invalid */ -uint32_t rpmfiFInode(rpmfi fi); +rpm_ino_t rpmfiFInode(rpmfi fi); /** \ingroup rpmfi * Return union of all file color bits from file info set. diff --git a/lib/rpmfi_internal.h b/lib/rpmfi_internal.h index cf4e46f03..52dfeeec5 100644 --- a/lib/rpmfi_internal.h +++ b/lib/rpmfi_internal.h @@ -51,7 +51,7 @@ struct rpmfi_s { /*?null?*/ const rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */ /*?null?*/ - const uint32_t * finodes; /*!< File inodes(s) (from header) */ + const rpm_ino_t * finodes; /*!< File inodes(s) (from header) */ const char ** fuser; /*!< File owner(s) (from header) */ const char ** fgroup; /*!< File group(s) (from header) */ diff --git a/lib/rpmtypes.h b/lib/rpmtypes.h index 56b6661de..79142f95a 100644 --- a/lib/rpmtypes.h +++ b/lib/rpmtypes.h @@ -30,6 +30,8 @@ typedef uint32_t rpm_off_t; typedef uint32_t rpm_time_t; typedef uint16_t rpm_mode_t; typedef uint16_t rpm_rdev_t; +typedef uint32_t rpm_dev_t; +typedef uint32_t rpm_ino_t; typedef struct headerToken_s * Header; typedef struct headerIterator_s * HeaderIterator; |