* Code pertaining to management of the in-core dquot data structures.
*/
#define DQHASH(dqvp, id) \
- (&dqhashtbl[((((int)(dqvp)) >> 8) + id) & dqhash])
+ (&dqhashtbl[((((intptr_t)(dqvp)) >> 8) + id) & dqhash])
LIST_HEAD(dqhash, dquot) *dqhashtbl;
u_long dqhash;
TAILQ_HEAD(dqdirtylist, dquot) dqdirtylist;
-static int dqlookup(struct quotafile *, u_long, struct dqblk *, u_int32_t *);
+static int dqlookup(struct quotafile *, u_int32_t, struct dqblk *, u_int32_t *);
static int dqsync_locked(struct dquot *dq);
static void qf_lock(struct quotafile *);
* reading the information from the file if necessary.
*/
int
-dqget(u_long id, struct quotafile *qfp, int type, struct dquot **dqp)
+dqget(u_int32_t id, struct quotafile *qfp, int type, struct dquot **dqp)
{
struct dquot *dq;
struct dquot *ndq = NULL;
* one is inserted. The actual hash table index is returned.
*/
static int
-dqlookup(struct quotafile *qfp, u_long id, struct dqblk *dqb, uint32_t *index)
+dqlookup(struct quotafile *qfp, u_int32_t id, struct dqblk *dqb, uint32_t *index)
{
struct vnode *dqvp;
struct vfs_context context;
uio_t auio;
int i, skip, last;
- u_long mask;
+ u_int32_t mask;
int error = 0;
char uio_buf[ UIO_SIZEOF(1) ];
uio_addiov(auio, CAST_USER_ADDR_T(dqb), sizeof (struct dqblk));
error = VNOP_READ(dqvp, auio, 0, &context);
if (error) {
- printf("dqlookup: error %d looking up id %lu at index %d\n", error, id, i);
+ printf("dqlookup: error %d looking up id %u at index %d\n", error, id, i);
break;
} else if (uio_resid(auio)) {
error = EIO;
- printf("dqlookup: error looking up id %lu at index %d\n", id, i);
+ printf("dqlookup: error looking up id %u at index %d\n", id, i);
break;
}
/*
user_dqblkp->dqb_btime = dqblkp->dqb_btime;
}
else {
+
/* munge user (64 bit) dqblk into kernel (32 bit) dqblk */
bcopy((caddr_t)user_dqblkp, (caddr_t)dqblkp, offsetof(struct dqblk, dqb_btime));
dqblkp->dqb_id = user_dqblkp->dqb_id;