Changed old-style option UNION_DIAGNOSTIC to DEBUG and fixed printf

format errors exposed by this.  It has nothing to do with diagnostics
since it does little more than control tracing of normal operation.
Actual diagnostics for the union file system are still controlled by
the DIAGNOSTIC option.
This commit is contained in:
bde 1999-08-29 10:03:35 +00:00
parent 368624ea2d
commit d09a51ae66
4 changed files with 22 additions and 24 deletions

View File

@ -253,7 +253,7 @@ union_newsize(vp, uppersz, lowersz)
}
if (sz != VNOVAL) {
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
printf("union: %s size now %ld\n",
uppersz != VNOVAL ? "upper" : "lower", (long) sz);
#endif
@ -694,7 +694,7 @@ union_copyup(un, docopy, cred, p)
VOP_UNLOCK(lvp, 0, p);
(void) VOP_CLOSE(lvp, FREAD, cred, p);
}
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
if (error == 0)
uprintf("union: copied up %s\n", un->un_path);
#endif

View File

@ -97,8 +97,8 @@ union_mount(mp, path, data, ndp, p)
int len;
u_int size;
#ifdef UNION_DIAGNOSTIC
printf("union_mount(mp = %x)\n", mp);
#ifdef DEBUG
printf("union_mount(mp = %p)\n", (void *)mp);
#endif
/*
@ -270,7 +270,7 @@ union_mount(mp, path, data, ndp, p)
(void)union_statfs(mp, &mp->mnt_stat, p);
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
printf("union_mount: from %s, on %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
#endif
@ -318,8 +318,8 @@ union_unmount(mp, mntflags, p)
int freeing;
int flags = 0;
#ifdef UNION_DIAGNOSTIC
printf("union_unmount(mp = %x)\n", mp);
#ifdef DEBUG
printf("union_unmount(mp = %p)\n", (void *)mp);
#endif
if (mntflags & MNT_FORCE)
@ -361,7 +361,7 @@ union_unmount(mp, mntflags, p)
return (EBUSY);
}
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
vprint("union root", um_rootvp);
#endif
/*
@ -456,10 +456,9 @@ union_statfs(mp, sbp, p)
struct statfs mstat;
int lbsize;
#ifdef UNION_DIAGNOSTIC
printf("union_statfs(mp = %x, lvp = %x, uvp = %x)\n", mp,
um->um_lowervp,
um->um_uppervp);
#ifdef DEBUG
printf("union_statfs(mp = %p, lvp = %p, uvp = %p)\n",
(void *)mp, (void *)um->um_lowervp, (void *)um->um_uppervp);
#endif
bzero(&mstat, sizeof(mstat));

View File

@ -253,7 +253,7 @@ union_newsize(vp, uppersz, lowersz)
}
if (sz != VNOVAL) {
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
printf("union: %s size now %ld\n",
uppersz != VNOVAL ? "upper" : "lower", (long) sz);
#endif
@ -694,7 +694,7 @@ union_copyup(un, docopy, cred, p)
VOP_UNLOCK(lvp, 0, p);
(void) VOP_CLOSE(lvp, FREAD, cred, p);
}
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
if (error == 0)
uprintf("union: copied up %s\n", un->un_path);
#endif

View File

@ -97,8 +97,8 @@ union_mount(mp, path, data, ndp, p)
int len;
u_int size;
#ifdef UNION_DIAGNOSTIC
printf("union_mount(mp = %x)\n", mp);
#ifdef DEBUG
printf("union_mount(mp = %p)\n", (void *)mp);
#endif
/*
@ -270,7 +270,7 @@ union_mount(mp, path, data, ndp, p)
(void)union_statfs(mp, &mp->mnt_stat, p);
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
printf("union_mount: from %s, on %s\n",
mp->mnt_stat.f_mntfromname, mp->mnt_stat.f_mntonname);
#endif
@ -318,8 +318,8 @@ union_unmount(mp, mntflags, p)
int freeing;
int flags = 0;
#ifdef UNION_DIAGNOSTIC
printf("union_unmount(mp = %x)\n", mp);
#ifdef DEBUG
printf("union_unmount(mp = %p)\n", (void *)mp);
#endif
if (mntflags & MNT_FORCE)
@ -361,7 +361,7 @@ union_unmount(mp, mntflags, p)
return (EBUSY);
}
#ifdef UNION_DIAGNOSTIC
#ifdef DEBUG
vprint("union root", um_rootvp);
#endif
/*
@ -456,10 +456,9 @@ union_statfs(mp, sbp, p)
struct statfs mstat;
int lbsize;
#ifdef UNION_DIAGNOSTIC
printf("union_statfs(mp = %x, lvp = %x, uvp = %x)\n", mp,
um->um_lowervp,
um->um_uppervp);
#ifdef DEBUG
printf("union_statfs(mp = %p, lvp = %p, uvp = %p)\n",
(void *)mp, (void *)um->um_lowervp, (void *)um->um_uppervp);
#endif
bzero(&mstat, sizeof(mstat));