- rdev is 16bit whereas dev is 32bit, eww...
(void) headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(flp->fl_mode), 1);
}
- if (sizeof(flp->fl_rdev) != sizeof(uint16_t)) {
- uint16_t prdev = (uint16_t)flp->fl_rdev;
+ if (sizeof(flp->fl_rdev) != sizeof(rpm_rdev_t)) {
+ rpm_rdev_t prdev = (rpm_rdev_t)flp->fl_rdev;
(void) headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(prdev), 1);
} else {
return fsize;
}
-uint16_t rpmfiFRdev(rpmfi fi)
+rpm_rdev_t rpmfiFRdev(rpmfi fi)
{
- uint16_t frdev = 0;
+ rpm_rdev_t frdev = 0;
if (fi != NULL && fi->i >= 0 && fi->i < fi->fc) {
if (fi->frdevs != NULL)
/* XXX rpm-2.3.12 has not RPMTAG_FILEINODES */
if (fi->finodes && fi->frdevs) {
uint32_t finode = fi->finodes[fi->i];
- uint16_t frdev = fi->frdevs[fi->i];
+ rpm_rdev_t frdev = fi->frdevs[fi->i];
int j;
for (j = 0; j < fi->fc; j++) {
* @param fi file info set
* @return current file rdev, 0 on invalid
*/
-uint16_t rpmfiFRdev(rpmfi fi);
+rpm_rdev_t rpmfiFRdev(rpmfi fi);
/** \ingroup rpmfi
* Return current file inode from file info set.
/*?null?*/
rpm_mode_t * fmodes; /*!< File mode(s) (from header) */
/*?null?*/
- const uint16_t * frdevs; /*!< File rdev(s) (from header) */
+ const rpm_rdev_t * frdevs; /*!< File rdev(s) (from header) */
/*?null?*/
const uint32_t * finodes; /*!< File inodes(s) (from header) */
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 struct headerToken_s * Header;
typedef struct headerIterator_s * HeaderIterator;
{
*res |= RPMVERIFY_RDEV;
} else if (S_ISDEV(fmode) && S_ISDEV(sb.st_mode)) {
- uint16_t st_rdev = (sb.st_rdev & 0xffff);
- uint16_t frdev = (rpmfiFRdev(fi) & 0xffff);
+ rpm_rdev_t st_rdev = (sb.st_rdev & 0xffff);
+ rpm_rdev_t frdev = (rpmfiFRdev(fi) & 0xffff);
if (st_rdev != frdev)
*res |= RPMVERIFY_RDEV;
}