mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-23 09:23:00 +01:00
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:
parent
b00b6d73dd
commit
8021ba879a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50554
@ -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
|
||||
|
@ -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));
|
||||
|
@ -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
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user