Adjust printf format specifiers for dev_t and ino_t in kernel.
ino_t and dev_t are about to become uint64_t. Reviewed by: kib, mckusick
This commit is contained in:
parent
9b33705411
commit
dde58752db
@ -674,7 +674,7 @@ linprocfs_doprocstat(PFS_FILL_ARGS)
|
||||
PS_ADD("pgrp", "%d", p->p_pgid);
|
||||
PS_ADD("session", "%d", p->p_session->s_sid);
|
||||
PROC_UNLOCK(p);
|
||||
PS_ADD("tty", "%d", kp.ki_tdev);
|
||||
PS_ADD("tty", "%ju", (uintmax_t)kp.ki_tdev);
|
||||
PS_ADD("tpgid", "%d", kp.ki_tpgid);
|
||||
PS_ADD("flags", "%u", 0); /* XXX */
|
||||
PS_ADD("minflt", "%lu", kp.ki_rusage.ru_minflt);
|
||||
|
@ -93,7 +93,8 @@ svr4_find_socket(td, fp, dev, ino, saun)
|
||||
struct svr4_sockcache_entry *e;
|
||||
void *cookie = ((struct socket *)fp->f_data)->so_emuldata;
|
||||
|
||||
DPRINTF(("svr4_find_socket: [%p,%d,%d]: ", td, dev, ino));
|
||||
DPRINTF(("svr4_find_socket: [%p,%ju,%ju]: ", td, (uintmax_t)dev,
|
||||
(uintmax_t)ino));
|
||||
mtx_lock(&svr4_sockcache_lock);
|
||||
TAILQ_FOREACH(e, &svr4_head, entries)
|
||||
if (e->p == td->td_proc && e->dev == dev && e->ino == ino) {
|
||||
@ -142,8 +143,8 @@ svr4_add_socket(td, path, st)
|
||||
mtx_lock(&svr4_sockcache_lock);
|
||||
TAILQ_INSERT_HEAD(&svr4_head, e, entries);
|
||||
mtx_unlock(&svr4_sockcache_lock);
|
||||
DPRINTF(("svr4_add_socket: %s [%p,%d,%d]\n", e->sock.sun_path,
|
||||
td->td_proc, e->dev, e->ino));
|
||||
DPRINTF(("svr4_add_socket: %s [%p,%ju,%ju]\n", e->sock.sun_path,
|
||||
td->td_proc, (uintmax_t)e->dev, (uintmax_t)e->ino));
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -160,8 +161,9 @@ svr4_delete_socket(p, fp)
|
||||
if (e->p == p && e->cookie == cookie) {
|
||||
TAILQ_REMOVE(&svr4_head, e, entries);
|
||||
mtx_unlock(&svr4_sockcache_lock);
|
||||
DPRINTF(("svr4_delete_socket: %s [%p,%d,%d]\n",
|
||||
e->sock.sun_path, p, (int)e->dev, e->ino));
|
||||
DPRINTF(("svr4_delete_socket: %s [%p,%ju,%ju]\n",
|
||||
e->sock.sun_path, p, (uintmax_t)e->dev,
|
||||
(uintmax_t)e->ino));
|
||||
free(e, M_TEMP);
|
||||
return;
|
||||
}
|
||||
@ -179,8 +181,9 @@ svr4_purge_sockcache(arg, p)
|
||||
TAILQ_FOREACH_SAFE(e, &svr4_head, entries, ne) {
|
||||
if (e->p == p) {
|
||||
TAILQ_REMOVE(&svr4_head, e, entries);
|
||||
DPRINTF(("svr4_purge_sockcache: %s [%p,%d,%d]\n",
|
||||
e->sock.sun_path, p, (int)e->dev, e->ino));
|
||||
DPRINTF(("svr4_purge_sockcache: %s [%p,%ju,%ju]\n",
|
||||
e->sock.sun_path, p, (uintmax_t)e->dev,
|
||||
(uintmax_t)e->ino));
|
||||
free(e, M_TEMP);
|
||||
}
|
||||
}
|
||||
|
@ -137,8 +137,9 @@ static int drm_name_info DRM_SYSCTL_HANDLER_ARGS
|
||||
int retcode;
|
||||
int hasunique = 0;
|
||||
|
||||
DRM_SYSCTL_PRINT("%s 0x%x", dev->driver->name, dev2udev(dev->devnode));
|
||||
|
||||
DRM_SYSCTL_PRINT("%s 0x%jx", dev->driver->name,
|
||||
(uintmax_t)dev2udev(dev->devnode));
|
||||
|
||||
DRM_LOCK();
|
||||
if (dev->unique) {
|
||||
snprintf(buf, sizeof(buf), " %s", dev->unique);
|
||||
|
@ -155,7 +155,8 @@ static int drm_name_info DRM_SYSCTL_HANDLER_ARGS
|
||||
int retcode;
|
||||
int hasunique = 0;
|
||||
|
||||
DRM_SYSCTL_PRINT("%s 0x%x", dev->driver->name, dev2udev(dev->devnode));
|
||||
DRM_SYSCTL_PRINT("%s 0x%jx", dev->driver->name,
|
||||
(uintmax_t)dev2udev(dev->devnode));
|
||||
|
||||
DRM_LOCK(dev);
|
||||
if (dev->unique) {
|
||||
|
@ -264,8 +264,8 @@ ext2_reallocblks(struct vop_reallocblks_args *ap)
|
||||
* with the file.
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
printf("realloc: ino %d, lbns %jd-%jd\n\told:", ip->i_number,
|
||||
(intmax_t)start_lbn, (intmax_t)end_lbn);
|
||||
printf("realloc: ino %ju, lbns %jd-%jd\n\told:",
|
||||
(uintmax_t)ip->i_number, (intmax_t)start_lbn, (intmax_t)end_lbn);
|
||||
#endif /* DEBUG */
|
||||
blkno = newblk;
|
||||
for (bap = &sbap[soff], i = 0; i < len; i++, blkno += fs->e2fs_fpb) {
|
||||
@ -968,8 +968,8 @@ ext2_blkfree(struct inode *ip, e4fs_daddr_t bno, long size)
|
||||
ump = ip->i_ump;
|
||||
cg = dtog(fs, bno);
|
||||
if ((u_int)bno >= fs->e2fs->e2fs_bcount) {
|
||||
printf("bad block %lld, ino %llu\n", (long long)bno,
|
||||
(unsigned long long)ip->i_number);
|
||||
printf("bad block %lld, ino %ju\n", (long long)bno,
|
||||
(uintmax_t)ip->i_number);
|
||||
ext2_fserr(fs, ip->i_uid, "bad block");
|
||||
return;
|
||||
}
|
||||
|
@ -801,11 +801,13 @@ ext2_dirbad(struct inode *ip, doff_t offset, char *how)
|
||||
|
||||
mp = ITOV(ip)->v_mount;
|
||||
if ((mp->mnt_flag & MNT_RDONLY) == 0)
|
||||
panic("ext2_dirbad: %s: bad dir ino %lu at offset %ld: %s\n",
|
||||
mp->mnt_stat.f_mntonname, (u_long)ip->i_number,(long)offset, how);
|
||||
panic("ext2_dirbad: %s: bad dir ino %ju at offset %ld: %s\n",
|
||||
mp->mnt_stat.f_mntonname, (uintmax_t)ip->i_number,
|
||||
(long)offset, how);
|
||||
else
|
||||
(void)printf("%s: bad dir ino %lu at offset %ld: %s\n",
|
||||
mp->mnt_stat.f_mntonname, (u_long)ip->i_number, (long)offset, how);
|
||||
(void)printf("%s: bad dir ino %ju at offset %ld: %s\n",
|
||||
mp->mnt_stat.f_mntonname, (uintmax_t)ip->i_number,
|
||||
(long)offset, how);
|
||||
|
||||
}
|
||||
|
||||
|
@ -1366,7 +1366,7 @@ ext2_print(struct vop_print_args *ap)
|
||||
struct vnode *vp = ap->a_vp;
|
||||
struct inode *ip = VTOI(vp);
|
||||
|
||||
vn_printf(ip->i_devvp, "\tino %lu", (u_long)ip->i_number);
|
||||
vn_printf(ip->i_devvp, "\tino %ju", (uintmax_t)ip->i_number);
|
||||
if (vp->v_type == VFIFO)
|
||||
fifo_printinfo(vp);
|
||||
printf("\n");
|
||||
|
@ -1292,7 +1292,8 @@ clone_cleanup(struct clonedevs **cdp)
|
||||
if (!(cp->cdp_flags & CDP_SCHED_DTR)) {
|
||||
cp->cdp_flags |= CDP_SCHED_DTR;
|
||||
KASSERT(dev->si_flags & SI_NAMED,
|
||||
("Driver has goofed in cloning underways udev %x unit %x", dev2udev(dev), dev2unit(dev)));
|
||||
("Driver has goofed in cloning underways udev %jx unit %x",
|
||||
(uintmax_t)dev2udev(dev), dev2unit(dev)));
|
||||
destroy_devl(dev);
|
||||
}
|
||||
}
|
||||
|
@ -559,11 +559,11 @@ maybe_demote(struct mac_lomac *subjlabel, struct mac_lomac *objlabel,
|
||||
pgid = p->p_pgrp->pg_id; /* XXX could be stale? */
|
||||
if (vp != NULL && VOP_GETATTR(vp, &va, curthread->td_ucred) == 0) {
|
||||
log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to"
|
||||
" level %s after %s a level-%s %s (inode=%ld, "
|
||||
" level %s after %s a level-%s %s (inode=%ju, "
|
||||
"mountpount=%s)\n",
|
||||
subjlabeltext, p->p_pid, pgid, curthread->td_ucred->cr_uid,
|
||||
p->p_comm, subjtext, actionname, objlabeltext, objname,
|
||||
va.va_fileid, vp->v_mount->mnt_stat.f_mntonname);
|
||||
(uintmax_t)va.va_fileid, vp->v_mount->mnt_stat.f_mntonname);
|
||||
} else {
|
||||
log(LOG_INFO, "LOMAC: level-%s subject p%dg%du%d:%s demoted to"
|
||||
" level %s after %s a level-%s %s\n",
|
||||
|
@ -845,7 +845,7 @@ ffs_reallocblks_ufs2(ap)
|
||||
*/
|
||||
#ifdef DEBUG
|
||||
if (prtrealloc)
|
||||
printf("realloc: ino %d, lbns %jd-%jd\n\told:", ip->i_number,
|
||||
printf("realloc: ino %ju, lbns %jd-%jd\n\told:", (uintmax_t)ip->i_number,
|
||||
(intmax_t)start_lbn, (intmax_t)end_lbn);
|
||||
#endif
|
||||
blkno = newblk;
|
||||
@ -1029,8 +1029,8 @@ ffs_valloc(pvp, mode, cred, vpp)
|
||||
ip = VTOI(*vpp);
|
||||
if (ip->i_mode) {
|
||||
dup_alloc:
|
||||
printf("mode = 0%o, inum = %lu, fs = %s\n",
|
||||
ip->i_mode, (u_long)ip->i_number, fs->fs_fsmnt);
|
||||
printf("mode = 0%o, inum = %ju, fs = %s\n",
|
||||
ip->i_mode, (uintmax_t)ip->i_number, fs->fs_fsmnt);
|
||||
panic("ffs_valloc: dup alloc");
|
||||
}
|
||||
if (DIP(ip, i_blocks) && (fs->fs_flags & FS_UNCLEAN) == 0) { /* XXX */
|
||||
|
@ -1475,7 +1475,8 @@ ufs_checkpath(ino_t source_ino, ino_t parent_ino, struct inode *target, struct u
|
||||
}
|
||||
}
|
||||
KASSERT(dd_ino == VTOI(vp1)->i_number,
|
||||
("directory %d reparented\n", VTOI(vp1)->i_number));
|
||||
("directory %ju reparented\n",
|
||||
(uintmax_t)VTOI(vp1)->i_number));
|
||||
if (vp != tvp)
|
||||
vput(vp);
|
||||
vp = vp1;
|
||||
|
Loading…
Reference in New Issue
Block a user