Home | History | Annotate | Line # | Download | only in lfs
lfs_debug.c revision 1.43.10.1
      1  1.43.10.1     skrll /*	$NetBSD: lfs_debug.c,v 1.43.10.1 2015/09/22 12:06:17 skrll Exp $	*/
      2        1.2       cgd 
      3        1.9  perseant /*-
      4       1.20  perseant  * Copyright (c) 1999, 2000, 2001, 2002, 2003 The NetBSD Foundation, Inc.
      5        1.9  perseant  * All rights reserved.
      6        1.9  perseant  *
      7        1.9  perseant  * This code is derived from software contributed to The NetBSD Foundation
      8        1.9  perseant  * by Konrad E. Schroder <perseant (at) hhhh.org>.
      9        1.9  perseant  *
     10        1.9  perseant  * Redistribution and use in source and binary forms, with or without
     11        1.9  perseant  * modification, are permitted provided that the following conditions
     12        1.9  perseant  * are met:
     13        1.9  perseant  * 1. Redistributions of source code must retain the above copyright
     14        1.9  perseant  *    notice, this list of conditions and the following disclaimer.
     15        1.9  perseant  * 2. Redistributions in binary form must reproduce the above copyright
     16        1.9  perseant  *    notice, this list of conditions and the following disclaimer in the
     17        1.9  perseant  *    documentation and/or other materials provided with the distribution.
     18        1.9  perseant  *
     19        1.9  perseant  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     20        1.9  perseant  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     21        1.9  perseant  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     22        1.9  perseant  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     23        1.9  perseant  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     24        1.9  perseant  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     25        1.9  perseant  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     26        1.9  perseant  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     27        1.9  perseant  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     28        1.9  perseant  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     29        1.9  perseant  * POSSIBILITY OF SUCH DAMAGE.
     30        1.9  perseant  */
     31        1.1   mycroft /*
     32        1.1   mycroft  * Copyright (c) 1991, 1993
     33        1.1   mycroft  *	The Regents of the University of California.  All rights reserved.
     34        1.1   mycroft  *
     35        1.1   mycroft  * Redistribution and use in source and binary forms, with or without
     36        1.1   mycroft  * modification, are permitted provided that the following conditions
     37        1.1   mycroft  * are met:
     38        1.1   mycroft  * 1. Redistributions of source code must retain the above copyright
     39        1.1   mycroft  *    notice, this list of conditions and the following disclaimer.
     40        1.1   mycroft  * 2. Redistributions in binary form must reproduce the above copyright
     41        1.1   mycroft  *    notice, this list of conditions and the following disclaimer in the
     42        1.1   mycroft  *    documentation and/or other materials provided with the distribution.
     43       1.23       agc  * 3. Neither the name of the University nor the names of its contributors
     44        1.1   mycroft  *    may be used to endorse or promote products derived from this software
     45        1.1   mycroft  *    without specific prior written permission.
     46        1.1   mycroft  *
     47        1.1   mycroft  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
     48        1.1   mycroft  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
     49        1.1   mycroft  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
     50        1.1   mycroft  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
     51        1.1   mycroft  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
     52        1.1   mycroft  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
     53        1.1   mycroft  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
     54        1.1   mycroft  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     55        1.1   mycroft  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
     56        1.1   mycroft  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
     57        1.1   mycroft  * SUCH DAMAGE.
     58        1.1   mycroft  *
     59        1.2       cgd  *	@(#)lfs_debug.c	8.1 (Berkeley) 6/11/93
     60        1.1   mycroft  */
     61        1.1   mycroft 
     62       1.35     lukem #include <sys/cdefs.h>
     63  1.43.10.1     skrll __KERNEL_RCSID(0, "$NetBSD: lfs_debug.c,v 1.43.10.1 2015/09/22 12:06:17 skrll Exp $");
     64       1.35     lukem 
     65        1.1   mycroft #ifdef DEBUG
     66       1.14     lukem 
     67        1.1   mycroft #include <sys/param.h>
     68        1.3  christos #include <sys/systm.h>
     69        1.1   mycroft #include <sys/namei.h>
     70        1.1   mycroft #include <sys/vnode.h>
     71        1.1   mycroft #include <sys/mount.h>
     72       1.16  perseant #include <sys/buf.h>
     73       1.26  perseant #include <sys/syslog.h>
     74       1.34  christos #include <sys/proc.h>
     75        1.1   mycroft 
     76       1.41  dholland #include <ufs/lfs/ulfs_inode.h>
     77        1.1   mycroft #include <ufs/lfs/lfs.h>
     78  1.43.10.1     skrll #include <ufs/lfs/lfs_accessors.h>
     79        1.1   mycroft #include <ufs/lfs/lfs_extern.h>
     80       1.16  perseant 
     81       1.16  perseant int lfs_lognum;
     82       1.16  perseant struct lfs_log_entry lfs_log[LFS_LOGLENGTH];
     83       1.16  perseant 
     84       1.38  dholland int
     85       1.38  dholland lfs_bwrite_log(struct buf *bp, const char *file, int line)
     86       1.16  perseant {
     87       1.21  perseant 	struct vop_bwrite_args a;
     88       1.38  dholland 
     89       1.21  perseant 	a.a_desc = VDESC(vop_bwrite);
     90       1.21  perseant 	a.a_bp = bp;
     91       1.16  perseant 
     92       1.36        ad 	if (!(bp->b_flags & B_GATHERED) && !(bp->b_oflags & BO_DELWRI)) {
     93       1.30  perseant 		LFS_ENTER_LOG("write", file, line, bp->b_lblkno, bp->b_flags,
     94       1.30  perseant 			curproc->p_pid);
     95       1.30  perseant 	}
     96       1.21  perseant 	return (VCALL(bp->b_vp, VOFFSET(vop_bwrite), &a));
     97       1.16  perseant }
     98       1.16  perseant 
     99       1.38  dholland void
    100       1.38  dholland lfs_dumplog(void)
    101       1.16  perseant {
    102       1.16  perseant 	int i;
    103       1.31  christos 	const char *cp;
    104       1.16  perseant 
    105       1.30  perseant 	for (i = lfs_lognum; i != (lfs_lognum - 1) % LFS_LOGLENGTH;
    106       1.30  perseant 	     i = (i + 1) % LFS_LOGLENGTH)
    107       1.16  perseant 		if (lfs_log[i].file) {
    108       1.30  perseant 			/* Only print out basename, for readability */
    109       1.30  perseant 			cp = lfs_log[i].file;
    110       1.30  perseant 			while(*cp)
    111       1.30  perseant 				++cp;
    112       1.30  perseant 			while(*cp != '/' && cp > lfs_log[i].file)
    113       1.30  perseant 				--cp;
    114       1.30  perseant 
    115       1.30  perseant 			printf("lbn %" PRId64 " %s %lx %d, %d %s\n",
    116       1.16  perseant 				lfs_log[i].block,
    117       1.16  perseant 				lfs_log[i].op,
    118       1.16  perseant 				lfs_log[i].flags,
    119       1.30  perseant 				lfs_log[i].pid,
    120       1.16  perseant 				lfs_log[i].line,
    121       1.30  perseant 				cp);
    122       1.16  perseant 		}
    123       1.16  perseant }
    124        1.1   mycroft 
    125       1.25     perry void
    126       1.12  perseant lfs_dump_super(struct lfs *lfsp)
    127        1.1   mycroft {
    128        1.1   mycroft 	int i;
    129       1.25     perry 
    130  1.43.10.1     skrll 	printf("%s%x\t%s%x\t%s%ju\t%s%d\n",
    131  1.43.10.1     skrll 	       "magic	 ", lfsp->lfs_is64 ?
    132  1.43.10.1     skrll 			lfsp->lfs_dlfs_u.u_64.dlfs_magic :
    133  1.43.10.1     skrll 			lfsp->lfs_dlfs_u.u_32.dlfs_magic,
    134  1.43.10.1     skrll 	       "version	 ", lfs_sb_getversion(lfsp),
    135  1.43.10.1     skrll 	       "size	 ", (uintmax_t)lfs_sb_getsize(lfsp),
    136  1.43.10.1     skrll 	       "ssize	 ", lfs_sb_getssize(lfsp));
    137  1.43.10.1     skrll 	printf("%s%ju\t%s%d\t%s%d\t%s%d\n",
    138  1.43.10.1     skrll 	       "dsize	 ", (uintmax_t)lfs_sb_getdsize(lfsp),
    139  1.43.10.1     skrll 	       "bsize	 ", lfs_sb_getbsize(lfsp),
    140  1.43.10.1     skrll 	       "fsize	 ", lfs_sb_getfsize(lfsp),
    141  1.43.10.1     skrll 	       "frag	 ", lfs_sb_getfrag(lfsp));
    142       1.25     perry 
    143        1.6  christos 	printf("%s%d\t%s%d\t%s%d\t%s%d\n",
    144  1.43.10.1     skrll 	       "minfree	 ", lfs_sb_getminfree(lfsp),
    145  1.43.10.1     skrll 	       "inopb	 ", lfs_sb_getinopb(lfsp),
    146  1.43.10.1     skrll 	       "ifpb	 ", lfs_sb_getifpb(lfsp),
    147  1.43.10.1     skrll 	       "nindir	 ", lfs_sb_getnindir(lfsp));
    148       1.25     perry 
    149        1.6  christos 	printf("%s%d\t%s%d\t%s%d\t%s%d\n",
    150  1.43.10.1     skrll 	       "nseg	 ", lfs_sb_getnseg(lfsp),
    151  1.43.10.1     skrll 	       "nspf	 ", lfs_sb_getnspf(lfsp),
    152  1.43.10.1     skrll 	       "cleansz	 ", lfs_sb_getcleansz(lfsp),
    153  1.43.10.1     skrll 	       "segtabsz ", lfs_sb_getsegtabsz(lfsp));
    154       1.25     perry 
    155        1.8      fvdl 	printf("%s%x\t%s%d\t%s%lx\t%s%d\n",
    156  1.43.10.1     skrll 	       "segmask	 ", lfs_sb_getsegmask(lfsp),
    157  1.43.10.1     skrll 	       "segshift ", lfs_sb_getsegshift(lfsp),
    158  1.43.10.1     skrll 	       "bmask	 ", (unsigned long)lfs_sb_getbmask(lfsp),
    159  1.43.10.1     skrll 	       "bshift	 ", lfs_sb_getbshift(lfsp));
    160       1.25     perry 
    161        1.8      fvdl 	printf("%s%lu\t%s%d\t%s%lx\t%s%u\n",
    162  1.43.10.1     skrll 	       "ffmask	 ", (unsigned long)lfs_sb_getffmask(lfsp),
    163  1.43.10.1     skrll 	       "ffshift	 ", lfs_sb_getffshift(lfsp),
    164  1.43.10.1     skrll 	       "fbmask	 ", (unsigned long)lfs_sb_getfbmask(lfsp),
    165  1.43.10.1     skrll 	       "fbshift	 ", lfs_sb_getfbshift(lfsp));
    166  1.43.10.1     skrll 
    167  1.43.10.1     skrll 	printf("%s%d\t%s%d\t%s%x\t%s%jx\n",
    168  1.43.10.1     skrll 	       "sushift	 ", lfs_sb_getsushift(lfsp),
    169  1.43.10.1     skrll 	       "fsbtodb	 ", lfs_sb_getfsbtodb(lfsp),
    170  1.43.10.1     skrll 	       "cksum	 ", lfs_sb_getcksum(lfsp),
    171  1.43.10.1     skrll 	       "maxfilesize ", (uintmax_t)lfs_sb_getmaxfilesize(lfsp));
    172       1.25     perry 
    173        1.6  christos 	printf("Superblock disk addresses:");
    174        1.1   mycroft 	for (i = 0; i < LFS_MAXNUMSB; i++)
    175  1.43.10.1     skrll 		printf(" %jx", (intmax_t)lfs_sb_getsboff(lfsp, i));
    176        1.6  christos 	printf("\n");
    177       1.25     perry 
    178        1.6  christos 	printf("Checkpoint Info\n");
    179  1.43.10.1     skrll 	printf("%s%ju\t%s%jx\n",
    180  1.43.10.1     skrll 	       "freehd	 ", (uintmax_t)lfs_sb_getfreehd(lfsp),
    181  1.43.10.1     skrll 	       "idaddr	 ", (intmax_t)lfs_sb_getidaddr(lfsp));
    182  1.43.10.1     skrll 	printf("%s%jx\t%s%ju\t%s%jx\t%s%jx\t%s%jx\t%s%jx\n",
    183  1.43.10.1     skrll 	       "bfree	 ", (intmax_t)lfs_sb_getbfree(lfsp),
    184  1.43.10.1     skrll 	       "nfiles	 ", (uintmax_t)lfs_sb_getnfiles(lfsp),
    185  1.43.10.1     skrll 	       "lastseg	 ", (intmax_t)lfs_sb_getlastseg(lfsp),
    186  1.43.10.1     skrll 	       "nextseg	 ", (intmax_t)lfs_sb_getnextseg(lfsp),
    187  1.43.10.1     skrll 	       "curseg	 ", (intmax_t)lfs_sb_getcurseg(lfsp),
    188  1.43.10.1     skrll 	       "offset	 ", (intmax_t)lfs_sb_getoffset(lfsp));
    189  1.43.10.1     skrll 	printf("tstamp	 %llx\n", (long long)lfs_sb_gettstamp(lfsp));
    190  1.43.10.1     skrll 
    191  1.43.10.1     skrll 	if (!lfsp->lfs_is64) {
    192  1.43.10.1     skrll 		printf("32-bit only derived or constant fields\n");
    193  1.43.10.1     skrll 		printf("%s%u\n",
    194  1.43.10.1     skrll 		       "ifile	 ", lfs_sb_getifile(lfsp));
    195  1.43.10.1     skrll 	}
    196        1.1   mycroft }
    197        1.1   mycroft 
    198        1.1   mycroft void
    199  1.43.10.1     skrll lfs_dump_dinode(struct lfs *fs, union lfs_dinode *dip)
    200        1.1   mycroft {
    201        1.1   mycroft 	int i;
    202       1.25     perry 
    203  1.43.10.1     skrll 	printf("%s%u\t%s%d\t%s%u\t%s%u\t%s%ju\t%s%ju\n",
    204  1.43.10.1     skrll 	       "mode   ", lfs_dino_getmode(fs, dip),
    205  1.43.10.1     skrll 	       "nlink  ", lfs_dino_getnlink(fs, dip),
    206  1.43.10.1     skrll 	       "uid    ", lfs_dino_getuid(fs, dip),
    207  1.43.10.1     skrll 	       "gid    ", lfs_dino_getgid(fs, dip),
    208  1.43.10.1     skrll 	       "size   ", (uintmax_t)lfs_dino_getsize(fs, dip),
    209  1.43.10.1     skrll 	       "blocks ", (uintmax_t)lfs_dino_getblocks(fs, dip));
    210  1.43.10.1     skrll 	printf("inum  %ju\n", (uintmax_t)lfs_dino_getinumber(fs, dip));
    211        1.6  christos 	printf("Direct Addresses\n");
    212       1.42  dholland 	for (i = 0; i < ULFS_NDADDR; i++) {
    213  1.43.10.1     skrll 		printf("\t%jx", (intmax_t)lfs_dino_getdb(fs, dip, i));
    214        1.1   mycroft 		if ((i % 6) == 5)
    215        1.6  christos 			printf("\n");
    216        1.1   mycroft 	}
    217       1.42  dholland 	for (i = 0; i < ULFS_NIADDR; i++)
    218  1.43.10.1     skrll 		printf("\t%jx", (intmax_t)lfs_dino_getib(fs, dip, i));
    219        1.6  christos 	printf("\n");
    220        1.9  perseant }
    221        1.9  perseant 
    222        1.9  perseant void
    223        1.9  perseant lfs_check_segsum(struct lfs *fs, struct segment *sp, char *file, int line)
    224        1.9  perseant {
    225       1.24    simonb 	int actual;
    226        1.9  perseant #if 0
    227       1.25     perry 	static int offset;
    228        1.9  perseant #endif
    229       1.25     perry 
    230       1.24    simonb 	if ((actual = 1) == 1)
    231        1.9  perseant 		return; /* XXXX not checking this anymore, really */
    232       1.25     perry 
    233  1.43.10.1     skrll 	if (sp->sum_bytes_left >= FINFOSIZE(fs)
    234  1.43.10.1     skrll 	   && lfs_fi_getnblocks(fs, sp->fip) > 512) {
    235  1.43.10.1     skrll 		printf("%s:%d: fi_nblocks = %d\n", file, line,
    236  1.43.10.1     skrll 		       lfs_fi_getnblocks(fs, sp->fip));
    237        1.9  perseant #ifdef DDB
    238        1.9  perseant 		Debugger();
    239        1.9  perseant #endif
    240        1.9  perseant 	}
    241       1.25     perry 
    242       1.15       chs 	if (sp->sum_bytes_left > 484) {
    243        1.9  perseant 		printf("%s:%d: bad value (%d = -%d) for sum_bytes_left\n",
    244  1.43.10.1     skrll 		       file, line, sp->sum_bytes_left, lfs_sb_getsumsize(fs)-sp->sum_bytes_left);
    245        1.9  perseant 		panic("too many bytes");
    246        1.9  perseant 	}
    247       1.25     perry 
    248  1.43.10.1     skrll 	actual = lfs_sb_getsumsize(fs)
    249        1.9  perseant 		/* amount taken up by FINFOs */
    250  1.43.10.1     skrll 		- ((char *)NEXT_FINFO(fs, sp->fip) - (char *)(sp->segsum))
    251        1.9  perseant 			/* amount taken up by inode blocks */
    252  1.43.10.1     skrll 			/* XXX should this be INUMSIZE or BLKPTRSIZE? */
    253  1.43.10.1     skrll 			- LFS_INUMSIZE(fs)*((sp->ninodes+LFS_INOPB(fs)-1) / LFS_INOPB(fs));
    254        1.9  perseant #if 0
    255       1.25     perry 	if (actual - sp->sum_bytes_left < offset)
    256       1.25     perry 	{
    257        1.9  perseant 		printf("%s:%d: offset changed %d -> %d\n", file, line,
    258        1.9  perseant 		       offset, actual-sp->sum_bytes_left);
    259        1.9  perseant 		offset = actual - sp->sum_bytes_left;
    260        1.9  perseant 		/* panic("byte mismatch"); */
    261        1.9  perseant 	}
    262        1.9  perseant #endif
    263        1.9  perseant #if 0
    264       1.15       chs 	if (actual != sp->sum_bytes_left)
    265        1.9  perseant 		printf("%s:%d: warning: segsum miscalc at %d (-%d => %d)\n",
    266        1.9  perseant 		       file, line, sp->sum_bytes_left,
    267  1.43.10.1     skrll 		       lfs_sb_getsumsize(fs)-sp->sum_bytes_left,
    268        1.9  perseant 		       actual);
    269        1.9  perseant #endif
    270       1.15       chs 	if (sp->sum_bytes_left > 0
    271  1.43.10.1     skrll 	   && ((char *)(sp->segsum))[lfs_sb_getsumsize(fs)
    272       1.43  christos 				     - sizeof(int32_t) * ((sp->ninodes+LFS_INOPB(fs)-1) / LFS_INOPB(fs))
    273        1.9  perseant 				     - sp->sum_bytes_left] != '\0') {
    274        1.9  perseant 		printf("%s:%d: warning: segsum overwrite at %d (-%d => %d)\n",
    275        1.9  perseant 		       file, line, sp->sum_bytes_left,
    276  1.43.10.1     skrll 		       lfs_sb_getsumsize(fs)-sp->sum_bytes_left,
    277        1.9  perseant 		       actual);
    278        1.9  perseant #ifdef DDB
    279        1.9  perseant 		Debugger();
    280        1.9  perseant #endif
    281        1.9  perseant 	}
    282        1.9  perseant }
    283        1.9  perseant 
    284        1.9  perseant void
    285       1.12  perseant lfs_check_bpp(struct lfs *fs, struct segment *sp, char *file, int line)
    286        1.9  perseant {
    287        1.9  perseant 	daddr_t blkno;
    288        1.9  perseant 	struct buf **bpp;
    289        1.9  perseant 	struct vnode *devvp;
    290       1.25     perry 
    291        1.9  perseant 	devvp = VTOI(fs->lfs_ivnode)->i_devvp;
    292        1.9  perseant 	blkno = (*(sp->bpp))->b_blkno;
    293       1.15       chs 	for (bpp = sp->bpp; bpp < sp->cbpp; bpp++) {
    294       1.15       chs 		if ((*bpp)->b_blkno != blkno) {
    295       1.15       chs 			if ((*bpp)->b_vp == devvp) {
    296       1.18    kleink 				printf("Oops, would misplace raw block "
    297       1.18    kleink 				       "0x%" PRIx64 " at 0x%" PRIx64 "\n",
    298        1.9  perseant 				       (*bpp)->b_blkno,
    299        1.9  perseant 				       blkno);
    300        1.9  perseant 			} else {
    301       1.32  christos 				printf("%s:%d: misplace ino %llu lbn %" PRId64
    302       1.18    kleink 				       " at 0x%" PRIx64 " instead of "
    303       1.18    kleink 				       "0x%" PRIx64 "\n",
    304        1.9  perseant 				       file, line,
    305       1.32  christos 				       (unsigned long long)
    306       1.32  christos 				       VTOI((*bpp)->b_vp)->i_number,
    307       1.32  christos 				       (*bpp)->b_lblkno,
    308        1.9  perseant 				       blkno,
    309        1.9  perseant 				       (*bpp)->b_blkno);
    310        1.9  perseant 			}
    311        1.9  perseant 		}
    312       1.43  christos 		blkno += LFS_FSBTODB(fs, lfs_btofsb(fs, (*bpp)->b_bcount));
    313        1.9  perseant 	}
    314        1.1   mycroft }
    315       1.26  perseant 
    316       1.26  perseant int lfs_debug_log_subsys[DLOG_MAX];
    317       1.26  perseant 
    318       1.26  perseant /*
    319       1.26  perseant  * Log events from various debugging areas of LFS, depending on what
    320       1.26  perseant  * the user has enabled.
    321       1.26  perseant  */
    322       1.26  perseant void
    323       1.26  perseant lfs_debug_log(int subsys, const char *fmt, ...)
    324       1.26  perseant {
    325       1.27    simonb 	va_list ap;
    326       1.26  perseant 
    327       1.26  perseant 	/* If not debugging this subsys, exit */
    328       1.26  perseant 	if (lfs_debug_log_subsys[subsys] == 0)
    329       1.26  perseant 		return;
    330       1.26  perseant 
    331       1.29  christos 	va_start(ap, fmt);
    332       1.28  christos 	vlog(LOG_DEBUG, fmt, ap);
    333       1.27    simonb 	va_end(ap);
    334       1.26  perseant }
    335        1.1   mycroft #endif /* DEBUG */
    336