Rename printf -> kprintf in sys/ and add some defines where necessary
authorSascha Wildner <swildner@dragonflybsd.org>
Sat, 23 Dec 2006 00:35:05 +0000 (00:35 +0000)
committerSascha Wildner <swildner@dragonflybsd.org>
Sat, 23 Dec 2006 00:35:05 +0000 (00:35 +0000)
(files which are used in userland, too).

78 files changed:
sys/kern/imgact_elf.c
sys/kern/imgact_gzip.c
sys/kern/imgact_resident.c
sys/kern/inflate.c
sys/kern/init_main.c
sys/kern/kern_ccms.c
sys/kern/kern_checkpoint.c
sys/kern/kern_clock.c
sys/kern/kern_conf.c
sys/kern/kern_debug.c
sys/kern/kern_descrip.c
sys/kern/kern_device.c
sys/kern/kern_event.c
sys/kern/kern_exec.c
sys/kern/kern_exit.c
sys/kern/kern_firmware.c
sys/kern/kern_fork.c
sys/kern/kern_intr.c
sys/kern/kern_ktr.c
sys/kern/kern_linker.c
sys/kern/kern_lock.c
sys/kern/kern_lockf.c
sys/kern/kern_module.c
sys/kern/kern_objcache.c
sys/kern/kern_physio.c
sys/kern/kern_poll.c
sys/kern/kern_proc.c
sys/kern/kern_resource.c
sys/kern/kern_shutdown.c
sys/kern/kern_sig.c
sys/kern/kern_slaballoc.c
sys/kern/kern_spinlock.c
sys/kern/kern_sysctl.c
sys/kern/kern_syslink.c
sys/kern/kern_time.c
sys/kern/kern_timeout.c
sys/kern/kern_usched.c
sys/kern/libmchain/subr_mchain.c
sys/kern/link_aout.c
sys/kern/link_elf.c
sys/kern/lwkt_caps.c
sys/kern/lwkt_ipiq.c
sys/kern/lwkt_thread.c
sys/kern/subr_autoconf.c
sys/kern/subr_blist.c
sys/kern/subr_bus.c
sys/kern/subr_devstat.c
sys/kern/subr_disk.c
sys/kern/subr_diskmbr.c
sys/kern/subr_diskslice.c
sys/kern/subr_power.c
sys/kern/subr_prof.c
sys/kern/subr_rman.c
sys/kern/sys_generic.c
sys/kern/sysv_msg.c
sys/kern/sysv_sem.c
sys/kern/tty.c
sys/kern/tty_compat.c
sys/kern/tty_subr.c
sys/kern/uipc_mbuf.c
sys/kern/uipc_mbuf2.c
sys/kern/uipc_socket2.c
sys/kern/usched_bsd4.c
sys/kern/usched_dummy.c
sys/kern/vfs_aio.c
sys/kern/vfs_bio.c
sys/kern/vfs_cache.c
sys/kern/vfs_cluster.c
sys/kern/vfs_conf.c
sys/kern/vfs_default.c
sys/kern/vfs_jops.c
sys/kern/vfs_journal.c
sys/kern/vfs_mount.c
sys/kern/vfs_nlookup.c
sys/kern/vfs_rangelock.c
sys/kern/vfs_subr.c
sys/kern/vfs_sync.c
sys/kern/vfs_syscalls.c

index 98c8ced..d7e37ca 100644 (file)
@@ -27,7 +27,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/imgact_elf.c,v 1.73.2.13 2002/12/28 19:49:41 dillon Exp $
- * $DragonFly: src/sys/kern/imgact_elf.c,v 1.44 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/imgact_elf.c,v 1.45 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -953,7 +953,7 @@ generic_elf_coredump(struct proc *p, struct file *fp, off_t limit)
        struct elf_buf target;
 
        if (!fp)
-               printf("can't dump core - null fp\n");
+               kprintf("can't dump core - null fp\n");
 
        /*
         * Size the program segments
@@ -1113,9 +1113,9 @@ cb_put_fp(vm_map_entry_t entry, void *closure)
                        char *freepath, *fullpath;
 
                        if (vn_fullpath(curproc, vp, &fullpath, &freepath)) {
-                               printf("Warning: coredump, error %d: cannot store file handle for vnode %p\n", error, vp);
+                               kprintf("Warning: coredump, error %d: cannot store file handle for vnode %p\n", error, vp);
                        } else {
-                               printf("Warning: coredump, error %d: cannot store file handle for %s\n", error, fullpath);
+                               kprintf("Warning: coredump, error %d: cannot store file handle for %s\n", error, fullpath);
                                kfree(freepath, M_TEMP);
                        }
                        error = 0;
index 7e9efbc..019385f 100644 (file)
@@ -7,7 +7,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/kern/imgact_gzip.c,v 1.40.2.1 2001/11/03 01:41:08 ps Exp $
- * $DragonFly: src/sys/kern/imgact_gzip.c,v 1.6 2006/09/11 20:25:01 dillon Exp $
+ * $DragonFly: src/sys/kern/imgact_gzip.c,v 1.7 2006/12/23 00:35:03 swildner Exp $
  *
  * This module handles execution of a.out files which have been run through
  * "gzip".  This saves diskspace, but wastes cpu-cycles and VM.
@@ -138,8 +138,8 @@ exec_gzip_imgact(imgp)
                            (vm_offset_t) igz.inbuf + PAGE_SIZE);
        }
        if (igz.error || error || error2) {
-               printf("Output=%lu ", igz.output);
-               printf("Inflate_error=%d igz.error=%d error2=%d where=%d\n",
+               kprintf("Output=%lu ", igz.output);
+               kprintf("Inflate_error=%d igz.error=%d error2=%d where=%d\n",
                       error, igz.error, error2, igz.where);
        }
        if (igz.error)
index f923252..ddf2c03 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/imgact_resident.c,v 1.14 2006/09/19 11:47:35 corecode Exp $
+ * $DragonFly: src/sys/kern/imgact_resident.c,v 1.15 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -116,7 +116,7 @@ fill_xresident(struct vmresident *vr, struct xresident *in, struct thread *td)
 
 done:
        if (error)
-               printf("fill_xresident, error = %d\n", error);
+               kprintf("fill_xresident, error = %d\n", error);
        return (error);
 }
 
index 434047c..90cbc0f 100644 (file)
@@ -8,7 +8,7 @@
  * ----------------------------------------------------------------------------
  *
  * $FreeBSD: src/sys/kern/inflate.c,v 1.14 1999/12/29 04:54:39 peter Exp $
- * $DragonFly: src/sys/kern/inflate.c,v 1.5 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/inflate.c,v 1.6 2006/12/23 00:35:03 swildner Exp $
  *
  *
  */
@@ -36,7 +36,7 @@ static MALLOC_DEFINE(M_GZIP, "Gzip trees", "Gzip trees");
 #endif
 #define NOMEMCPY
 #ifdef _KERNEL
-#define FPRINTF printf
+#define FPRINTF kprintf
 #else
 extern void putstr (char *);
 #define FPRINTF putstr
index 907596f..de81723 100644 (file)
@@ -40,7 +40,7 @@
  *
  *     @(#)init_main.c 8.9 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/init_main.c,v 1.134.2.8 2003/06/06 20:21:32 tegge Exp $
- * $DragonFly: src/sys/kern/init_main.c,v 1.67 2006/12/04 18:03:26 dillon Exp $
+ * $DragonFly: src/sys/kern/init_main.c,v 1.68 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include "opt_init_path.h"
@@ -235,7 +235,7 @@ restart:
 static void
 print_caddr_t(void *data __unused)
 {
-       printf("%s", (char *)data);
+       kprintf("%s", (char *)data);
 }
 SYSINIT(announce, SI_SUB_COPYRIGHT, SI_ORDER_FIRST, print_caddr_t, copyright)
 
@@ -249,7 +249,7 @@ leavecrit(void *dummy __unused)
        crit_exit();
        KKASSERT(!IN_CRITICAL_SECT(curthread));
        if (bootverbose)
-               printf("Leaving critical section, allowing interrupts\n");
+               kprintf("Leaving critical section, allowing interrupts\n");
 }
 SYSINIT(leavecrit, SI_SUB_LEAVE_CRIT, SI_ORDER_ANY, leavecrit, NULL)
 
@@ -492,7 +492,7 @@ start_init(void *dummy)
                for (next = path; *next != '\0' && *next != ':'; next++)
                        /* nothing */ ;
                if (bootverbose)
-                       printf("start_init: trying %.*s\n", (int)(next - path),
+                       kprintf("start_init: trying %.*s\n", (int)(next - path),
                            path);
                        
                /*
@@ -562,10 +562,10 @@ start_init(void *dummy)
                        return;
                }
                if (error != ENOENT)
-                       printf("exec %.*s: error %d\n", (int)(next - path), 
+                       kprintf("exec %.*s: error %d\n", (int)(next - path), 
                            path, error);
        }
-       printf("init: not found in path %s\n", init_path);
+       kprintf("init: not found in path %s\n", init_path);
        panic("no init");
 }
 
index a7bc5dc..a260ccd 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/kern_ccms.c,v 1.1 2006/08/23 06:45:39 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_ccms.c,v 1.2 2006/12/23 00:35:03 swildner Exp $
  */
 /*
  * The Cache Coherency Management System (CCMS)
@@ -80,7 +80,7 @@ static void
 ccmsinit(void *dummy)
 {
     ccms_oc = objcache_create_simple(M_CCMS, sizeof(struct ccms_cst));
-    printf("CCMSINIT\n");
+    kprintf("CCMSINIT\n");
 }
 SYSINIT(ccms, SI_SUB_OBJCACHE, SI_ORDER_ANY, ccmsinit, NULL);
 
@@ -278,7 +278,7 @@ ccms_lock_get_match(ccms_cst_t cst, void *arg)
            } else {
                ++cst->sharecount;
                if (ccms_enable >= 9) {
-                       printf("CST SHARE %d %lld-%lld\n", cst->sharecount,
+                       kprintf("CST SHARE %d %lld-%lld\n", cst->sharecount,
                                cst->beg_offset, cst->end_offset);
                }
            }
@@ -289,7 +289,7 @@ ccms_lock_get_match(ccms_cst_t cst, void *arg)
            } else {
                --cst->sharecount;
                if (ccms_enable >= 9) {
-                       printf("CST EXCLS %d %lld-%lld\n", cst->sharecount,
+                       kprintf("CST EXCLS %d %lld-%lld\n", cst->sharecount,
                                cst->beg_offset, cst->end_offset);
                }
            }
@@ -301,7 +301,7 @@ ccms_lock_get_match(ccms_cst_t cst, void *arg)
                --cst->sharecount;
                ++cst->modifycount;
                if (ccms_enable >= 9) {
-                       printf("CST MODXL %d %lld-%lld\n", cst->sharecount,
+                       kprintf("CST MODXL %d %lld-%lld\n", cst->sharecount,
                                cst->beg_offset, cst->end_offset);
                }
            }
@@ -362,7 +362,7 @@ ccms_lock_redo_match(ccms_cst_t cst, void *arg)
                info->coll_cst = cst;
            } else {
                if (ccms_enable >= 9) {
-                       printf("CST SHARE %d %lld-%lld\n", cst->sharecount,
+                       kprintf("CST SHARE %d %lld-%lld\n", cst->sharecount,
                                cst->beg_offset, cst->end_offset);
                }
                ++cst->sharecount;
@@ -374,7 +374,7 @@ ccms_lock_redo_match(ccms_cst_t cst, void *arg)
            } else {
                --cst->sharecount;
                if (ccms_enable >= 9) {
-                       printf("CST EXCLS %d %lld-%lld\n", cst->sharecount,
+                       kprintf("CST EXCLS %d %lld-%lld\n", cst->sharecount,
                                cst->beg_offset, cst->end_offset);
                }
            }
@@ -386,7 +386,7 @@ ccms_lock_redo_match(ccms_cst_t cst, void *arg)
                --cst->sharecount;
                ++cst->modifycount;
                if (ccms_enable >= 9) {
-                       printf("CST MODXL %d %lld-%lld\n", cst->sharecount,
+                       kprintf("CST MODXL %d %lld-%lld\n", cst->sharecount,
                                cst->beg_offset, cst->end_offset);
                }
            }
@@ -439,7 +439,7 @@ ccms_lock_put_match(ccms_cst_t cst, void *arg)
        KKASSERT(cst->sharecount > 0);
        --cst->sharecount;
        if (ccms_enable >= 9) {
-               printf("CST UNSHR %d %lld-%lld (%d)\n", cst->sharecount,
+               kprintf("CST UNSHR %d %lld-%lld (%d)\n", cst->sharecount,
                        cst->beg_offset, cst->end_offset, cst->blocked);
        }
        if (cst->blocked && cst->sharecount == 0) {
@@ -451,7 +451,7 @@ ccms_lock_put_match(ccms_cst_t cst, void *arg)
        KKASSERT(cst->sharecount < 0);
        ++cst->sharecount;
        if (ccms_enable >= 9) {
-               printf("CST UNEXC %d %lld-%lld (%d)\n", cst->sharecount,
+               kprintf("CST UNEXC %d %lld-%lld (%d)\n", cst->sharecount,
                        cst->beg_offset, cst->end_offset, cst->blocked);
        }
        if (cst->blocked && cst->sharecount == 0) {
@@ -464,7 +464,7 @@ ccms_lock_put_match(ccms_cst_t cst, void *arg)
        ++cst->sharecount;
        --cst->modifycount;
        if (ccms_enable >= 9) {
-               printf("CST UNMOD %d %lld-%lld (%d)\n", cst->sharecount,
+               kprintf("CST UNMOD %d %lld-%lld (%d)\n", cst->sharecount,
                        cst->beg_offset, cst->end_offset, cst->blocked);
        }
        if (cst->blocked && cst->sharecount == 0) {
@@ -513,7 +513,7 @@ ccms_lock_put_match(ccms_cst_t cst, void *arg)
                cst->beg_offset = ocst->beg_offset;
                cst->lrefs = ocst->lrefs;
                if (ccms_enable >= 9) {
-                   printf("MERGELEFT %p %lld-%lld (%d)\n", 
+                   kprintf("MERGELEFT %p %lld-%lld (%d)\n", 
                           ocst, cst->beg_offset, cst->end_offset,
                           cst->blocked);
                }
@@ -539,7 +539,7 @@ ccms_lock_put_match(ccms_cst_t cst, void *arg)
                cst->end_offset = ocst->end_offset;
                cst->rrefs = ocst->rrefs;
                if (ccms_enable >= 9) {
-                   printf("MERGERIGHT %p %lld-%lld\n",
+                   kprintf("MERGERIGHT %p %lld-%lld\n",
                           ocst, cst->beg_offset, cst->end_offset);
                }
                objcache_put(ccms_oc, ocst);
index 4a01537..3f2fd86 100644 (file)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/kern_checkpoint.c,v 1.13 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_checkpoint.c,v 1.14 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include <sys/types.h>
@@ -161,14 +161,14 @@ elf_getphdrs(struct file *fp, Elf_Phdr *phdr, size_t nbyte)
        PRINTF(("reading phdrs section\n"));
        if ((error = read_check(fp, phdr, nbyte)) != 0)
                goto done;
-       printf("headers section:\n");
+       kprintf("headers section:\n");
        for (i = 0; i < nheaders; i++) {
-               printf("entry type:   %d\n", phdr[i].p_type);
-               printf("file offset:  %d\n", phdr[i].p_offset);
-               printf("virt address: %p\n", (uint32_t *)phdr[i].p_vaddr);
-               printf("file size:    %d\n", phdr[i].p_filesz);
-               printf("memory size:  %d\n", phdr[i].p_memsz);
-               printf("\n");
+               kprintf("entry type:   %d\n", phdr[i].p_type);
+               kprintf("file offset:  %d\n", phdr[i].p_offset);
+               kprintf("virt address: %p\n", (uint32_t *)phdr[i].p_vaddr);
+               kprintf("file size:    %d\n", phdr[i].p_filesz);
+               kprintf("memory size:  %d\n", phdr[i].p_memsz);
+               kprintf("\n");
        }
  done:
        return error;
@@ -249,7 +249,7 @@ ckpt_thaw_proc(struct proc *p, struct file *fp)
 
        /* fetch signal disposition */
        if ((error = elf_getsigs(p, fp)) != 0) {
-               printf("failure in recovering signals\n");
+               kprintf("failure in recovering signals\n");
                goto done;
        }
 
@@ -778,7 +778,7 @@ checkpoint_signal_handler(struct proc *p)
                error = ckpt_freeze_proc(p, fp);
                fp_close(fp);
        } else {
-               printf("checkpoint failed with open - error: %d\n", error);
+               kprintf("checkpoint failed with open - error: %d\n", error);
        }
        kfree(buf, M_TEMP);
        chptinuse--;
@@ -792,7 +792,7 @@ SYSCTL_STRING(_kern, OID_AUTO, ckptfile, CTLFLAG_RW, ckptfilename,
 /*
  * expand_name(name, uid, pid)
  * Expand the name described in corefilename, using name, uid, and pid.
- * corefilename is a printf-like string, with three format specifiers:
+ * corefilename is a kprintf-like string, with three format specifiers:
  *     %N      name of process ("name")
  *     %P      process id (pid)
  *     %U      user id (uid)
index a727b3f..2e39b06 100644 (file)
@@ -70,7 +70,7 @@
  *
  *     @(#)kern_clock.c        8.5 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/kern_clock.c,v 1.105.2.10 2002/10/17 13:19:40 maxim Exp $
- * $DragonFly: src/sys/kern/kern_clock.c,v 1.54 2006/09/03 18:29:16 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_clock.c,v 1.55 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include "opt_ntp.h"
@@ -770,7 +770,7 @@ tvtohz_high(struct timeval *tv)
                        sec++;
                        usec -= 1000000;
                }
-               printf("tvotohz: negative time difference %ld sec %ld usec\n",
+               kprintf("tvotohz: negative time difference %ld sec %ld usec\n",
                       sec, usec);
 #endif
                ticks = 1;
index 0712965..dcc9304 100644 (file)
@@ -31,7 +31,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_conf.c,v 1.73.2.3 2003/03/10 02:18:25 imp Exp $
- * $DragonFly: src/sys/kern/kern_conf.c,v 1.19 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_conf.c,v 1.20 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -159,7 +159,7 @@ hashdev(struct dev_ops *ops, int x, int y, int allow_intercept)
        if (ops != &dead_dev_ops)
                ++ops->head.refs;
        if (dev_ref_debug) {
-               printf("create    dev %p %s(minor=%08x) refs=%d\n", 
+               kprintf("create    dev %p %s(minor=%08x) refs=%d\n", 
                        si, devtoname(si), uminor(si->si_udev),
                        si->si_refs);
        }
@@ -325,12 +325,12 @@ destroy_dev(cdev_t dev)
                return;
        }
        if (dev_ref_debug) {
-               printf("destroy   dev %p %s(minor=%08x) refs=%d\n", 
+               kprintf("destroy   dev %p %s(minor=%08x) refs=%d\n", 
                        dev, devtoname(dev), uminor(dev->si_udev),
                        dev->si_refs);
        }
        if (dev->si_refs < 2) {
-               printf("destroy_dev(): too few references on device! "
+               kprintf("destroy_dev(): too few references on device! "
                        "%p %s(minor=%08x) refs=%d\n",
                    dev, devtoname(dev), uminor(dev->si_udev),
                    dev->si_refs);
@@ -408,7 +408,7 @@ reference_dev(cdev_t dev)
        if (dev != NOCDEV) {
                ++dev->si_refs;
                if (dev_ref_debug) {
-                       printf("reference dev %p %s(minor=%08x) refs=%d\n", 
+                       kprintf("reference dev %p %s(minor=%08x) refs=%d\n", 
                            dev, devtoname(dev), uminor(dev->si_udev),
                            dev->si_refs);
                }
@@ -432,26 +432,26 @@ release_dev(cdev_t dev)
                KKASSERT(dev->si_refs > 0);
        } else {
                if (dev->si_refs <= 0) {
-                       printf("Warning: extra release of dev %p(%s)\n",
+                       kprintf("Warning: extra release of dev %p(%s)\n",
                            dev, devtoname(dev));
                        free_devt = 0;  /* prevent bad things from occuring */
                }
        }
        --dev->si_refs;
        if (dev_ref_debug) {
-               printf("release   dev %p %s(minor=%08x) refs=%d\n", 
+               kprintf("release   dev %p %s(minor=%08x) refs=%d\n", 
                        dev, devtoname(dev), uminor(dev->si_udev),
                        dev->si_refs);
        }
        if (dev->si_refs == 0) {
                if (dev->si_flags & SI_ADHOC) {
-                       printf("Warning: illegal final release on ADHOC"
+                       kprintf("Warning: illegal final release on ADHOC"
                                " device %p(%s), the device was never"
                                " destroyed!\n",
                                dev, devtoname(dev));
                }
                if (dev->si_flags & SI_HASHED) {
-                       printf("Warning: last release on device, no call"
+                       kprintf("Warning: last release on device, no call"
                                " to destroy_dev() was made! dev %p(%s)\n",
                                dev, devtoname(dev));
                        dev->si_refs = 3;
@@ -459,7 +459,7 @@ release_dev(cdev_t dev)
                        dev->si_refs = 0;
                }
                if (SLIST_FIRST(&dev->si_hlist) != NULL) {
-                       printf("Warning: last release on device, vnode"
+                       kprintf("Warning: last release on device, vnode"
                                " associations still exist! dev %p(%s)\n",
                                dev, devtoname(dev));
                        free_devt = 0;  /* prevent bad things from occuring */
index 186cb45..18be479 100644 (file)
@@ -61,7 +61,7 @@
  * Adopted from:
  *     src/sys/kern/kern_shutdown.c
  *
- * $DragonFly: src/sys/kern/kern_debug.c,v 1.5 2005/08/06 12:09:30 hmp Exp $
+ * $DragonFly: src/sys/kern/kern_debug.c,v 1.6 2006/12/23 00:35:03 swildner Exp $
  *
  */
 
@@ -85,10 +85,10 @@ backtrace(void)
 {
 
 #ifdef DDB
-               printf("Stack backtrace:\n");
+               kprintf("Stack backtrace:\n");
                db_print_backtrace();
 #else
-               printf("Cannot print stack trace.\n");
-               printf("DDB kernel option is needed.\n");
+               kprintf("Cannot print stack trace.\n");
+               kprintf("DDB kernel option is needed.\n");
 #endif
 }
index 5fd0f91..fc08504 100644 (file)
@@ -70,7 +70,7 @@
  *
  *     @(#)kern_descrip.c      8.6 (Berkeley) 4/19/94
  * $FreeBSD: src/sys/kern/kern_descrip.c,v 1.81.2.19 2004/02/28 00:43:31 tegge Exp $
- * $DragonFly: src/sys/kern/kern_descrip.c,v 1.75 2006/10/27 04:56:31 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_descrip.c,v 1.76 2006/12/23 00:35:03 swildner Exp $
  */
 
 #include "opt_compat.h"
@@ -537,7 +537,7 @@ retry:
                if (fdp->fd_files[new].reserved) {
                        spin_unlock_wr(&fdp->fd_spin);
                        fdrop(fp);
-                       printf("Warning: dup(): target descriptor %d is reserved, waiting for it to be resolved\n", new);
+                       kprintf("Warning: dup(): target descriptor %d is reserved, waiting for it to be resolved\n", new);
                        tsleep(fdp, 0, "fdres", hz);
                        goto retry;
                }
@@ -1211,7 +1211,7 @@ falloc(struct proc *p, struct file **resultfp, int *resultfd)
        if (nfiles >= maxfiles - maxfilesrootres &&
            ((p && p->p_ucred->cr_ruid != 0) || nfiles >= maxfiles)) {
                if (ppsratecheck(&lastfail, &curfail, 1)) {
-                       printf("kern.maxfiles limit exceeded by uid %d, please see tuning(7).\n",
+                       kprintf("kern.maxfiles limit exceeded by uid %d, please see tuning(7).\n",
                                (p ? p->p_ucred->cr_ruid : -1));
                }
                error = ENFILE;
index a4c2584..a0ae8b9 100644 (file)
@@ -27,7 +27,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/kern_device.c,v 1.21 2006/09/26 18:57:13 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_device.c,v 1.22 2006/12/23 00:35:04 swildner Exp $
  */
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -406,7 +406,7 @@ dev_ops_add(struct dev_ops *ops, u_int mask, u_int match)
     compile_dev_ops(ops);
     maj = ops->head.maj;
     if (maj < 0 || maj >= NUMCDEVSW) {
-           printf("%s: ERROR: driver has bogus dev_ops->head.maj = %d\n",
+           kprintf("%s: ERROR: driver has bogus dev_ops->head.maj = %d\n",
                   ops->head.name, maj);
            return (EINVAL);
     }
@@ -417,7 +417,7 @@ dev_ops_add(struct dev_ops *ops, u_int mask, u_int match)
             */
            if (link->mask == mask && link->match == match) {
                    if (link->ops != ops) {
-                           printf("WARNING: \"%s\" (%p) is usurping \"%s\"'s"
+                           kprintf("WARNING: \"%s\" (%p) is usurping \"%s\"'s"
                                " (%p) dev_ops_array[]\n",
                                ops->head.name, ops, 
                                link->ops->head.name, link->ops);
@@ -507,7 +507,7 @@ dev_ops_remove(struct dev_ops *ops, u_int mask, u_int match)
        struct dev_ops_link **plink;
      
        if (maj < 0 || maj >= NUMCDEVSW) {
-               printf("%s: ERROR: driver has bogus ops->d_maj = %d\n",
+               kprintf("%s: ERROR: driver has bogus ops->d_maj = %d\n",
                        ops->head.name, maj);
                return EINVAL;
        }
@@ -518,7 +518,7 @@ dev_ops_remove(struct dev_ops *ops, u_int mask, u_int match)
                if (link->mask == mask && link->match == match) {
                        if (link->ops == ops)
                                break;
-                       printf("%s: ERROR: cannot remove from dev_ops_array[], "
+                       kprintf("%s: ERROR: cannot remove from dev_ops_array[], "
                               "its major number %d was stolen by %s\n",
                                ops->head.name, maj,
                                link->ops->head.name
@@ -526,7 +526,7 @@ dev_ops_remove(struct dev_ops *ops, u_int mask, u_int match)
                }
        }
        if (link == NULL) {
-               printf("%s(%d)[%08x/%08x]: WARNING: ops removed "
+               kprintf("%s(%d)[%08x/%08x]: WARNING: ops removed "
                       "multiple times!\n",
                       ops->head.name, maj, mask, match);
        } else {
@@ -535,11 +535,11 @@ dev_ops_remove(struct dev_ops *ops, u_int mask, u_int match)
                kfree(link, M_DEVBUF);
        }
        if (dev_ops_array[maj] == NULL && ops->head.refs != 0) {
-               printf("%s(%d)[%08x/%08x]: Warning: dev_ops_remove() called "
+               kprintf("%s(%d)[%08x/%08x]: Warning: dev_ops_remove() called "
                        "while %d device refs still exist!\n", 
                        ops->head.name, maj, mask, match, ops->head.refs);
        } else {
-               printf("%s: ops removed\n", ops->head.name);
+               kprintf("%s: ops removed\n", ops->head.name);
        }
        return 0;
 }
index 076472e..225ba34 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_event.c,v 1.2.2.10 2004/04/04 07:03:14 cperciva Exp $
- * $DragonFly: src/sys/kern/kern_event.c,v 1.30 2006/09/19 11:47:35 corecode Exp $
+ * $DragonFly: src/sys/kern/kern_event.c,v 1.31 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -486,7 +486,7 @@ kqueue_register(struct kqueue *kq, struct kevent *kev, struct thread *td)
                 * filter attach routine is responsible for insuring that
                 * the identifier can be attached to it.
                 */
-               printf("unknown filter: %d\n", kev->filter);
+               kprintf("unknown filter: %d\n", kev->filter);
                return (EINVAL);
        }
 
index 7078f48..8959e17 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_exec.c,v 1.107.2.15 2002/07/30 15:40:46 nectar Exp $
- * $DragonFly: src/sys/kern/kern_exec.c,v 1.50 2006/11/07 20:48:14 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_exec.c,v 1.51 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -127,11 +127,11 @@ print_execve_args(struct image_args *args)
 
        cp = args->begin_argv;
        for (ndx = 0; ndx < args->argc; ndx++) {
-               printf("\targv[%d]: %s\n", ndx, cp);
+               kprintf("\targv[%d]: %s\n", ndx, cp);
                while (*cp++ != '\0');
        }
        for (ndx = 0; ndx < args->envc; ndx++) {
-               printf("\tenvv[%d]: %s\n", ndx, cp);
+               kprintf("\tenvv[%d]: %s\n", ndx, cp);
                while (*cp++ != '\0');
        }
 }
@@ -154,7 +154,7 @@ kern_execve(struct nlookupdata *nd, struct image_args *args)
        int (*img_first) (struct image_params *);
 
        if (debug_execve_args) {
-               printf("%s()\n", __func__);
+               kprintf("%s()\n", __func__);
                print_execve_args(args);
        }
 
@@ -217,8 +217,8 @@ interpret:
                goto exec_fail_dealloc;
 
        if (debug_execve_args && imgp->interpreted) {
-               printf("    target is interpreted -- recursive pass\n");
-               printf("    interpreter: %s\n", imgp->interpreter_name);
+               kprintf("    target is interpreted -- recursive pass\n");
+               kprintf("    interpreter: %s\n", imgp->interpreter_name);
                print_execve_args(args);
        }
 
index 6985a6b..f1382f0 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_exit.c 8.7 (Berkeley) 2/12/94
  * $FreeBSD: src/sys/kern/kern_exit.c,v 1.92.2.11 2003/01/13 22:51:16 dillon Exp $
- * $DragonFly: src/sys/kern/kern_exit.c,v 1.65 2006/11/07 17:51:23 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_exit.c,v 1.66 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_compat.h"
@@ -122,7 +122,7 @@ exit1(int rv)
        struct exitlist *ep;
 
        if (p->p_pid == 1) {
-               printf("init died (signal %d, exit %d)\n",
+               kprintf("init died (signal %d, exit %d)\n",
                    WTERMSIG(rv), WEXITSTATUS(rv));
                panic("Going nowhere without my init!");
        }
@@ -624,7 +624,7 @@ at_exit(exitlist_fn function)
 #ifdef INVARIANTS
        /* Be noisy if the programmer has lost track of things */
        if (rm_at_exit(function)) 
-               printf("WARNING: exit callout entry (%p) already present\n",
+               kprintf("WARNING: exit callout entry (%p) already present\n",
                    function);
 #endif
        ep = kmalloc(sizeof(*ep), M_ATEXIT, M_NOWAIT);
index afde5ce..efabfd4 100644 (file)
@@ -30,7 +30,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/kern_firmware.c,v 1.6 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_firmware.c,v 1.7 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -163,12 +163,12 @@ firmware_image_load_file(const char *image_name)
 
        if (fp_stat(fp, &ub) != 0) {
                if (bootverbose)
-                       printf("fp_stat on firmware image %s failed: %d\n",
+                       kprintf("fp_stat on firmware image %s failed: %d\n",
                               fw_path, error);
                goto fail_stat;
        }
        if (ub.st_size > SIZE_T_MAX) {
-               printf("firmware image %s is too large\n", fw_path);
+               kprintf("firmware image %s is too large\n", fw_path);
                goto fail_stat;
        }
 
@@ -179,7 +179,7 @@ firmware_image_load_file(const char *image_name)
 
        error = fp_read(fp, img->fw_image, img->fw_imglen, &nread, 1);
        if (error != 0 || nread != img->fw_imglen) {
-               printf("firmware image could not be read: %d\n", error);
+               kprintf("firmware image could not be read: %d\n", error);
                 goto fail_read;
        }
        fp_close(fp);
index fb096b8..61bfb6a 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_fork.c 8.6 (Berkeley) 4/8/94
  * $FreeBSD: src/sys/kern/kern_fork.c,v 1.72.2.14 2003/06/26 04:15:10 silby Exp $
- * $DragonFly: src/sys/kern/kern_fork.c,v 1.59 2006/10/20 17:02:16 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_fork.c,v 1.60 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_ktrace.h"
@@ -233,7 +233,7 @@ fork1(struct lwp *lp1, int flags, struct proc **procp)
        uid = p1->p_ucred->cr_ruid;
        if ((nprocs >= maxproc - 10 && uid != 0) || nprocs >= maxproc) {
                if (ppsratecheck(&lastfail, &curfail, 1))
-                       printf("maxproc limit exceeded by uid %d, please "
+                       kprintf("maxproc limit exceeded by uid %d, please "
                               "see tuning(7) and login.conf(5).\n", uid);
                tsleep(&forksleep, 0, "fork", hz / 2);
                error = EAGAIN;
@@ -257,7 +257,7 @@ fork1(struct lwp *lp1, int flags, struct proc **procp)
                 */
                nprocs--;
                if (ppsratecheck(&lastfail, &curfail, 1))
-                       printf("maxproc limit exceeded by uid %d, please "
+                       kprintf("maxproc limit exceeded by uid %d, please "
                               "see tuning(7) and login.conf(5).\n", uid);
                tsleep(&forksleep, 0, "fork", hz / 2);
                error = EAGAIN;
@@ -553,7 +553,7 @@ at_fork(forklist_fn function)
 #ifdef INVARIANTS
        /* let the programmer know if he's been stupid */
        if (rm_at_fork(function)) {
-               printf("WARNING: fork callout entry (%p) already present\n",
+               kprintf("WARNING: fork callout entry (%p) already present\n",
                    function);
        }
 #endif
index 35e81bd..d958d82 100644 (file)
@@ -24,7 +24,7 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_intr.c,v 1.24.2.1 2001/10/14 20:05:50 luigi Exp $
- * $DragonFly: src/sys/kern/kern_intr.c,v 1.44 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_intr.c,v 1.45 2006/12/23 00:35:04 swildner Exp $
  *
  */
 
@@ -286,7 +286,7 @@ register_int(int intr, inthand2_t *handler, void *arg, const char *name,
      */
     if (intr < FIRST_SOFTINT /* && info->i_slow + info->i_fast == 1*/) {
        if (machintr_vector_setup(intr, intr_flags))
-           printf("machintr_vector_setup: failed on irq %d\n", intr);
+           kprintf("machintr_vector_setup: failed on irq %d\n", intr);
     }
 
     return(rec);
@@ -356,7 +356,7 @@ unregister_int(void *id)
        kfree(rec->name, M_DEVBUF);
        kfree(rec, M_DEVBUF);
     } else {
-       printf("warning: unregister_int: int %d handler for %s not found\n",
+       kprintf("warning: unregister_int: int %d handler for %s not found\n",
                intr, ((intrec_t)id)->name);
     }
 }
@@ -487,7 +487,7 @@ sched_ithd(int intr)
     ++info->i_count;
     if (info->i_state != ISTATE_NOTHREAD) {
        if (info->i_reclist == NULL) {
-           printf("sched_ithd: stray interrupt %d\n", intr);
+           kprintf("sched_ithd: stray interrupt %d\n", intr);
        } else {
 #ifdef SMP
            if (info->i_thread.td_gd == mycpu) {
@@ -509,7 +509,7 @@ sched_ithd(int intr)
 #endif
        }
     } else {
-       printf("sched_ithd: stray interrupt %d\n", intr);
+       kprintf("sched_ithd: stray interrupt %d\n", intr);
     }
 }
 
@@ -826,7 +826,7 @@ ithread_handler(void *arg)
             * Otherwise we are livelocked.  Set up a periodic systimer
             * to wake the thread up at the limit frequency.
             */
-           printf("intr %d at %d > %d hz, livelocked limit engaged!\n",
+           kprintf("intr %d at %d > %d hz, livelocked limit engaged!\n",
                   intr, ill_count, livelock_limit);
            info->i_state = ISTATE_LIVELOCKED;
            if ((use_limit = livelock_limit) < 100)
@@ -857,7 +857,7 @@ ithread_handler(void *arg)
                    if (++lcount >= hz) {
                        info->i_state = ISTATE_NORMAL;
                        systimer_del(&ill_timer);
-                       printf("intr %d at %d < %d hz, livelock removed\n",
+                       kprintf("intr %d at %d < %d hz, livelock removed\n",
                               intr, ill_count, livelock_lowater);
                    }
                } else {
index 7c5e1fe..ec53df2 100644 (file)
@@ -62,7 +62,7 @@
  * SUCH DAMAGE.
  */
 /*
- * $DragonFly: src/sys/kern/kern_ktr.c,v 1.19 2006/12/18 20:41:01 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_ktr.c,v 1.20 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * Kernel tracepoint facility.
@@ -480,13 +480,13 @@ ktr_write_entry(struct ktr_info *info, const char *file, int line,
 #ifdef KTR_VERBOSE
        if (ktr_verbose && info->kf_format) {
 #ifdef SMP
-               printf("cpu%d ", cpu);
+               kprintf("cpu%d ", cpu);
 #endif
                if (ktr_verbose > 1) {
-                       printf("%s.%d\t", entry->ktr_file, entry->ktr_line);
+                       kprintf("%s.%d\t", entry->ktr_file, entry->ktr_line);
                }
                kvprintf(info->kf_format, ptr);
-               printf("\n");
+               kprintf("\n");
        }
 #endif
 }
index f37de2e..58c3b08 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_linker.c,v 1.41.2.3 2001/11/21 17:50:35 luigi Exp $
- * $DragonFly: src/sys/kern/kern_linker.c,v 1.31 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_linker.c,v 1.32 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_ddb.h"
@@ -114,7 +114,7 @@ linker_file_sysinit(linker_file_t lf)
            moddata = (*sipp)->udata;
            error = module_register(moddata, lf);
            if (error) {
-               printf("linker_file_sysinit \"%s\" failed to register! %d\n",
+               kprintf("linker_file_sysinit \"%s\" failed to register! %d\n",
                    lf->filename, error);
                return error;
            }
@@ -453,7 +453,7 @@ linker_file_unload(linker_file_t file)
             mod; 
             mod = module_getfnext(mod)
        ) {
-           printf("linker_file_unload: module %p still has refs!\n", mod);
+           kprintf("linker_file_unload: module %p still has refs!\n", mod);
        }
        --file->refs;
     }
@@ -758,7 +758,7 @@ sys_kldunload(struct kldunload_args *uap)
     if (lf) {
        KLD_DPF(FILE, ("kldunload: lf->userrefs=%d\n", lf->userrefs));
        if (lf->userrefs == 0) {
-           printf("linkerunload: attempt to unload file that was loaded by the kernel\n");
+           kprintf("linkerunload: attempt to unload file that was loaded by the kernel\n");
            error = EBUSY;
            goto out;
        }
@@ -1004,11 +1004,11 @@ linker_preload(void* arg)
        modname = (char *)preload_search_info(modptr, MODINFO_NAME);
        modtype = (char *)preload_search_info(modptr, MODINFO_TYPE);
        if (modname == NULL) {
-           printf("Preloaded module at %p does not have a name!\n", modptr);
+           kprintf("Preloaded module at %p does not have a name!\n", modptr);
            continue;
        }
        if (modtype == NULL) {
-           printf("Preloaded module at %p does not have a type!\n", modptr);
+           kprintf("Preloaded module at %p does not have a type!\n", modptr);
            continue;
        }
 
@@ -1016,12 +1016,12 @@ linker_preload(void* arg)
         * This is a hack at the moment, but what's in FreeBSD-5 is even 
         * worse so I'd rather the hack.
         */
-       printf("Preloaded %s \"%s\" at %p", modtype, modname, modptr);
+       kprintf("Preloaded %s \"%s\" at %p", modtype, modname, modptr);
        if (find_mod_metadata(modname)) {
-           printf(" (ignored, already in static kernel)\n");
+           kprintf(" (ignored, already in static kernel)\n");
            continue;
        }
-       printf(".\n");
+       kprintf(".\n");
 
        lf = linker_find_file_by_name(modname);
        if (lf) {
@@ -1051,7 +1051,7 @@ linker_preload(void* arg)
                        moddata = (*sipp)->udata;
                        error = module_register(moddata, lf);
                        if (error)
-                           printf("Preloaded %s \"%s\" failed to register: %d\n",
+                           kprintf("Preloaded %s \"%s\" failed to register: %d\n",
                                modtype, modname, error);
                    }
                }
index b18f9da..eba6ebd 100644 (file)
@@ -39,7 +39,7 @@
  *
  *     @(#)kern_lock.c 8.18 (Berkeley) 5/21/95
  * $FreeBSD: src/sys/kern/kern_lock.c,v 1.31.2.3 2001/12/25 01:44:44 dillon Exp $
- * $DragonFly: src/sys/kern/kern_lock.c,v 1.24 2006/08/11 01:54:59 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_lock.c,v 1.25 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_lint.h"
@@ -185,7 +185,7 @@ debuglockmgr(struct lock *lkp, u_int flags,
                                lkp->lk_wmesg, ((int **)&lkp)[-1]);
                            didpanic = 0;
                    } else {
-                           printf(
+                           kprintf(
                                "lockmgr %s from %p: called from interrupt\n",
                                lkp->lk_wmesg, ((int **)&lkp)[-1]);
                    }
@@ -197,7 +197,7 @@ debuglockmgr(struct lock *lkp, u_int flags,
                                lkp->lk_wmesg, file, line);
                            didpanic = 0;
                    } else {
-                           printf(
+                           kprintf(
                                "lockmgr %s from %s:%d: called from interrupt\n",
                                lkp->lk_wmesg, file, line);
                    }
@@ -577,13 +577,13 @@ lockmgr_printinfo(struct lock *lkp)
                p = NULL;
 
        if (lkp->lk_sharecount)
-               printf(" lock type %s: SHARED (count %d)", lkp->lk_wmesg,
+               kprintf(" lock type %s: SHARED (count %d)", lkp->lk_wmesg,
                    lkp->lk_sharecount);
        else if (lkp->lk_flags & LK_HAVE_EXCL)
-               printf(" lock type %s: EXCL (count %d) by td %p pid %d",
+               kprintf(" lock type %s: EXCL (count %d) by td %p pid %d",
                    lkp->lk_wmesg, lkp->lk_exclusivecount, td,
                    p ? p->p_pid : -99);
        if (lkp->lk_waitcount > 0)
-               printf(" with %d pending", lkp->lk_waitcount);
+               kprintf(" with %d pending", lkp->lk_waitcount);
 }
 
index 47d3931..5ceed71 100644 (file)
@@ -38,7 +38,7 @@
  *
  *     @(#)ufs_lockf.c 8.3 (Berkeley) 1/6/94
  * $FreeBSD: src/sys/kern/kern_lockf.c,v 1.25 1999/11/16 16:28:56 phk Exp $
- * $DragonFly: src/sys/kern/kern_lockf.c,v 1.35 2006/12/18 20:41:01 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_lockf.c,v 1.36 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -846,7 +846,7 @@ _lf_printf(const char *ctl, ...)
 
        if (lf_print_ranges) {
            if ((p = curproc) != NULL)
-               printf("pid %d (%s): ", p->p_pid, p->p_comm);
+               kprintf("pid %d (%s): ", p->p_pid, p->p_comm);
        }
        __va_start(va, ctl);
        kvprintf(ctl, va);
@@ -867,16 +867,16 @@ _lf_print_lock(const struct lockf *lock)
                lf_printf("lockf %p:\n", lock);
        }
        TAILQ_FOREACH(range, &lock->lf_range, lf_link)
-               printf("\t%lld..%lld type %s owned by %d\n",
+               kprintf("\t%lld..%lld type %s owned by %d\n",
                       range->lf_start, range->lf_end,
                       range->lf_type == F_RDLCK ? "shared" : "exclusive",
                       range->lf_flags & F_POSIX ? range->lf_owner->p_pid : -1);
        if (TAILQ_EMPTY(&lock->lf_blocked))
-               printf("no process waiting for range\n");
+               kprintf("no process waiting for range\n");
        else
-               printf("blocked locks:");
+               kprintf("blocked locks:");
        TAILQ_FOREACH(range, &lock->lf_blocked, lf_link)
-               printf("\t%lld..%lld type %s waiting on %p\n",
+               kprintf("\t%lld..%lld type %s waiting on %p\n",
                       range->lf_start, range->lf_end,
                       range->lf_type == F_RDLCK ? "shared" : "exclusive",
                       range);
index eb752d3..f2dd57f 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_module.c,v 1.21 1999/11/08 06:53:30 peter Exp $
- * $DragonFly: src/sys/kern/kern_module.c,v 1.12 2006/09/05 03:48:12 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_module.c,v 1.13 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -111,7 +111,7 @@ module_register_init(const void *arg)
     if (error) {
        MOD_EVENT(mod, MOD_UNLOAD);
        module_release(mod);
-       printf("module_register_init: MOD_LOAD (%s, %lx, %p) error %d\n",
+       kprintf("module_register_init: MOD_LOAD (%s, %lx, %p) error %d\n",
               data->name, (u_long)(uintfptr_t)data->evhand, data->priv, error);
     }
 }
@@ -124,7 +124,7 @@ module_register(const moduledata_t *data, linker_file_t container)
 
     newmod = module_lookupbyname(data->name);
     if (newmod != NULL) {
-       printf("module_register: module %s already exists!\n", data->name);
+       kprintf("module_register: module %s already exists!\n", data->name);
        return EEXIST;
     }
     namelen = strlen(data->name) + 1;
index ba7d566..622076a 100644 (file)
@@ -29,7 +29,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/kern_objcache.c,v 1.14 2006/12/17 19:28:30 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_objcache.c,v 1.15 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -843,7 +843,7 @@ objcache_timer(void *dummy)
                                depot_disassociate(depot, &tmplist);
                                depot->magcapacity *= 2;
                                spin_unlock_wr(&depot->spin);
-                               printf("objcache_timer: increasing cache %s"
+                               kprintf("objcache_timer: increasing cache %s"
                                       " magsize to %d, contested %d times\n",
                                    oc->name, depot->magcapacity,
                                    depot->contested);
index 2903ec5..aa9b960 100644 (file)
@@ -17,7 +17,7 @@
  *    are met.
  *
  * $FreeBSD: src/sys/kern/kern_physio.c,v 1.46.2.4 2003/11/14 09:51:47 simokawa Exp $
- * $DragonFly: src/sys/kern/kern_physio.c,v 1.23 2006/09/10 01:26:39 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_physio.c,v 1.24 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -56,7 +56,7 @@ physio(cdev_t dev, struct uio *uio, int ioflag)
 
        /* XXX: sanity check */
        if(dev->si_iosize_max < PAGE_SIZE) {
-               printf("WARNING: %s si_iosize_max=%d, using DFLTPHYS.\n",
+               kprintf("WARNING: %s si_iosize_max=%d, using DFLTPHYS.\n",
                    devtoname(dev), dev->si_iosize_max);
                dev->si_iosize_max = DFLTPHYS;
        }
index 554bedd..9ad4dfa 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/kern_poll.c,v 1.2.2.4 2002/06/27 23:26:33 luigi Exp $
- * $DragonFly: src/sys/kern/kern_poll.c,v 1.23 2006/10/23 21:50:33 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_poll.c,v 1.24 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_polling.h"
@@ -496,7 +496,7 @@ ether_poll_register(struct ifnet *ifp)
                 */
                static int verbose = 10 ;
                if (verbose >0) {
-                       printf("poll handlers list full, "
+                       kprintf("poll handlers list full, "
                                "maybe a broken driver ?\n");
                        verbose--;
                }
@@ -535,7 +535,7 @@ ether_poll_deregister(struct ifnet *ifp)
        ifp->if_flags &= ~IFF_POLLING; /* found or not... */
        if (i == poll_handlers) {
                crit_exit();
-               printf("ether_poll_deregister: ifp not found!!!\n");
+               kprintf("ether_poll_deregister: ifp not found!!!\n");
                return 0;
        }
        poll_handlers--;
@@ -561,6 +561,6 @@ emergency_poll_enable(const char *name)
 {
        if (polling_enabled == 0) {
                polling_enabled = 1;
-               printf("%s forced polling on\n", name);
+               kprintf("%s forced polling on\n", name);
        }
 }
index 912f939..3eac78c 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)kern_proc.c 8.7 (Berkeley) 2/14/95
  * $FreeBSD: src/sys/kern/kern_proc.c,v 1.63.2.9 2003/05/08 07:47:16 kbyanc Exp $
- * $DragonFly: src/sys/kern/kern_proc.c,v 1.29 2006/10/10 15:40:46 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_proc.c,v 1.30 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -577,16 +577,16 @@ DB_SHOW_COMMAND(pgrpdump, pgrpdump)
 
        for (i = 0; i <= pgrphash; i++) {
                if (!LIST_EMPTY(&pgrphashtbl[i])) {
-                       printf("\tindx %d\n", i);
+                       kprintf("\tindx %d\n", i);
                        LIST_FOREACH(pgrp, &pgrphashtbl[i], pg_hash) {
-                               printf(
+                               kprintf(
                        "\tpgrp %p, pgid %ld, sess %p, sesscnt %d, mem %p\n",
                                    (void *)pgrp, (long)pgrp->pg_id,
                                    (void *)pgrp->pg_session,
                                    pgrp->pg_session->s_count,
                                    (void *)LIST_FIRST(&pgrp->pg_members));
                                LIST_FOREACH(p, &pgrp->pg_members, p_pglist) {
-                                       printf("\t\tpid %ld addr %p pgrp %p\n", 
+                                       kprintf("\t\tpid %ld addr %p pgrp %p\n", 
                                            (long)p->p_pid, (void *)p,
                                            (void *)p->p_pgrp);
                                }
index 0c8cd48..b716ca0 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_resource.c     8.5 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/kern_resource.c,v 1.55.2.5 2001/11/03 01:41:08 ps Exp $
- * $DragonFly: src/sys/kern/kern_resource.c,v 1.28 2006/06/05 07:26:10 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_resource.c,v 1.29 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_compat.h"
@@ -497,10 +497,10 @@ uifree(struct uidinfo *uip)
 {
        if (uip->ui_sbsize != 0)
                /* XXX no %qd in kernel.  Truncate. */
-               printf("freeing uidinfo: uid = %d, sbsize = %ld\n",
+               kprintf("freeing uidinfo: uid = %d, sbsize = %ld\n",
                    uip->ui_uid, (long)uip->ui_sbsize);
        if (uip->ui_proccnt != 0)
-               printf("freeing uidinfo: uid = %d, proccnt = %ld\n",
+               kprintf("freeing uidinfo: uid = %d, proccnt = %ld\n",
                    uip->ui_uid, uip->ui_proccnt);
        LIST_REMOVE(uip, ui_hash);
        varsymset_clean(&uip->ui_varsymset);
@@ -541,7 +541,7 @@ chgproccnt(struct uidinfo *uip, int diff, int max)
                return (0);
        uip->ui_proccnt += diff;
        if (uip->ui_proccnt < 0)
-               printf("negative proccnt for uid = %d\n", uip->ui_uid);
+               kprintf("negative proccnt for uid = %d\n", uip->ui_uid);
        return (1);
 }
 
@@ -563,7 +563,7 @@ chgsbsize(struct uidinfo *uip, u_long *hiwat, u_long to, rlim_t max)
        uip->ui_sbsize = new;
        *hiwat = to;
        if (uip->ui_sbsize < 0)
-               printf("negative sbsize for uid = %d\n", uip->ui_uid);
+               kprintf("negative sbsize for uid = %d\n", uip->ui_uid);
        crit_exit();
        return (1);
 }
index 3753b05..508b555 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_shutdown.c     8.3 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/kern_shutdown.c,v 1.72.2.12 2002/02/21 19:15:10 dillon Exp $
- * $DragonFly: src/sys/kern/kern_shutdown.c,v 1.43 2006/12/18 20:41:01 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_shutdown.c,v 1.44 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_ddb.h"
@@ -215,24 +215,24 @@ print_uptime()
        struct timespec ts;
 
        getnanouptime(&ts);
-       printf("Uptime: ");
+       kprintf("Uptime: ");
        f = 0;
        if (ts.tv_sec >= 86400) {
-               printf("%ldd", ts.tv_sec / 86400);
+               kprintf("%ldd", ts.tv_sec / 86400);
                ts.tv_sec %= 86400;
                f = 1;
        }
        if (f || ts.tv_sec >= 3600) {
-               printf("%ldh", ts.tv_sec / 3600);
+               kprintf("%ldh", ts.tv_sec / 3600);
                ts.tv_sec %= 3600;
                f = 1;
        }
        if (f || ts.tv_sec >= 60) {
-               printf("%ldm", ts.tv_sec / 60);
+               kprintf("%ldm", ts.tv_sec / 60);
                ts.tv_sec %= 60;
                f = 1;
        }
-       printf("%lds\n", ts.tv_sec);
+       kprintf("%lds\n", ts.tv_sec);
 }
 
 /*
@@ -260,10 +260,10 @@ boot(int howto)
         * can't power-down the box otherwise.
         */
        if (smp_active_mask > 1) {
-               printf("boot() called on cpu#%d\n", mycpu->gd_cpuid);
+               kprintf("boot() called on cpu#%d\n", mycpu->gd_cpuid);
        }
        if (panicstr == NULL && mycpu->gd_cpuid != 0) {
-               printf("Switching to cpu #0 for shutdown\n");
+               kprintf("Switching to cpu #0 for shutdown\n");
                lwkt_setcpu_self(globaldata_find(0));
        }
 #endif
@@ -292,7 +292,7 @@ boot(int howto)
                int iter, nbusy, pbusy;
 
                waittime = 0;
-               printf("\nsyncing disks... ");
+               kprintf("\nsyncing disks... ");
 
                sys_sync(NULL); /* YYY was sync(&proc0, NULL). why proc0 ? */
 
@@ -305,7 +305,7 @@ boot(int howto)
                        nbusy = scan_all_buffers(shutdown_busycount1, NULL);
                        if (nbusy == 0)
                                break;
-                       printf("%d ", nbusy);
+                       kprintf("%d ", nbusy);
                        if (nbusy < pbusy)
                                iter = 0;
                        pbusy = nbusy;
@@ -319,7 +319,7 @@ boot(int howto)
                        sys_sync(NULL); /* YYY was sync(&proc0, NULL). why proc0 ? */
                        tsleep(boot, 0, "shutdn", hz * iter / 20 + 1);
                }
-               printf("\n");
+               kprintf("\n");
                /*
                 * Count only busy local buffers to prevent forcing 
                 * a fsck if we're just a client of a wedged NFS server
@@ -330,13 +330,13 @@ boot(int howto)
                         * Failed to sync all blocks. Indicate this and don't
                         * unmount filesystems (thus forcing an fsck on reboot).
                         */
-                       printf("giving up on %d buffers\n", nbusy);
+                       kprintf("giving up on %d buffers\n", nbusy);
 #ifdef DDB
                        Debugger("busy buffer problem");
 #endif /* DDB */
                        tsleep(boot, 0, "shutdn", hz * 5 + 1);
                } else {
-                       printf("done\n");
+                       kprintf("done\n");
                        /*
                         * Unmount filesystems
                         */
@@ -388,7 +388,7 @@ shutdown_busycount2(struct buf *bp, void *info)
                        return (0);
                }
 #if defined(SHOW_BUSYBUFS) || defined(DIAGNOSTIC)
-               printf(
+               kprintf(
            "%p dev:?, flags:%08x, loffset:%lld, doffset:%lld\n",
                    bp, 
                    bp->b_flags, bp->b_loffset,
@@ -406,9 +406,9 @@ static void
 shutdown_halt(void *junk, int howto)
 {
        if (howto & RB_HALT) {
-               printf("\n");
-               printf("The operating system has halted.\n");
-               printf("Please press any key to reboot.\n\n");
+               kprintf("\n");
+               kprintf("The operating system has halted.\n");
+               kprintf("Please press any key to reboot.\n\n");
                switch (cngetc()) {
                case -1:                /* No console, just die */
                        cpu_halt();
@@ -432,7 +432,7 @@ shutdown_panic(void *junk, int howto)
        if (howto & RB_DUMP) {
                if (PANIC_REBOOT_WAIT_TIME != 0) {
                        if (PANIC_REBOOT_WAIT_TIME != -1) {
-                               printf("Automatic reboot in %d seconds - "
+                               kprintf("Automatic reboot in %d seconds - "
                                       "press a key on the console to abort\n",
                                        PANIC_REBOOT_WAIT_TIME);
                                for (loop = PANIC_REBOOT_WAIT_TIME * 10;
@@ -448,8 +448,8 @@ shutdown_panic(void *junk, int howto)
                } else { /* zero time specified - reboot NOW */
                        return;
                }
-               printf("--> Press a key on the console to reboot,\n");
-               printf("--> or switch off the system now.\n");
+               kprintf("--> Press a key on the console to reboot,\n");
+               kprintf("--> or switch off the system now.\n");
                cngetc();
        }
 }
@@ -460,8 +460,8 @@ shutdown_panic(void *junk, int howto)
 static void
 shutdown_reset(void *junk, int howto)
 {
-       printf("Rebooting...\n");
-       DELAY(1000000); /* wait 1 sec for printf's to complete and be read */
+       kprintf("Rebooting...\n");
+       DELAY(1000000); /* wait 1 sec for kprintf's to complete and be read */
        /* cpu_boot(howto); */ /* doesn't do anything at the moment */
        cpu_reset();
        /* NOTREACHED */ /* assuming reset worked */
@@ -607,7 +607,7 @@ dumpsys(void)
        savectx(&dumppcb);
        dumpthread = curthread;
        if (dumping++) {
-               printf("Dump already in progress, bailing...\n");
+               kprintf("Dump already in progress, bailing...\n");
                return;
        }
        if (!dodump)
@@ -615,42 +615,42 @@ dumpsys(void)
        if (dumpdev == NOCDEV)
                return;
        dumpsize = Maxmem;
-       printf("\ndumping to dev %s, offset %ld\n", devtoname(dumpdev), dumplo);
-       printf("dump ");
+       kprintf("\ndumping to dev %s, offset %ld\n", devtoname(dumpdev), dumplo);
+       kprintf("dump ");
        error = dev_ddump(dumpdev);
        if (error == 0) {
-               printf("succeeded\n");
+               kprintf("succeeded\n");
                return;
        }
-       printf("failed, reason: ");
+       kprintf("failed, reason: ");
        switch (error) {
        case ENOSYS:
        case ENODEV:
-               printf("device doesn't support a dump routine\n");
+               kprintf("device doesn't support a dump routine\n");
                break;
 
        case ENXIO:
-               printf("device bad\n");
+               kprintf("device bad\n");
                break;
 
        case EFAULT:
-               printf("device not ready\n");
+               kprintf("device not ready\n");
                break;
 
        case EINVAL:
-               printf("area improper\n");
+               kprintf("area improper\n");
                break;
 
        case EIO:
-               printf("i/o error\n");
+               kprintf("i/o error\n");
                break;
 
        case EINTR:
-               printf("aborted from console\n");
+               kprintf("aborted from console\n");
                break;
 
        default:
-               printf("unknown, error = %d\n", error);
+               kprintf("unknown, error = %d\n", error);
                break;
        }
 }
@@ -665,13 +665,13 @@ dumpstatus(vm_offset_t addr, off_t count)
                if (wdog_tickler)
                        (*wdog_tickler)();
 #endif   
-               printf("%ld ", (long)(count / (1024 * 1024)));
+               kprintf("%ld ", (long)(count / (1024 * 1024)));
        }
 
        if ((c = cncheckc()) == 0x03)
                return -1;
        else if (c != -1)
-               printf("[CTRL-C to abort] ");
+               kprintf("[CTRL-C to abort] ");
        
        return 0;
 }
@@ -692,7 +692,7 @@ panic(const char *fmt, ...)
        /*
         * If a panic occurs on multiple cpus before the first is able to
         * halt the other cpus, only one cpu is allowed to take the panic.
-        * Attempt to be verbose about this situation but if the printf() 
+        * Attempt to be verbose about this situation but if the kprintf() 
         * itself panics don't let us overrun the kernel stack.
         *
         * Be very nasty about descheduling our thread at the lowest
@@ -709,7 +709,7 @@ panic(const char *fmt, ...)
                crit_enter();
                ++mycpu->gd_trap_nesting_level;
                if (mycpu->gd_trap_nesting_level < 25) {
-                       printf("SECONDARY PANIC ON CPU %d THREAD %p\n",
+                       kprintf("SECONDARY PANIC ON CPU %d THREAD %p\n",
                                mycpu->gd_cpuid, curthread);
                }
                curthread->td_release = NULL;   /* be a grinch */
@@ -738,12 +738,12 @@ panic(const char *fmt, ...)
        if (panicstr == fmt)
                panicstr = buf;
        __va_end(ap);
-       printf("panic: %s\n", buf);
+       kprintf("panic: %s\n", buf);
 #ifdef SMP
        /* three separate prints in case of an unmapped page and trap */
-       printf("mp_lock = %08x; ", mp_lock);
-       printf("cpuid = %d; ", mycpu->gd_cpuid);
-       printf("lapic.id = %08x\n", lapic.id);
+       kprintf("mp_lock = %08x; ", mp_lock);
+       kprintf("cpuid = %d; ", mycpu->gd_cpuid);
+       kprintf("lapic.id = %08x\n", lapic.id);
 #endif
 
 #if defined(DDB)
@@ -797,16 +797,16 @@ shutdown_kproc(void *arg, int howto)
 
        td = (struct thread *)arg;
        if ((p = td->td_proc) != NULL) {
-           printf("Waiting (max %d seconds) for system process `%s' to stop...",
+           kprintf("Waiting (max %d seconds) for system process `%s' to stop...",
                kproc_shutdown_wait, p->p_comm);
        } else {
-           printf("Waiting (max %d seconds) for system thread %s to stop...",
+           kprintf("Waiting (max %d seconds) for system thread %s to stop...",
                kproc_shutdown_wait, td->td_comm);
        }
        error = suspend_kproc(td, kproc_shutdown_wait * hz);
 
        if (error == EWOULDBLOCK)
-               printf("timed out\n");
+               kprintf("timed out\n");
        else
-               printf("stopped\n");
+               kprintf("stopped\n");
 }
index 71de599..2928465 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)kern_sig.c  8.7 (Berkeley) 4/18/94
  * $FreeBSD: src/sys/kern/kern_sig.c,v 1.72.2.17 2003/05/16 16:34:34 obrien Exp $
- * $DragonFly: src/sys/kern/kern_sig.c,v 1.57 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_sig.c,v 1.58 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_ktrace.h"
@@ -795,7 +795,7 @@ ksignal(struct proc *p, int sig)
        sig_t action;
 
        if (sig > _SIG_MAXSIG || sig <= 0) {
-               printf("ksignal: signal %d\n", sig);
+               kprintf("ksignal: signal %d\n", sig);
                panic("ksignal signal number");
        }
 
@@ -1361,7 +1361,7 @@ issignal(struct proc *p)
                                 * Are you sure you want to ignore SIGSEGV
                                 * in init? XXX
                                 */
-                               printf("Process (pid %lu) got signal %d\n",
+                               kprintf("Process (pid %lu) got signal %d\n",
                                        (u_long)p->p_pid, sig);
 #endif
                                break;          /* == ignore */
@@ -1418,7 +1418,7 @@ issignal(struct proc *p)
                         */
                        if ((prop & SA_CONT) == 0 &&
                            (p->p_flag & P_TRACED) == 0)
-                               printf("issignal\n");
+                               kprintf("issignal\n");
                        break;          /* == ignore */
 
                default:
@@ -1568,7 +1568,7 @@ SYSCTL_STRING(_kern, OID_AUTO, corefile, CTLFLAG_RW, corefilename,
 /*
  * expand_name(name, uid, pid)
  * Expand the name described in corefilename, using name, uid, and pid.
- * corefilename is a printf-like string, with three format specifiers:
+ * corefilename is a kprintf-like string, with three format specifiers:
  *     %N      name of process ("name")
  *     %P      process id (pid)
  *     %U      user id (uid)
index d48726f..e51374e 100644 (file)
@@ -33,7 +33,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/kern_slaballoc.c,v 1.43 2006/09/11 20:25:01 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_slaballoc.c,v 1.44 2006/12/23 00:35:04 swildner Exp $
  *
  * This module implements a slab allocator drop-in replacement for the
  * kernel malloc().
@@ -243,7 +243,7 @@ kmeminit(void *dummy)
        weirdary[i] = WEIRD_ADDR;
 
     if (bootverbose)
-       printf("Slab ZoneSize set to %dKB\n", ZoneSize / 1024);
+       kprintf("Slab ZoneSize set to %dKB\n", ZoneSize / 1024);
 }
 
 /*
@@ -301,7 +301,7 @@ malloc_uninit(void *data)
     for (i = ttl = 0; i < ncpus; ++i)
        ttl += type->ks_memuse[i];
     if (ttl) {
-       printf("malloc_uninit: %ld bytes of '%s' still allocated on cpu %d\n",
+       kprintf("malloc_uninit: %ld bytes of '%s' still allocated on cpu %d\n",
            ttl, type->ks_shortdesc, i);
     }
 #endif
index d38ee5d..64b8754 100644 (file)
@@ -29,7 +29,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/kern_spinlock.c,v 1.8 2006/09/22 16:47:09 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_spinlock.c,v 1.9 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -269,7 +269,7 @@ exponential_backoff(struct exponential_backoff *bo)
 
        count = sys_cputimer->count();
        if (count - bo->base > sys_cputimer->freq) {
-               printf("spin_lock: %p, indefinite wait!\n", bo->mtx);
+               kprintf("spin_lock: %p, indefinite wait!\n", bo->mtx);
                if (panicstr)
                        return (TRUE);
 #if defined(INVARIANTS) && defined(DDB)
index 57fb3b5..ec0cf2b 100644 (file)
@@ -38,7 +38,7 @@
  *
  *     @(#)kern_sysctl.c       8.4 (Berkeley) 4/14/94
  * $FreeBSD: src/sys/kern/kern_sysctl.c,v 1.92.2.9 2003/05/01 22:48:09 trhodes Exp $
- * $DragonFly: src/sys/kern/kern_sysctl.c,v 1.24 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_sysctl.c,v 1.25 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -115,7 +115,7 @@ sysctl_register_oid_int(struct sysctl_oid *oidp)
                if ((p->oid_kind & CTLTYPE) == CTLTYPE_NODE)
                        p->oid_refcnt++;
                else
-                       printf("can't re-use a leaf (%s)!\n", p->oid_name);
+                       kprintf("can't re-use a leaf (%s)!\n", p->oid_name);
                return;
        }
 
@@ -180,7 +180,7 @@ sysctl_unregister_oid_int(struct sysctl_oid *oidp)
         * being unloaded afterwards.  It should not be a panic()
         * for normal use.
         */
-       printf("%s: failed to unregister sysctl\n", __func__);
+       kprintf("%s: failed to unregister sysctl\n", __func__);
 }
 
 /* Initialize a new context to keep track of dynamically added sysctls. */
@@ -333,7 +333,7 @@ sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse)
        if (oidp == NULL)
                return(EINVAL);
        if ((oidp->oid_kind & CTLFLAG_DYN) == 0) {
-               printf("can't remove non-dynamic nodes!\n");
+               kprintf("can't remove non-dynamic nodes!\n");
                return (EINVAL);
        }
        sysctl_lock(LK_EXCLUSIVE | LK_CANRECURSE);
@@ -365,7 +365,7 @@ sysctl_remove_oid(struct sysctl_oid *oidp, int del, int recurse)
                oidp->oid_refcnt--;
        } else {
                if (oidp->oid_refcnt == 0) {
-                       printf("Warning: bad oid_refcnt=%u (%s)!\n",
+                       kprintf("Warning: bad oid_refcnt=%u (%s)!\n",
                               oidp->oid_refcnt, oidp->oid_name);
                        sysctl_unlock();
                        return(EINVAL);
@@ -411,7 +411,7 @@ sysctl_add_oid(struct sysctl_ctx_list *clist, struct sysctl_oid_list *parent,
                        sysctl_unlock();
                        return (oidp);
                } else {
-                       printf("can't re-use a leaf (%s)!\n", name);
+                       kprintf("can't re-use a leaf (%s)!\n", name);
                        sysctl_unlock();
                        return (NULL);
                }
@@ -483,7 +483,7 @@ SYSINIT(sysctl, SI_SUB_KMEM, SI_ORDER_ANY, sysctl_register_all, 0);
  * (be aware though, that the proper interface isn't as obvious as it
  * may seem, there are various conflicting requirements.
  *
- * {0,0}       printf the entire MIB-tree.
+ * {0,0}       kprintf the entire MIB-tree.
  * {0,1,...}   return the name of the "..." OID.
  * {0,2,...}   return the next OID.
  * {0,3}       return the OID of the name in "new"
@@ -500,30 +500,30 @@ sysctl_sysctl_debug_dump_node(struct sysctl_oid_list *l, int i)
        SLIST_FOREACH(oidp, l, oid_link) {
 
                for (k=0; k<i; k++)
-                       printf(" ");
+                       kprintf(" ");
 
-               printf("%d %s ", oidp->oid_number, oidp->oid_name);
+               kprintf("%d %s ", oidp->oid_number, oidp->oid_name);
 
-               printf("%c%c",
+               kprintf("%c%c",
                        oidp->oid_kind & CTLFLAG_RD ? 'R':' ',
                        oidp->oid_kind & CTLFLAG_WR ? 'W':' ');
 
                if (oidp->oid_handler)
-                       printf(" *Handler");
+                       kprintf(" *Handler");
 
                switch (oidp->oid_kind & CTLTYPE) {
                        case CTLTYPE_NODE:
-                               printf(" Node\n");
+                               kprintf(" Node\n");
                                if (!oidp->oid_handler) {
                                        sysctl_sysctl_debug_dump_node(
                                                oidp->oid_arg1, i+2);
                                }
                                break;
-                       case CTLTYPE_INT:    printf(" Int\n"); break;
-                       case CTLTYPE_STRING: printf(" String\n"); break;
-                       case CTLTYPE_QUAD:   printf(" Quad\n"); break;
-                       case CTLTYPE_OPAQUE: printf(" Opaque/struct\n"); break;
-                       default:             printf("\n");
+                       case CTLTYPE_INT:    kprintf(" Int\n"); break;
+                       case CTLTYPE_STRING: kprintf(" String\n"); break;
+                       case CTLTYPE_QUAD:   kprintf(" Quad\n"); break;
+                       case CTLTYPE_OPAQUE: kprintf(" Opaque/struct\n"); break;
+                       default:             kprintf("\n");
                }
 
        }
index 6439bc8..4f907a7 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/kern_syslink.c,v 1.3 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_syslink.c,v 1.4 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * This module implements the syslink() system call and protocol which
@@ -647,7 +647,7 @@ static
 int
 process_syslink_msg(struct sldata *sldata, struct syslink_msg *head)
 {
-    printf("process syslink msg %08x %04x\n", head->msgid, head->cid);
+    kprintf("process syslink msg %08x %04x\n", head->msgid, head->cid);
     return(0);
 }
 
index 0e89bc4..91c5efd 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)kern_time.c 8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/kern/kern_time.c,v 1.68.2.1 2002/10/01 08:00:41 bde Exp $
- * $DragonFly: src/sys/kern/kern_time.c,v 1.36 2006/09/03 18:29:16 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_time.c,v 1.37 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -113,7 +113,7 @@ settime(tv)
                        timevalsub(&tv2, &maxtime);
                        if (tv2.tv_sec < -1) {
                                tv->tv_sec = maxtime.tv_sec - 1;
-                               printf("Time adjustment clamped to -1 second\n");
+                               kprintf("Time adjustment clamped to -1 second\n");
                        }
                } else {
                        if (tv1.tv_sec == laststep.tv_sec) {
@@ -122,7 +122,7 @@ settime(tv)
                        }
                        if (delta.tv_sec > 1) {
                                tv->tv_sec = tv1.tv_sec + 1;
-                               printf("Time adjustment clamped to +1 second\n");
+                               kprintf("Time adjustment clamped to +1 second\n");
                        }
                        laststep = *tv;
                }
index aa7cdfd..9cf03fd 100644 (file)
@@ -70,7 +70,7 @@
  *
  *     From: @(#)kern_clock.c  8.5 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/kern_timeout.c,v 1.59.2.1 2001/11/13 18:24:52 archie Exp $
- * $DragonFly: src/sys/kern/kern_timeout.c,v 1.23 2006/11/07 18:50:06 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_timeout.c,v 1.24 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * DRAGONFLY BGL STATUS
@@ -420,7 +420,7 @@ callout_reset(struct callout *c, int to_ticks, void (*ftn)(void *),
 #ifdef INVARIANTS
         if ((c->c_flags & CALLOUT_DID_INIT) == 0) {
                callout_init(c);
-               printf(
+               kprintf(
                    "callout_reset(%p) from %p: callout was not initialized\n",
                    c, ((int **)&c)[-1]);
 #ifdef DDB
@@ -471,7 +471,7 @@ callout_stop(struct callout *c)
 #ifdef INVARIANTS
         if ((c->c_flags & CALLOUT_DID_INIT) == 0) {
                callout_init(c);
-               printf(
+               kprintf(
                    "callout_stop(%p) from %p: callout was not initialized\n",
                    c, ((int **)&c)[-1]);
 #ifdef DDB
index 37c6497..759a4c8 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/kern_usched.c,v 1.6 2006/09/03 17:43:59 dillon Exp $
+ * $DragonFly: src/sys/kern/kern_usched.c,v 1.7 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/errno.h>
@@ -65,7 +65,7 @@ usched_init(void)
                return(&usched_bsd4);
        if (strcmp(defsched, "bsd4") == 0)
                return(&usched_bsd4);
-       printf("WARNING: Running dummy userland scheduler\n");
+       kprintf("WARNING: Running dummy userland scheduler\n");
        return(&usched_dummy);
 }
 
index b6fdc35..d66b12b 100644 (file)
@@ -30,7 +30,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/subr_mchain.c,v 1.2.2.2 2002/04/13 12:46:40 bp Exp $
- * $DragonFly: src/sys/kern/libmchain/subr_mchain.c,v 1.4 2005/06/07 19:06:08 hsu Exp $
+ * $DragonFly: src/sys/kern/libmchain/subr_mchain.c,v 1.5 2006/12/23 00:35:05 swildner Exp $
  */
 
 
 
 MODULE_VERSION(libmchain, 1);
 
-#define MBERROR(format, args...) printf("%s(%d): "format, __func__ , \
+#define MBERROR(format, args...) kprintf("%s(%d): "format, __func__ , \
                                    __LINE__ ,## args)
 
-#define MBPANIC(format, args...) printf("%s(%d): "format, __func__ , \
+#define MBPANIC(format, args...) kprintf("%s(%d): "format, __func__ , \
                                    __LINE__ ,## args)
 
 /*
index bc223e5..60f2db6 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/link_aout.c,v 1.26 1999/12/24 15:33:36 bde Exp $
- * $DragonFly: src/sys/kern/link_aout.c,v 1.20 2006/09/05 03:48:12 dillon Exp $
+ * $DragonFly: src/sys/kern/link_aout.c,v 1.21 2006/12/23 00:35:04 swildner Exp $
  */
 
 #define FREEBSD_AOUT   1
@@ -208,7 +208,7 @@ link_aout_load_file(const char* filename, linker_file_t* result)
     KKASSERT(p != NULL);
 
     if (p->p_ucred == NULL) {
-       printf("link_aout_load_file: cannot load '%s' from filesystem"
+       kprintf("link_aout_load_file: cannot load '%s' from filesystem"
                " this early\n", filename);
        return ENOENT;
     }
@@ -377,7 +377,7 @@ read_relocation(struct relocation_info* r, char* addr)
     else if (length == 2)
        return *(u_int*) addr;
     else
-       printf("link_aout: unsupported relocation size %d\n", r->r_length);
+       kprintf("link_aout: unsupported relocation size %d\n", r->r_length);
     return 0;
 }
 
@@ -392,7 +392,7 @@ write_relocation(struct relocation_info* r, char* addr, long value)
     else if (length == 2)
        *(u_int*) addr = value;
     else
-       printf("link_aout: unsupported relocation size %d\n", r->r_length);
+       kprintf("link_aout: unsupported relocation size %d\n", r->r_length);
 }
 
 static int
@@ -426,13 +426,13 @@ relocate_file(linker_file_t lf)
            sym = &stringbase[np->nz_strx];
 
            if (sym[0] != '_') {
-               printf("link_aout: bad symbol name %s\n", sym);
-               printf("link_aout: symbol %s not found\n", sym);
+               kprintf("link_aout: bad symbol name %s\n", sym);
+               kprintf("link_aout: symbol %s not found\n", sym);
                return ENOENT;
            } else {
                if (linker_file_lookup_symbol(lf, sym + 1,
                    (np->nz_type != (N_SETV+N_EXT)), (caddr_t *)&relocation)) {
-                       printf("link_aout: symbol %s not found\n", sym);
+                       kprintf("link_aout: symbol %s not found\n", sym);
                        return ENOENT;
                }
            }
@@ -440,7 +440,7 @@ relocate_file(linker_file_t lf)
            relocation += read_relocation(r, addr);
 
            if (r->r_jmptable) {
-               printf("link_aout: can't cope with jump table relocations\n");
+               kprintf("link_aout: can't cope with jump table relocations\n");
                continue;
            }
 
@@ -448,7 +448,7 @@ relocate_file(linker_file_t lf)
                relocation -= (intptr_t) af->address;
 
            if (r->r_copy) {
-               printf("link_aout: can't cope with copy relocations\n");
+               kprintf("link_aout: can't cope with copy relocations\n");
                continue;
            }
            
index d1f32f0..7e07ae0 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/link_elf.c,v 1.24 1999/12/24 15:33:36 bde Exp $
- * $DragonFly: src/sys/kern/link_elf.c,v 1.23 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/link_elf.c,v 1.24 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -207,7 +207,7 @@ parse_module_symbols(linker_file_t lf)
     base += roundup(symcnt, sizeof(long));
 
     if (base > esym || base < ssym) {
-       printf("Symbols are corrupt!\n");
+       kprintf("Symbols are corrupt!\n");
        return EINVAL;
     }
 
@@ -217,7 +217,7 @@ parse_module_symbols(linker_file_t lf)
     base += roundup(strcnt, sizeof(long));
 
     if (base > esym || base < ssym) {
-       printf("Symbols are corrupt!\n");
+       kprintf("Symbols are corrupt!\n");
        return EINVAL;
     }
 
@@ -317,7 +317,7 @@ parse_dynamic(linker_file_t lf)
 static void
 link_elf_error(const char *s)
 {
-    printf("kldload: %s\n", s);
+    kprintf("kldload: %s\n", s);
 }
 
 static int
@@ -420,7 +420,7 @@ link_elf_load_file(const char* filename, linker_file_t* result)
 
     KKASSERT(p != NULL);
     if (p->p_ucred == NULL) {
-       printf("link_elf_load_file: cannot load '%s' from filesystem"
+       kprintf("link_elf_load_file: cannot load '%s' from filesystem"
                " this early\n", filename);
        return ENOENT;
     }
@@ -802,7 +802,7 @@ relocate_file(linker_file_t lf)
        while (rel < rellim) {
            symname = symbol_name(ef, rel->r_info);
            if (elf_reloc(lf, rel, ELF_RELOC_REL, symname)) {
-               printf("link_elf: symbol %s undefined\n", symname);
+               kprintf("link_elf: symbol %s undefined\n", symname);
                return ENOENT;
            }
            rel++;
@@ -816,7 +816,7 @@ relocate_file(linker_file_t lf)
        while (rela < relalim) {
            symname = symbol_name(ef, rela->r_info);
            if (elf_reloc(lf, rela, ELF_RELOC_RELA, symname)) {
-               printf("link_elf: symbol %s undefined\n", symname);
+               kprintf("link_elf: symbol %s undefined\n", symname);
                return ENOENT;
            }
            rela++;
@@ -830,7 +830,7 @@ relocate_file(linker_file_t lf)
        while (rel < rellim) {
            symname = symbol_name(ef, rel->r_info);
            if (elf_reloc(lf, rel, ELF_RELOC_REL, symname)) {
-               printf("link_elf: symbol %s undefined\n", symname);
+               kprintf("link_elf: symbol %s undefined\n", symname);
                return ENOENT;
            }
            rel++;
@@ -844,7 +844,7 @@ relocate_file(linker_file_t lf)
        while (rela < relalim) {
            symname = symbol_name(ef, rela->r_info);
            if (elf_reloc(lf, rela, ELF_RELOC_RELA, symname)) {
-               printf("link_elf: symbol %s undefined\n", symname);
+               kprintf("link_elf: symbol %s undefined\n", symname);
                return ENOENT;
            }
            rela++;
@@ -890,13 +890,13 @@ link_elf_lookup_symbol(linker_file_t lf, const char* name, c_linker_sym_t* sym)
 
     while (symnum != STN_UNDEF) {
        if (symnum >= ef->nchains) {
-           printf("link_elf_lookup_symbol: corrupt symbol table\n");
+           kprintf("link_elf_lookup_symbol: corrupt symbol table\n");
            return ENOENT;
        }
 
        symp = ef->symtab + symnum;
        if (symp->st_name == 0) {
-           printf("link_elf_lookup_symbol: corrupt symbol table\n");
+           kprintf("link_elf_lookup_symbol: corrupt symbol table\n");
            return ENOENT;
        }
 
index 325f8d1..bb4c28b 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/lwkt_caps.c,v 1.10 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/lwkt_caps.c,v 1.11 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -893,7 +893,7 @@ caps_process_msg(caps_kinfo_t caps, caps_kmsg_t msg, struct caps_sys_get_args *u
                            min(msg->km_xio.xio_bytes, uap->maxsize));
        if (error) {
            if (msg->km_mcaps->ci_td && msg->km_mcaps->ci_td->td_proc) {
-               printf("xio_copy_xtou: error %d from proc %d\n", 
+               kprintf("xio_copy_xtou: error %d from proc %d\n", 
                        error, msg->km_mcaps->ci_td->td_proc->p_pid);
            }
            if (msgsize > uap->maxsize)
index 0b5778f..25584a1 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/lwkt_ipiq.c,v 1.18 2006/11/07 18:50:06 dillon Exp $
+ * $DragonFly: src/sys/kern/lwkt_ipiq.c,v 1.19 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -403,7 +403,7 @@ lwkt_wait_ipiq(globaldata_t target, int seq)
                lwkt_process_ipiq();
                crit_exit();
                if (--maxc == 0)
-                       printf("LWKT_WAIT_IPIQ WARNING! %d wait %d (%d)\n", mycpu->gd_cpuid, target->gd_cpuid, ip->ip_xindex - seq);
+                       kprintf("LWKT_WAIT_IPIQ WARNING! %d wait %d (%d)\n", mycpu->gd_cpuid, target->gd_cpuid, ip->ip_xindex - seq);
                if (maxc < -1000000)
                        panic("LWKT_WAIT_IPIQ");
                /*
index eb7c342..e220a67 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.103 2006/12/18 20:41:01 dillon Exp $
+ * $DragonFly: src/sys/kern/lwkt_thread.c,v 1.104 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -488,7 +488,7 @@ lwkt_switch(void)
            gd->gd_trap_nesting_level = 0;
            if ((td->td_flags & TDF_PANICWARN) == 0) {
                td->td_flags |= TDF_PANICWARN;
-               printf("Warning: thread switch from interrupt or IPI, "
+               kprintf("Warning: thread switch from interrupt or IPI, "
                        "thread %p (%s)\n", td, td->td_comm);
 #ifdef DDB
                db_print_backtrace();
@@ -543,7 +543,7 @@ lwkt_switch(void)
     mpheld = MP_LOCK_HELD();
 #ifdef INVARIANTS
     if (td->td_cscount) {
-       printf("Diagnostic: attempt to switch while mastering cpusync: %p\n",
+       kprintf("Diagnostic: attempt to switch while mastering cpusync: %p\n",
                td);
        if (panic_on_cscount)
            panic("switching while mastering cpusync");
@@ -1305,7 +1305,7 @@ lwkt_exit(void)
     globaldata_t gd;
 
     if (td->td_flags & TDF_VERBOSE)
-       printf("kthread %p %s has exited\n", td, td->td_comm);
+       kprintf("kthread %p %s has exited\n", td, td->td_comm);
     caps_exit(td);
     crit_enter_quick(td);
     lwkt_deschedule_self(td);
index 2cc6f7e..ccd0def 100644 (file)
@@ -42,7 +42,7 @@
  *     @(#)subr_autoconf.c     8.1 (Berkeley) 6/10/93
  *
  * $FreeBSD: src/sys/kern/subr_autoconf.c,v 1.14 1999/10/05 21:19:41 n_hibma Exp $
- * $DragonFly: src/sys/kern/subr_autoconf.c,v 1.7 2005/02/07 23:32:26 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_autoconf.c,v 1.8 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -82,9 +82,9 @@ run_interrupt_driven_config_hooks(void *dummy)
        while (!TAILQ_EMPTY(&intr_config_hook_list)) {
                if (waiting >= 20) {
                        crit_enter();
-                       printf("**WARNING** waiting for the following device to finish configuring:\n");
+                       kprintf("**WARNING** waiting for the following device to finish configuring:\n");
                        TAILQ_FOREACH(hook_entry, &intr_config_hook_list, ich_links) {
-                           printf("  %s:\tfunc=%p arg=%p\n",
+                           kprintf("  %s:\tfunc=%p arg=%p\n",
                                (hook_entry->ich_desc ?
                                    hook_entry->ich_desc : "?"),
                                hook_entry->ich_func,
@@ -92,7 +92,7 @@ run_interrupt_driven_config_hooks(void *dummy)
                        }
                        crit_exit();
                        if (waiting >= 60) {
-                               printf("Giving up, interrupt routing is probably hosed\n");
+                               kprintf("Giving up, interrupt routing is probably hosed\n");
                                break;
                        }
                }
@@ -119,7 +119,7 @@ config_intrhook_establish(struct intr_config_hook *hook)
                if (hook_entry == hook)
                        break;
        if (hook_entry != NULL) {
-               printf("config_intrhook_establish: establishing an "
+               kprintf("config_intrhook_establish: establishing an "
                       "already established hook.\n");
                return (1);
        }
index 725f4c3..7d91f51 100644 (file)
@@ -90,7 +90,7 @@
  *     This code can be compiled stand-alone for debugging.
  *
  * $FreeBSD: src/sys/kern/subr_blist.c,v 1.5.2.2 2003/01/12 09:23:12 dillon Exp $
- * $DragonFly: src/sys/kern/subr_blist.c,v 1.6 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_blist.c,v 1.7 2006/12/23 00:35:04 swildner Exp $
  */
 
 #ifdef _KERNEL
@@ -194,14 +194,14 @@ blist_create(daddr_t blocks)
        bl->bl_root = kmalloc(sizeof(blmeta_t) * bl->bl_rootblks, M_SWAP, M_WAITOK);
 
 #if defined(BLIST_DEBUG)
-       printf(
+       kprintf(
                "BLIST representing %d blocks (%d MB of swap)"
                ", requiring %dK of ram\n",
                bl->bl_blocks,
                bl->bl_blocks * 4 / 1024,
                (bl->bl_rootblks * sizeof(blmeta_t) + 1023) / 1024
        );
-       printf("BLIST raw radix tree contains %d records\n", bl->bl_rootblks);
+       kprintf("BLIST raw radix tree contains %d records\n", bl->bl_rootblks);
 #endif
        blst_radix_init(bl->bl_root, bl->bl_radix, bl->bl_skip, blocks);
 
@@ -292,9 +292,9 @@ blist_resize(blist_t *pbl, daddr_t count, int freenew)
 void
 blist_print(blist_t bl)
 {
-       printf("BLIST {\n");
+       kprintf("BLIST {\n");
        blst_radix_print(bl->bl_root, 0, bl->bl_radix, bl->bl_skip, 4);
-       printf("}\n");
+       kprintf("}\n");
 }
 
 #endif
@@ -537,7 +537,7 @@ blst_meta_free(
        int next_skip = ((u_int)skip / BLIST_META_RADIX);
 
 #if 0
-       printf("FREE (%x,%d) FROM (%x,%d)\n",
+       kprintf("FREE (%x,%d) FROM (%x,%d)\n",
            freeBlk, count,
            blk, radix
        );
@@ -795,7 +795,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab)
        int lastState = 0;
 
        if (radix == BLIST_BMAP_RADIX) {
-               printf(
+               kprintf(
                    "%*.*s(%04x,%d): bitmap %08x big=%d\n", 
                    tab, tab, "",
                    blk, radix,
@@ -806,7 +806,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab)
        }
 
        if (scan->u.bmu_avail == 0) {
-               printf(
+               kprintf(
                    "%*.*s(%04x,%d) ALL ALLOCATED\n",
                    tab, tab, "",
                    blk,
@@ -815,7 +815,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab)
                return;
        }
        if (scan->u.bmu_avail == radix) {
-               printf(
+               kprintf(
                    "%*.*s(%04x,%d) ALL FREE\n",
                    tab, tab, "",
                    blk,
@@ -824,7 +824,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab)
                return;
        }
 
-       printf(
+       kprintf(
            "%*.*s(%04x,%d): subtree (%d/%d) big=%d {\n",
            tab, tab, "",
            blk, radix,
@@ -839,7 +839,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab)
 
        for (i = 1; i <= skip; i += next_skip) {
                if (scan[i].bm_bighint == (daddr_t)-1) {
-                       printf(
+                       kprintf(
                            "%*.*s(%04x,%d): Terminator\n",
                            tab, tab, "",
                            blk, radix
@@ -858,7 +858,7 @@ blst_radix_print(blmeta_t *scan, daddr_t blk, daddr_t radix, int skip, int tab)
        }
        tab -= 4;
 
-       printf(
+       kprintf(
            "%*.*s}\n",
            tab, tab, ""
        );
@@ -894,7 +894,7 @@ main(int ac, char **av)
                daddr_t count = 0;
 
 
-               printf("%d/%d/%d> ", bl->bl_free, size, bl->bl_radix);
+               kprintf("%d/%d/%d> ", bl->bl_free, size, bl->bl_radix);
                fflush(stdout);
                if (fgets(buf, sizeof(buf), stdin) == NULL)
                        break;
@@ -903,7 +903,7 @@ main(int ac, char **av)
                        if (sscanf(buf + 1, "%d", &count) == 1) {
                                blist_resize(&bl, count, 1);
                        } else {
-                               printf("?\n");
+                               kprintf("?\n");
                        }
                case 'p':
                        blist_print(bl);
@@ -911,16 +911,16 @@ main(int ac, char **av)
                case 'a':
                        if (sscanf(buf + 1, "%d", &count) == 1) {
                                daddr_t blk = blist_alloc(bl, count);
-                               printf("    R=%04x\n", blk);
+                               kprintf("    R=%04x\n", blk);
                        } else {
-                               printf("?\n");
+                               kprintf("?\n");
                        }
                        break;
                case 'f':
                        if (sscanf(buf + 1, "%x %d", &da, &count) == 2) {
                                blist_free(bl, da, count);
                        } else {
-                               printf("?\n");
+                               kprintf("?\n");
                        }
                        break;
                case '?':
@@ -934,7 +934,7 @@ main(int ac, char **av)
                        );
                        break;
                default:
-                       printf("?\n");
+                       kprintf("?\n");
                        break;
                }
        }
index 83bc8ce..5121bed 100644 (file)
@@ -24,7 +24,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/subr_bus.c,v 1.54.2.9 2002/10/10 15:13:32 jhb Exp $
- * $DragonFly: src/sys/kern/subr_bus.c,v 1.34 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_bus.c,v 1.35 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_bus.h"
@@ -48,7 +48,7 @@
 MALLOC_DEFINE(M_BUS, "bus", "Bus data structures");
 
 #ifdef BUS_DEBUG
-#define PDEBUG(a)      (printf("%s:%d: ", __func__, __LINE__), printf a, printf("\n"))
+#define PDEBUG(a)      (kprintf("%s:%d: ", __func__, __LINE__), kprintf a, kprintf("\n"))
 #define DEVICENAME(d)  ((d)? device_get_name(d): "no device")
 #define DRIVERNAME(d)  ((d)? d->name : "no driver")
 #define DEVCLANAME(d)  ((d)? d->name : "no devclass")
@@ -56,7 +56,7 @@ MALLOC_DEFINE(M_BUS, "bus", "Bus data structures");
 /* Produce the indenting, indent*2 spaces plus a '.' ahead of that to 
  * prevent syslog from deleting initial spaces
  */
-#define indentprintf(p)        do { int iJ; printf("."); for (iJ=0; iJ<indent; iJ++) printf("  "); printf p ; } while(0)
+#define indentprintf(p)        do { int iJ; kprintf("."); for (iJ=0; iJ<indent; iJ++) kprintf("  "); kprintf p ; } while(0)
 
 static void    print_device_short(device_t dev, int indent);
 static void    print_device(device_t dev, int indent);
@@ -378,7 +378,7 @@ devclass_alloc_unit(devclass_t dc, int *unitp)
                if (unit >= 0 && unit < dc->maxunit &&
                    dc->devices[unit] != NULL) {
                        if (bootverbose)
-                               printf("%s-: %s%d exists, using next available unit number\n",
+                               kprintf("%s-: %s%d exists, using next available unit number\n",
                                       dc->name, dc->name, unit);
                        /* find the next available slot */
                        while (++unit < dc->maxunit && dc->devices[unit] != NULL)
@@ -480,7 +480,7 @@ make_device(device_t parent, const char *name, int unit)
        if (name != NULL) {
                dc = devclass_find_internal(name, NULL, TRUE);
                if (!dc) {
-                       printf("make_device: can't find device class %s\n", name);
+                       kprintf("make_device: can't find device class %s\n", name);
                        return(NULL);
                }
        } else
@@ -809,9 +809,9 @@ device_print_prettyname(device_t dev)
        const char *name = device_get_name(dev);
 
        if (name == 0)
-               return printf("unknown: ");
+               return kprintf("unknown: ");
        else
-               return printf("%s%d: ", name, device_get_unit(dev));
+               return kprintf("%s%d: ", name, device_get_unit(dev));
 }
 
 int
@@ -1002,7 +1002,7 @@ device_set_devclass(device_t dev, const char *classname)
        }
 
        if (dev->devclass) {
-               printf("device_set_devclass: device class already set\n");
+               kprintf("device_set_devclass: device class already set\n");
                return(EINVAL);
        }
 
@@ -1058,7 +1058,7 @@ device_probe_and_attach(device_t dev)
        if ((dev->flags & DF_ENABLED) == 0) {
                if (bootverbose) {
                        device_print_prettyname(dev);
-                       printf("not probed (disabled)\n");
+                       kprintf("not probed (disabled)\n");
                }
                return(0);
        }
@@ -1080,10 +1080,10 @@ device_probe_and_attach(device_t dev)
        if (bootverbose && !device_is_quiet(dev)) {
                device_t tmp;
 
-               printf("%s", device_get_nameunit(dev));
+               kprintf("%s", device_get_nameunit(dev));
                for (tmp = dev->parent; tmp; tmp = tmp->parent)
-                       printf(".%s", device_get_nameunit(tmp));
-               printf("\n");
+                       kprintf(".%s", device_get_nameunit(tmp));
+               kprintf("\n");
        }
        if (!device_is_quiet(dev))
                device_print_child(bus, dev);
@@ -1093,7 +1093,7 @@ device_probe_and_attach(device_t dev)
                if (bootverbose && !device_is_quiet(dev))
                        device_print_child(bus, dev);
        } else {
-               printf("device_probe_and_attach: %s%d attach returned %d\n",
+               kprintf("device_probe_and_attach: %s%d attach returned %d\n",
                       dev->driver->name, dev->unit, error);
                /* Unset the class that was set in device_probe_child */
                if (!hasclass)
@@ -1590,12 +1590,12 @@ resource_cfgload(void *dummy __unused)
                        error = resource_create(name, unit, resname, type,
                                                &res);
                        if (error) {
-                               printf("create resource %s%d: error %d\n",
+                               kprintf("create resource %s%d: error %d\n",
                                        name, unit, error);
                                continue;
                        }
                        if (res->type != type) {
-                               printf("type mismatch %s%d: %d != %d\n",
+                               kprintf("type mismatch %s%d: %d != %d\n",
                                        name, unit, res->type, type);
                                continue;
                        }
@@ -1788,14 +1788,14 @@ resource_list_print_type(struct resource_list *rl, const char *name, int type,
        SLIST_FOREACH(rle, rl, link) {
                if (rle->type == type) {
                        if (printed == 0)
-                               retval += printf(" %s ", name);
+                               retval += kprintf(" %s ", name);
                        else
-                               retval += printf(",");
+                               retval += kprintf(",");
                        printed++;
-                       retval += printf(format, rle->start);
+                       retval += kprintf(format, rle->start);
                        if (rle->count > 1) {
-                               retval += printf("-");
-                               retval += printf(format, rle->start +
+                               retval += kprintf("-");
+                               retval += kprintf(format, rle->start +
                                                 rle->count - 1);
                        }
                }
@@ -1945,12 +1945,12 @@ bus_print_child_header(device_t dev, device_t child)
        if (device_get_desc(child))
                retval += device_printf(child, "<%s>", device_get_desc(child));
        else
-               retval += printf("%s", device_get_nameunit(child));
+               retval += kprintf("%s", device_get_nameunit(child));
        if (bootverbose) {
                if (child->state != DS_ATTACHED)
-                       printf(" [tentative]");
+                       kprintf(" [tentative]");
                else
-                       printf(" [attached!]");
+                       kprintf(" [attached!]");
        }
        return(retval);
 }
@@ -1958,7 +1958,7 @@ bus_print_child_header(device_t dev, device_t child)
 int
 bus_print_child_footer(device_t dev, device_t child)
 {
-       return(printf(" on %s\n", device_get_nameunit(dev)));
+       return(kprintf(" on %s\n", device_get_nameunit(dev)));
 }
 
 device_t
@@ -2704,7 +2704,7 @@ print_devclass_list_short(void)
 {
        devclass_t dc;
 
-       printf("Short listing of devclasses, drivers & devices:\n");
+       kprintf("Short listing of devclasses, drivers & devices:\n");
        TAILQ_FOREACH(dc, &devclasses, link) {
                print_devclass_short(dc, 0);
        }
@@ -2715,7 +2715,7 @@ print_devclass_list(void)
 {
        devclass_t dc;
 
-       printf("Full listing of devclasses, drivers & devices:\n");
+       kprintf("Full listing of devclasses, drivers & devices:\n");
        TAILQ_FOREACH(dc, &devclasses, link) {
                print_devclass(dc, 0);
        }
index 040899b..e3d6d87 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/subr_devstat.c,v 1.17.2.2 2000/08/03 00:09:32 ps Exp $
- * $DragonFly: src/sys/kern/subr_devstat.c,v 1.3 2006/04/30 17:22:17 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_devstat.c,v 1.4 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -112,7 +112,7 @@ devstat_add_entry(struct devstat *ds, const char *dev_name,
                                } else {
                                        STAILQ_INSERT_TAIL(devstat_head,
                                                           ds, dev_links);
-                                       printf("devstat_add_entry: HELP! "
+                                       kprintf("devstat_add_entry: HELP! "
                                               "sorting problem detected "
                                               "for %s%d\n", dev_name,
                                               unit_number);
@@ -224,7 +224,7 @@ devstat_end_transaction(struct devstat *ds, u_int32_t bytes,
                /* Add our busy time to the total busy time. */
                timevaladd(&ds->busy_time, &busy_time);
        } else if (ds->busy_count < 0)
-               printf("devstat_end_transaction: HELP!! busy_count "
+               kprintf("devstat_end_transaction: HELP!! busy_count "
                       "for %s%d is < 0 (%d)!\n", ds->device_name,
                       ds->unit_number, ds->busy_count);
 }
index ae17396..6b64f26 100644 (file)
@@ -77,7 +77,7 @@
  *     @(#)ufs_disksubr.c      8.5 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/subr_disk.c,v 1.20.2.6 2001/10/05 07:14:57 peter Exp $
  * $FreeBSD: src/sys/ufs/ufs/ufs_disksubr.c,v 1.44.2.3 2001/03/05 05:42:19 obrien Exp $
- * $DragonFly: src/sys/kern/subr_disk.c,v 1.26 2006/09/10 01:26:39 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_disk.c,v 1.27 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -750,9 +750,9 @@ hp0g: hard error reading fsbn 12345 of 12344-12347 (hp0 bn %d cn %d tn %d sn %d)
  * if the offset of the error in the transfer and a disk label
  * are both available.  blkdone should be -1 if the position of the error
  * is unknown; the disklabel pointer may be null from drivers that have not
- * been converted to use them.  The message is printed with printf
+ * been converted to use them.  The message is printed with kprintf
  * if pri is LOG_PRINTF, otherwise it uses log at the specified priority.
- * The message should be completed (with at least a newline) with printf
+ * The message should be completed (with at least a newline) with kprintf
  * or addlog, respectively.  There is no trailing space.
  */
 void
@@ -767,10 +767,10 @@ diskerr(struct bio *bio, cdev_t dev, const char *what, int pri,
        char *sname;
 
        sname = dsname(dev, unit, slice, part, partname);
-       printf("%s%s: %s %sing ", sname, partname, what,
+       kprintf("%s%s: %s %sing ", sname, partname, what,
              (bp->b_cmd == BUF_CMD_READ) ? "read" : "writ");
-       printf("offset %012llx for %d", bio->bio_offset, bp->b_bcount);
+       kprintf("offset %012llx for %d", bio->bio_offset, bp->b_bcount);
        if (donecnt)
-               printf(" (%d bytes completed)", donecnt);
+               kprintf(" (%d bytes completed)", donecnt);
 }
 
index 36b2056..22c2378 100644 (file)
@@ -36,7 +36,7 @@
  *     from: @(#)ufs_disksubr.c        7.16 (Berkeley) 5/4/91
  *     from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
  * $FreeBSD: src/sys/kern/subr_diskmbr.c,v 1.45 2000/01/28 10:22:07 bde Exp $
- * $DragonFly: src/sys/kern/subr_diskmbr.c,v 1.17 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_diskmbr.c,v 1.18 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -53,7 +53,7 @@
 #include <sys/syslog.h>
 #include <sys/device.h>
 
-#define TRACE(str)     do { if (dsi_debug) printf str; } while (0)
+#define TRACE(str)     do { if (dsi_debug) kprintf str; } while (0)
 
 static volatile u_char dsi_debug;
 
@@ -160,15 +160,15 @@ check_part(char *sname, struct dos_partition *dp, u_long offset,
 
        error = (ssector == ssector1 && esector == esector1) ? 0 : EINVAL;
        if (bootverbose)
-               printf("%s: type 0x%x, start %lu, end = %lu, size %lu %s\n",
+               kprintf("%s: type 0x%x, start %lu, end = %lu, size %lu %s\n",
                       sname, dp->dp_typ, ssector1, esector1,
                       (u_long)dp->dp_size, error ? "" : ": OK");
        if (ssector != ssector1 && bootverbose)
-               printf("%s: C/H/S start %d/%d/%d (%lu) != start %lu: invalid\n",
+               kprintf("%s: C/H/S start %d/%d/%d (%lu) != start %lu: invalid\n",
                       sname, chs_scyl, dp->dp_shd, chs_ssect,
                       ssector, ssector1);
        if (esector != esector1 && bootverbose)
-               printf("%s: C/H/S end %d/%d/%d (%lu) != end %lu: invalid\n",
+               kprintf("%s: C/H/S end %d/%d/%d (%lu) != end %lu: invalid\n",
                       sname, chs_ecyl, dp->dp_ehd, chs_esect,
                       esector, esector1);
        return (error);
@@ -208,7 +208,7 @@ reread_mbr:
                diskerr(&bp->b_bio1, wdev, 
                        "reading primary partition table: error",
                        LOG_PRINTF, 0, NULL);
-               printf("\n");
+               kprintf("\n");
                error = EIO;
                goto done;
        }
@@ -218,7 +218,7 @@ reread_mbr:
        sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE, RAW_PART, partname);
        if (cp[0x1FE] != 0x55 || cp[0x1FF] != 0xAA) {
                if (bootverbose)
-                       printf("%s: invalid primary partition table: no magic\n",
+                       kprintf("%s: invalid primary partition table: no magic\n",
                               sname);
                error = EINVAL;
                goto done;
@@ -233,7 +233,7 @@ reread_mbr:
        for (dospart = 0, dp = dp0; dospart < NDOSPART; dospart++, dp++) {
                if (dp->dp_typ == DOSPTYP_ONTRACK) {
                        if (bootverbose)
-                               printf(
+                               kprintf(
            "%s: Found \"Ontrack Disk Manager\" on this disk.\n", sname);
                        bp->b_flags |= B_INVAL | B_AGE;
                        brelse(bp);
@@ -251,7 +251,7 @@ reread_mbr:
                       sname));
 #endif /* 0 */
                if (bootverbose)
-                       printf(
+                       kprintf(
      "%s: invalid primary partition table: Dangerously Dedicated (ignored)\n",
                               sname);
                error = EINVAL;
@@ -409,7 +409,7 @@ mbr_extended(cdev_t dev, struct disklabel *lp, struct diskslices *ssp,
        struct diskslice *sp;
 
        if (level >= 16) {
-               printf(
+               kprintf(
        "%s: excessive recursion in search for slices; aborting search\n",
                       devtoname(dev));
                return;
@@ -425,7 +425,7 @@ mbr_extended(cdev_t dev, struct disklabel *lp, struct diskslices *ssp,
                diskerr(&bp->b_bio1, dev,
                        "reading extended partition table: error",
                        LOG_PRINTF, 0, NULL);
-               printf("\n");
+               kprintf("\n");
                goto done;
        }
 
@@ -435,7 +435,7 @@ mbr_extended(cdev_t dev, struct disklabel *lp, struct diskslices *ssp,
                sname = dsname(dev, dkunit(dev), WHOLE_DISK_SLICE, RAW_PART,
                               partname);
                if (bootverbose)
-                       printf("%s: invalid extended partition table: no magic\n",
+                       kprintf("%s: invalid extended partition table: no magic\n",
                               sname);
                goto done;
        }
@@ -469,7 +469,7 @@ mbr_extended(cdev_t dev, struct disklabel *lp, struct diskslices *ssp,
                        check_part(sname, dp, ext_offset, nsectors, ntracks,
                                   mbr_offset);
                        if (slice >= MAX_SLICES) {
-                               printf("%s: too many slices\n", sname);
+                               kprintf("%s: too many slices\n", sname);
                                slice++;
                                continue;
                        }
@@ -504,7 +504,7 @@ mbr_setslice(char *sname, struct disklabel *lp, struct diskslice *sp,
 
        offset = br_offset + dp->dp_start;
        if (offset > lp->d_secperunit || offset < br_offset) {
-               printf(
+               kprintf(
                "%s: slice starts beyond end of the disk: rejecting it\n",
                       sname);
                return (1);
@@ -513,7 +513,7 @@ mbr_setslice(char *sname, struct disklabel *lp, struct diskslice *sp,
        if (size >= dp->dp_size)
                size = dp->dp_size;
        else
-               printf(
+               kprintf(
 "%s: slice extends beyond end of disk: truncating from %lu to %lu sectors\n",
                       sname, (u_long)dp->dp_size, size);
        sp->ds_offset = offset;
index 1fac89f..641e597 100644 (file)
@@ -44,7 +44,7 @@
  *     from: @(#)ufs_disksubr.c        7.16 (Berkeley) 5/4/91
  *     from: ufs_disksubr.c,v 1.8 1994/06/07 01:21:39 phk Exp $
  * $FreeBSD: src/sys/kern/subr_diskslice.c,v 1.82.2.6 2001/07/24 09:49:41 dd Exp $
- * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.25 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_diskslice.c,v 1.26 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -66,7 +66,7 @@
 #include <vfs/ufs/dinode.h>    /* XXX used only for fs.h */
 #include <vfs/ufs/fs.h>                /* XXX used only to get BBSIZE/SBSIZE */
 
-#define TRACE(str)     do { if (ds_debug) printf str; } while (0)
+#define TRACE(str)     do { if (ds_debug) kprintf str; } while (0)
 
 typedef        u_char  bool_t;
 
@@ -157,7 +157,7 @@ dscheck(cdev_t dev, struct bio *bio, struct diskslices *ssp)
        int mask;
 
        if (bio->bio_offset < 0) {
-               printf("dscheck(%s): negative bio_offset %lld\n", 
+               kprintf("dscheck(%s): negative bio_offset %lld\n", 
                    devtoname(dev), bio->bio_offset);
                goto bad;
        }
@@ -282,7 +282,7 @@ doshift:
                               (bp->b_data + (int)nbio->bio_caller_info2.offset),
                               TRUE);
                        if (msg != NULL) {
-                               printf("dscheck(%s): %s\n", 
+                               kprintf("dscheck(%s): %s\n", 
                                    devtoname(dev), msg);
                                bp->b_error = EROFS;
                                pop_bio(nbio);
@@ -293,13 +293,13 @@ doshift:
        return (nbio);
 
 bad_bcount:
-       printf(
+       kprintf(
        "dscheck(%s): b_bcount %d is not on a sector boundary (ssize %d)\n",
            devtoname(dev), bp->b_bcount, ssp->dss_secsize);
        goto bad;
 
 bad_blkno:
-       printf(
+       kprintf(
        "dscheck(%s): bio_offset %lld is not on a sector boundary (ssize %d)\n",
            devtoname(dev), bio->bio_offset, ssp->dss_secsize);
 bad:
@@ -569,7 +569,7 @@ dsiodone(struct bio *bio)
                               (bp->b_data + (int)bio->bio_caller_info2.offset),
                               FALSE);
                if (msg != NULL)
-                       printf("%s\n", msg);
+                       kprintf("%s\n", msg);
        }
        biodone(bio->bio_prev);
 }
@@ -666,7 +666,7 @@ dsopen(cdev_t dev, int mode, u_int flags,
 
        unit = dkunit(dev);
        if (lp->d_secsize % DEV_BSIZE) {
-               printf("%s: invalid sector size %lu\n", devtoname(dev),
+               kprintf("%s: invalid sector size %lu\n", devtoname(dev),
                    (u_long)lp->d_secsize);
                return (EINVAL);
        }
@@ -872,7 +872,7 @@ fixlabel(char *sname, struct diskslice *sp, struct disklabel *lp, int writeflag)
        }
        if (pp->p_offset != start) {
                if (sname != NULL) {
-                       printf(
+                       kprintf(
 "%s: rejecting BSD label: raw partition offset != slice offset\n",
                               sname);
                        slice_info(sname, sp);
@@ -882,14 +882,14 @@ fixlabel(char *sname, struct diskslice *sp, struct disklabel *lp, int writeflag)
        }
        if (pp->p_size != sp->ds_size) {
                if (sname != NULL) {
-                       printf("%s: raw partition size != slice size\n", sname);
+                       kprintf("%s: raw partition size != slice size\n", sname);
                        slice_info(sname, sp);
                        partition_info(sname, RAW_PART, pp);
                }
                if (pp->p_size > sp->ds_size) {
                        if (sname == NULL)
                                return ("fixlabel: raw partition size > slice size");
-                       printf("%s: truncating raw partition\n", sname);
+                       kprintf("%s: truncating raw partition\n", sname);
                        pp->p_size = sp->ds_size;
                }
        }
@@ -906,7 +906,7 @@ fixlabel(char *sname, struct diskslice *sp, struct disklabel *lp, int writeflag)
                            || pp->p_offset + pp->p_size > end
                            || pp->p_offset + pp->p_size < pp->p_offset) {
                                if (sname != NULL) {
-                                       printf(
+                                       kprintf(
 "%s: rejecting partition in BSD label: it isn't entirely within the slice\n",
                                               sname);
                                        if (!warned) {
@@ -931,7 +931,7 @@ fixlabel(char *sname, struct diskslice *sp, struct disklabel *lp, int writeflag)
 static void
 partition_info(char *sname, int part, struct partition *pp)
 {
-       printf("%s%c: start %lu, end %lu, size %lu\n", sname, 'a' + part,
+       kprintf("%s%c: start %lu, end %lu, size %lu\n", sname, 'a' + part,
               (u_long)pp->p_offset, (u_long)(pp->p_offset + pp->p_size - 1),
               (u_long)pp->p_size);
 }
@@ -939,7 +939,7 @@ partition_info(char *sname, int part, struct partition *pp)
 static void
 slice_info(char *sname, struct diskslice *sp)
 {
-       printf("%s: start %lu, end %lu, size %lu\n", sname,
+       kprintf("%s: start %lu, end %lu, size %lu\n", sname,
               sp->ds_offset, sp->ds_offset + sp->ds_size - 1, sp->ds_size);
 }
 
index 80f012b..c5c0ba0 100644 (file)
@@ -22,7 +22,7 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- * $DragonFly: src/sys/kern/subr_power.c,v 1.1 2003/09/24 03:32:17 drhodus Exp $
+ * $DragonFly: src/sys/kern/subr_power.c,v 1.2 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/cdefs.h>
@@ -96,7 +96,7 @@ power_profile_set_state(int state)
        if (state != power_profile_state) {
                power_profile_state = state;
                changed = 1;
-               printf("system power profile changed to '%s'\n",
+               kprintf("system power profile changed to '%s'\n",
                       (state == POWER_PROFILE_PERFORMANCE) ? "performance" : "economy");
        } else {
                changed = 0;
index 69bc9f3..97117c3 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)subr_prof.c 8.3 (Berkeley) 9/23/93
  * $FreeBSD: src/sys/kern/subr_prof.c,v 1.32.2.2 2000/08/03 00:09:32 ps Exp $
- * $DragonFly: src/sys/kern/subr_prof.c,v 1.13 2006/11/07 18:50:06 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_prof.c,v 1.14 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -101,7 +101,7 @@ kmstartup(void *dummy)
        p->lowpc = ROUNDDOWN((u_long)btext, HISTFRACTION * sizeof(HISTCOUNTER));
        p->highpc = ROUNDUP((u_long)etext, HISTFRACTION * sizeof(HISTCOUNTER));
        p->textsize = p->highpc - p->lowpc;
-       printf("Profiling kernel, textsize=%lu [%x..%x]\n",
+       kprintf("Profiling kernel, textsize=%lu [%x..%x]\n",
               p->textsize, p->lowpc, p->highpc);
        p->kcountsize = p->textsize / HISTFRACTION;
        p->hashfraction = HASHFRACTION;
@@ -115,7 +115,7 @@ kmstartup(void *dummy)
        cp = (char *)malloc(p->kcountsize + p->fromssize + p->tossize,
            M_GPROF, M_NOWAIT);
        if (cp == 0) {
-               printf("No memory for profiling.\n");
+               kprintf("No memory for profiling.\n");
                return;
        }
        bzero(cp, p->kcountsize + p->tossize + p->fromssize);
@@ -198,7 +198,7 @@ kmstartup(void *dummy)
                nullfunc_loop_profiled_time += KCOUNT(p, PC_TO_I(p, tmp_addr));
 #define CALIB_DOSCALE(count)   (((count) + CALIB_SCALE / 3) / CALIB_SCALE)
 #define        c2n(count, freq)        ((int)((count) * 1000000000LL / freq))
-       printf("cputime %d, empty_loop %d, nullfunc_loop_profiled %d, mcount %d, mexitcount %d\n",
+       kprintf("cputime %d, empty_loop %d, nullfunc_loop_profiled %d, mcount %d, mexitcount %d\n",
               CALIB_DOSCALE(c2n(cputime_overhead, p->profrate)),
               CALIB_DOSCALE(c2n(empty_loop_time, p->profrate)),
               CALIB_DOSCALE(c2n(nullfunc_loop_profiled_time, p->profrate)),
@@ -253,7 +253,7 @@ kmstartup(void *dummy)
        p->mcount_post_overhead = p->mcount_overhead
                                  + p->cputime_overhead
                                  - p->mcount_pre_overhead;
-       printf(
+       kprintf(
 "Profiling overheads: mcount: %d+%d, %d+%d; mexitcount: %d+%d, %d+%d nsec\n",
               c2n(p->cputime_overhead, p->profrate),
               c2n(p->mcount_overhead, p->profrate),
@@ -263,7 +263,7 @@ kmstartup(void *dummy)
               c2n(p->mexitcount_overhead, p->profrate),
               c2n(p->mexitcount_pre_overhead, p->profrate),
               c2n(p->mexitcount_post_overhead, p->profrate));
-       printf(
+       kprintf(
 "Profiling overheads: mcount: %d+%d, %d+%d; mexitcount: %d+%d, %d+%d cycles\n",
               p->cputime_overhead, p->mcount_overhead,
               p->mcount_pre_overhead, p->mcount_post_overhead,
index 0208ef1..c7cce5e 100644 (file)
@@ -27,7 +27,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/subr_rman.c,v 1.10.2.1 2001/06/05 08:06:08 imp Exp $
- * $DragonFly: src/sys/kern/subr_rman.c,v 1.10 2006/10/25 20:56:02 dillon Exp $
+ * $DragonFly: src/sys/kern/subr_rman.c,v 1.11 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -188,7 +188,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
        rv = 0;
 
 #ifdef RMAN_DEBUG
-       printf("rman_reserve_resource: <%s> request: [%#lx, %#lx], length "
+       kprintf("rman_reserve_resource: <%s> request: [%#lx, %#lx], length "
               "%#lx, flags %u, device %s%d\n", rm->rm_descr, start, end,
               count, flags, device_get_name(dev), device_get_unit(dev));
 #endif /* RMAN_DEBUG */
@@ -204,7 +204,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
 
        if (CIRCLEQ_TERMCOND(r, rm->rm_list)) {
 #ifdef RMAN_DEBUG
-               printf("could not find a region\n");
+               kprintf("could not find a region\n");
 #endif
                goto out;
        }
@@ -215,17 +215,17 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
        for (s = r; !CIRCLEQ_TERMCOND(s, rm->rm_list);
             s = CIRCLEQ_NEXT(s, r_link)) {
 #ifdef RMAN_DEBUG
-               printf("considering [%#lx, %#lx]\n", s->r_start, s->r_end);
+               kprintf("considering [%#lx, %#lx]\n", s->r_start, s->r_end);
 #endif /* RMAN_DEBUG */
                if (s->r_start > end) {
 #ifdef RMAN_DEBUG
-                       printf("s->r_start (%#lx) > end (%#lx)\n", s->r_start, end);
+                       kprintf("s->r_start (%#lx) > end (%#lx)\n", s->r_start, end);
 #endif /* RMAN_DEBUG */
                        break;
                }
                if (s->r_flags & RF_ALLOCATED) {
 #ifdef RMAN_DEBUG
-                       printf("region is allocated\n");
+                       kprintf("region is allocated\n");
 #endif /* RMAN_DEBUG */
                        continue;
                }
@@ -234,18 +234,18 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
                    ~((1ul << RF_ALIGNMENT(flags)) - 1);
                rend = min(s->r_end, max(start + count, end));
 #ifdef RMAN_DEBUG
-               printf("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n",
+               kprintf("truncated region: [%#lx, %#lx]; size %#lx (requested %#lx)\n",
                       rstart, rend, (rend - rstart + 1), count);
 #endif /* RMAN_DEBUG */
 
                if ((rend - rstart + 1) >= count) {
 #ifdef RMAN_DEBUG
-                       printf("candidate region: [%#lx, %#lx], size %#lx\n",
+                       kprintf("candidate region: [%#lx, %#lx], size %#lx\n",
                               rend, rstart, (rend - rstart + 1));
 #endif /* RMAN_DEBUG */
                        if ((s->r_end - s->r_start + 1) == count) {
 #ifdef RMAN_DEBUG
-                               printf("candidate region is entire chunk\n");
+                               kprintf("candidate region is entire chunk\n");
 #endif /* RMAN_DEBUG */
                                rv = s;
                                rv->r_flags |= RF_ALLOCATED | flags;
@@ -276,7 +276,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
                        
                        if (s->r_start < rv->r_start && s->r_end > rv->r_end) {
 #ifdef RMAN_DEBUG
-                               printf("splitting region in three parts: "
+                               kprintf("splitting region in three parts: "
                                       "[%#lx, %#lx]; [%#lx, %#lx]; [%#lx, %#lx]\n",
                                       s->r_start, rv->r_start - 1,
                                       rv->r_start, rv->r_end,
@@ -305,7 +305,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
                                                     r_link);
                        } else if (s->r_start == rv->r_start) {
 #ifdef RMAN_DEBUG
-                               printf("allocating from the beginning\n");
+                               kprintf("allocating from the beginning\n");
 #endif /* RMAN_DEBUG */
                                /*
                                 * We are allocating at the beginning.
@@ -315,7 +315,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
                                                      r_link);
                        } else {
 #ifdef RMAN_DEBUG
-                               printf("allocating at the end\n");
+                               kprintf("allocating at the end\n");
 #endif /* RMAN_DEBUG */
                                /*
                                 * We are allocating at the end.
@@ -337,7 +337,7 @@ rman_reserve_resource(struct rman *rm, u_long start, u_long end, u_long count,
         * additional work, but this does not seem warranted.)
         */
 #ifdef RMAN_DEBUG
-       printf("no unshared regions found\n");
+       kprintf("no unshared regions found\n");
 #endif /* RMAN_DEBUG */
        if ((flags & (RF_SHAREABLE | RF_TIMESHARE)) == 0)
                goto out;
index c3b297f..1353f36 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)sys_generic.c       8.5 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/sys_generic.c,v 1.55.2.10 2001/03/17 10:39:32 peter Exp $
- * $DragonFly: src/sys/kern/sys_generic.c,v 1.37 2006/09/10 01:26:39 dillon Exp $
+ * $DragonFly: src/sys/kern/sys_generic.c,v 1.38 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_ktrace.h"
@@ -588,7 +588,7 @@ mapped_ioctl(int fd, u_long com, caddr_t uspc_data, struct ioctl_map *map)
                if (iomc == NULL ||
                    (iomc->start == 0 && iomc->maptocmd == 0
                     && iomc->wrapfunc == NULL && iomc->mapfunc == NULL)) {
-                       printf("%s: 'ioctl' fd=%d, cmd=0x%lx ('%c',%d) not implemented\n",
+                       kprintf("%s: 'ioctl' fd=%d, cmd=0x%lx ('%c',%d) not implemented\n",
                               map->sys, fd, maskcmd,
                               (int)((maskcmd >> 8) & 0xff),
                               (int)(maskcmd & 0xff));
@@ -616,7 +616,7 @@ mapped_ioctl(int fd, u_long com, caddr_t uspc_data, struct ioctl_map *map)
                                                    iomc->maptocmd, iomc->maptoend,
                                                    com, ocom);
                        } else {
-                               printf("%s: Invalid mapping for fd=%d, cmd=%#lx ('%c',%d)\n",
+                               kprintf("%s: Invalid mapping for fd=%d, cmd=%#lx ('%c',%d)\n",
                                       map->sys, fd, maskcmd,
                                       (int)((maskcmd >> 8) & 0xff),
                                       (int)(maskcmd & 0xff));
index 1e8c1cc..6b63282 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/kern/sysv_msg.c,v 1.23.2.5 2002/12/31 08:54:53 maxim Exp $ */
-/* $DragonFly: src/sys/kern/sysv_msg.c,v 1.15 2006/09/05 00:55:45 dillon Exp $ */
+/* $DragonFly: src/sys/kern/sysv_msg.c,v 1.16 2006/12/23 00:35:04 swildner Exp $ */
 
 /*
  * Implementation of SVID messages
@@ -153,13 +153,13 @@ msginit(dummy)
        while (i < 1024 && i != msginfo.msgssz)
                i <<= 1;
        if (i != msginfo.msgssz) {
-               printf("msginfo.msgssz=%d (0x%x)\n", msginfo.msgssz,
+               kprintf("msginfo.msgssz=%d (0x%x)\n", msginfo.msgssz,
                    msginfo.msgssz);
                panic("msginfo.msgssz not a small power of 2");
        }
 
        if (msginfo.msgseg > 32767) {
-               printf("msginfo.msgseg=%d\n", msginfo.msgseg);
+               kprintf("msginfo.msgseg=%d\n", msginfo.msgseg);
                panic("msginfo.msgseg > 32767");
        }
 
@@ -253,7 +253,7 @@ sys_msgctl(struct msgctl_args *uap)
        struct msqid_ds *msqptr;
 
 #ifdef MSG_DEBUG_OK
-       printf("call to msgctl(%d, %d, 0x%x)\n", msqid, cmd, user_msqptr);
+       kprintf("call to msgctl(%d, %d, 0x%x)\n", msqid, cmd, user_msqptr);
 #endif
 
        if (!jail_sysvipc_allowed && p->p_ucred->cr_prison != NULL)
@@ -263,7 +263,7 @@ sys_msgctl(struct msgctl_args *uap)
 
        if (msqid < 0 || msqid >= msginfo.msgmni) {
 #ifdef MSG_DEBUG_OK
-               printf("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
+               kprintf("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
                    msginfo.msgmni);
 #endif
                return(EINVAL);
@@ -273,13 +273,13 @@ sys_msgctl(struct msgctl_args *uap)
 
        if (msqptr->msg_qbytes == 0) {
 #ifdef MSG_DEBUG_OK
-               printf("no such msqid\n");
+               kprintf("no such msqid\n");
 #endif
                return(EINVAL);
        }
        if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
 #ifdef MSG_DEBUG_OK
-               printf("wrong sequence number\n");
+               kprintf("wrong sequence number\n");
 #endif
                return(EINVAL);
        }
@@ -331,14 +331,14 @@ sys_msgctl(struct msgctl_args *uap)
                }
                if (msqbuf.msg_qbytes > msginfo.msgmnb) {
 #ifdef MSG_DEBUG_OK
-                       printf("can't increase msg_qbytes beyond %d (truncating)\n",
+                       kprintf("can't increase msg_qbytes beyond %d (truncating)\n",
                            msginfo.msgmnb);
 #endif
                        msqbuf.msg_qbytes = msginfo.msgmnb;     /* silently restrict qbytes to system limit */
                }
                if (msqbuf.msg_qbytes == 0) {
 #ifdef MSG_DEBUG_OK
-                       printf("can't reduce msg_qbytes to 0\n");
+                       kprintf("can't reduce msg_qbytes to 0\n");
 #endif
                        return(EINVAL);         /* non-standard errno! */
                }
@@ -353,7 +353,7 @@ sys_msgctl(struct msgctl_args *uap)
        case IPC_STAT:
                if ((eval = ipcperm(p, &msqptr->msg_perm, IPC_R))) {
 #ifdef MSG_DEBUG_OK
-                       printf("requester doesn't have read access\n");
+                       kprintf("requester doesn't have read access\n");
 #endif
                        return(eval);
                }
@@ -363,7 +363,7 @@ sys_msgctl(struct msgctl_args *uap)
 
        default:
 #ifdef MSG_DEBUG_OK
-               printf("invalid command %d\n", cmd);
+               kprintf("invalid command %d\n", cmd);
 #endif
                return(EINVAL);
        }
@@ -384,7 +384,7 @@ sys_msgget(struct msgget_args *uap)
        struct msqid_ds *msqptr = NULL;
 
 #ifdef MSG_DEBUG_OK
-       printf("msgget(0x%x, 0%o)\n", key, msgflg);
+       kprintf("msgget(0x%x, 0%o)\n", key, msgflg);
 #endif
 
        if (!jail_sysvipc_allowed && p->p_ucred->cr_prison != NULL)
@@ -399,17 +399,17 @@ sys_msgget(struct msgget_args *uap)
                }
                if (msqid < msginfo.msgmni) {
 #ifdef MSG_DEBUG_OK
-                       printf("found public key\n");
+                       kprintf("found public key\n");
 #endif
                        if ((msgflg & IPC_CREAT) && (msgflg & IPC_EXCL)) {
 #ifdef MSG_DEBUG_OK
-                               printf("not exclusive\n");
+                               kprintf("not exclusive\n");
 #endif
                                return(EEXIST);
                        }
                        if ((eval = ipcperm(p, &msqptr->msg_perm, msgflg & 0700 ))) {
 #ifdef MSG_DEBUG_OK
-                               printf("requester doesn't have 0%o access\n",
+                               kprintf("requester doesn't have 0%o access\n",
                                    msgflg & 0700);
 #endif
                                return(eval);
@@ -419,7 +419,7 @@ sys_msgget(struct msgget_args *uap)
        }
 
 #ifdef MSG_DEBUG_OK
-       printf("need to allocate the msqid_ds\n");
+       kprintf("need to allocate the msqid_ds\n");
 #endif
        if (key == IPC_PRIVATE || (msgflg & IPC_CREAT)) {
                for (msqid = 0; msqid < msginfo.msgmni; msqid++) {
@@ -436,12 +436,12 @@ sys_msgget(struct msgget_args *uap)
                }
                if (msqid == msginfo.msgmni) {
 #ifdef MSG_DEBUG_OK
-                       printf("no more msqid_ds's available\n");
+                       kprintf("no more msqid_ds's available\n");
 #endif
                        return(ENOSPC);
                }
 #ifdef MSG_DEBUG_OK
-               printf("msqid %d is available\n", msqid);
+               kprintf("msqid %d is available\n", msqid);
 #endif
                msqptr->msg_perm.key = key;
                msqptr->msg_perm.cuid = cred->cr_uid;
@@ -463,7 +463,7 @@ sys_msgget(struct msgget_args *uap)
                msqptr->msg_ctime = time_second;
        } else {
 #ifdef MSG_DEBUG_OK
-               printf("didn't find it and wasn't asked to create it\n");
+               kprintf("didn't find it and wasn't asked to create it\n");
 #endif
                return(ENOENT);
        }
@@ -488,7 +488,7 @@ sys_msgsnd(struct msgsnd_args *uap)
        short next;
 
 #ifdef MSG_DEBUG_OK
-       printf("call to msgsnd(%d, 0x%x, %d, %d)\n", msqid, user_msgp, msgsz,
+       kprintf("call to msgsnd(%d, 0x%x, %d, %d)\n", msqid, user_msgp, msgsz,
            msgflg);
 #endif
 
@@ -499,7 +499,7 @@ sys_msgsnd(struct msgsnd_args *uap)
 
        if (msqid < 0 || msqid >= msginfo.msgmni) {
 #ifdef MSG_DEBUG_OK
-               printf("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
+               kprintf("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
                    msginfo.msgmni);
 #endif
                return(EINVAL);
@@ -508,27 +508,27 @@ sys_msgsnd(struct msgsnd_args *uap)
        msqptr = &msqids[msqid];
        if (msqptr->msg_qbytes == 0) {
 #ifdef MSG_DEBUG_OK
-               printf("no such message queue id\n");
+               kprintf("no such message queue id\n");
 #endif
                return(EINVAL);
        }
        if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
 #ifdef MSG_DEBUG_OK
-               printf("wrong sequence number\n");
+               kprintf("wrong sequence number\n");
 #endif
                return(EINVAL);
        }
 
        if ((eval = ipcperm(p, &msqptr->msg_perm, IPC_W))) {
 #ifdef MSG_DEBUG_OK
-               printf("requester doesn't have write access\n");
+               kprintf("requester doesn't have write access\n");
 #endif
                return(eval);
        }
 
        segs_needed = (msgsz + msginfo.msgssz - 1) / msginfo.msgssz;
 #ifdef MSG_DEBUG_OK
-       printf("msgsz=%d, msgssz=%d, segs_needed=%d\n", msgsz, msginfo.msgssz,
+       kprintf("msgsz=%d, msgssz=%d, segs_needed=%d\n", msgsz, msginfo.msgssz,
            segs_needed);
 #endif
        for (;;) {
@@ -541,32 +541,32 @@ sys_msgsnd(struct msgsnd_args *uap)
 
                if (msgsz > msqptr->msg_qbytes) {
 #ifdef MSG_DEBUG_OK
-                       printf("msgsz > msqptr->msg_qbytes\n");
+                       kprintf("msgsz > msqptr->msg_qbytes\n");
 #endif
                        return(EINVAL);
                }
 
                if (msqptr->msg_perm.mode & MSG_LOCKED) {
 #ifdef MSG_DEBUG_OK
-                       printf("msqid is locked\n");
+                       kprintf("msqid is locked\n");
 #endif
                        need_more_resources = 1;
                }
                if (msgsz + msqptr->msg_cbytes > msqptr->msg_qbytes) {
 #ifdef MSG_DEBUG_OK
-                       printf("msgsz + msg_cbytes > msg_qbytes\n");
+                       kprintf("msgsz + msg_cbytes > msg_qbytes\n");
 #endif
                        need_more_resources = 1;
                }
                if (segs_needed > nfree_msgmaps) {
 #ifdef MSG_DEBUG_OK
-                       printf("segs_needed > nfree_msgmaps\n");
+                       kprintf("segs_needed > nfree_msgmaps\n");
 #endif
                        need_more_resources = 1;
                }
                if (free_msghdrs == NULL) {
 #ifdef MSG_DEBUG_OK
-                       printf("no more msghdrs\n");
+                       kprintf("no more msghdrs\n");
 #endif
                        need_more_resources = 1;
                }
@@ -576,37 +576,37 @@ sys_msgsnd(struct msgsnd_args *uap)
 
                        if ((msgflg & IPC_NOWAIT) != 0) {
 #ifdef MSG_DEBUG_OK
-                               printf("need more resources but caller doesn't want to wait\n");
+                               kprintf("need more resources but caller doesn't want to wait\n");
 #endif
                                return(EAGAIN);
                        }
 
                        if ((msqptr->msg_perm.mode & MSG_LOCKED) != 0) {
 #ifdef MSG_DEBUG_OK
-                               printf("we don't own the msqid_ds\n");
+                               kprintf("we don't own the msqid_ds\n");
 #endif
                                we_own_it = 0;
                        } else {
                                /* Force later arrivals to wait for our
                                   request */
 #ifdef MSG_DEBUG_OK
-                               printf("we own the msqid_ds\n");
+                               kprintf("we own the msqid_ds\n");
 #endif
                                msqptr->msg_perm.mode |= MSG_LOCKED;
                                we_own_it = 1;
                        }
 #ifdef MSG_DEBUG_OK
-                       printf("goodnight\n");
+                       kprintf("goodnight\n");
 #endif
                        eval = tsleep((caddr_t)msqptr, PCATCH, "msgwait", 0);
 #ifdef MSG_DEBUG_OK
-                       printf("good morning, eval=%d\n", eval);
+                       kprintf("good morning, eval=%d\n", eval);
 #endif
                        if (we_own_it)
                                msqptr->msg_perm.mode &= ~MSG_LOCKED;
                        if (eval != 0) {
 #ifdef MSG_DEBUG_OK
-                               printf("msgsnd:  interrupted system call\n");
+                               kprintf("msgsnd:  interrupted system call\n");
 #endif
                                return(EINTR);
                        }
@@ -617,14 +617,14 @@ sys_msgsnd(struct msgsnd_args *uap)
 
                        if (msqptr->msg_qbytes == 0) {
 #ifdef MSG_DEBUG_OK
-                               printf("msqid deleted\n");
+                               kprintf("msqid deleted\n");
 #endif
                                return(EIDRM);
                        }
 
                } else {
 #ifdef MSG_DEBUG_OK
-                       printf("got all the resources that we need\n");
+                       kprintf("got all the resources that we need\n");
 #endif
                        break;
                }
@@ -677,7 +677,7 @@ sys_msgsnd(struct msgsnd_args *uap)
                if (next >= msginfo.msgseg)
                        panic("next out of range #1");
 #ifdef MSG_DEBUG_OK
-               printf("allocating segment %d to message\n", next);
+               kprintf("allocating segment %d to message\n", next);
 #endif
                free_msgmaps = msgmaps[next].next;
                nfree_msgmaps--;
@@ -693,7 +693,7 @@ sys_msgsnd(struct msgsnd_args *uap)
        if ((eval = copyin(user_msgp, &msghdr->msg_type,
            sizeof(msghdr->msg_type))) != 0) {
 #ifdef MSG_DEBUG_OK
-               printf("error %d copying the message type\n", eval);
+               kprintf("error %d copying the message type\n", eval);
 #endif
                msg_freehdr(msghdr);
                msqptr->msg_perm.mode &= ~MSG_LOCKED;
@@ -711,7 +711,7 @@ sys_msgsnd(struct msgsnd_args *uap)
                msqptr->msg_perm.mode &= ~MSG_LOCKED;
                wakeup((caddr_t)msqptr);
 #ifdef MSG_DEBUG_OK
-               printf("mtype (%d) < 1\n", msghdr->msg_type);
+               kprintf("mtype (%d) < 1\n", msghdr->msg_type);
 #endif
                return(EINVAL);
        }
@@ -734,7 +734,7 @@ sys_msgsnd(struct msgsnd_args *uap)
                if ((eval = copyin(user_msgp, &msgpool[next * msginfo.msgssz],
                    tlen)) != 0) {
 #ifdef MSG_DEBUG_OK
-                       printf("error %d copying in message segment\n", eval);
+                       kprintf("error %d copying in message segment\n", eval);
 #endif
                        msg_freehdr(msghdr);
                        msqptr->msg_perm.mode &= ~MSG_LOCKED;
@@ -803,7 +803,7 @@ sys_msgrcv(struct msgrcv_args *uap)
        short next;
 
 #ifdef MSG_DEBUG_OK
-       printf("call to msgrcv(%d, 0x%x, %d, %ld, %d)\n", msqid, user_msgp,
+       kprintf("call to msgrcv(%d, 0x%x, %d, %ld, %d)\n", msqid, user_msgp,
            msgsz, msgtyp, msgflg);
 #endif
 
@@ -814,7 +814,7 @@ sys_msgrcv(struct msgrcv_args *uap)
 
        if (msqid < 0 || msqid >= msginfo.msgmni) {
 #ifdef MSG_DEBUG_OK
-               printf("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
+               kprintf("msqid (%d) out of range (0<=msqid<%d)\n", msqid,
                    msginfo.msgmni);
 #endif
                return(EINVAL);
@@ -823,20 +823,20 @@ sys_msgrcv(struct msgrcv_args *uap)
        msqptr = &msqids[msqid];
        if (msqptr->msg_qbytes == 0) {
 #ifdef MSG_DEBUG_OK
-               printf("no such message queue id\n");
+               kprintf("no such message queue id\n");
 #endif
                return(EINVAL);
        }
        if (msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
 #ifdef MSG_DEBUG_OK
-               printf("wrong sequence number\n");
+               kprintf("wrong sequence number\n");
 #endif
                return(EINVAL);
        }
 
        if ((eval = ipcperm(p, &msqptr->msg_perm, IPC_R))) {
 #ifdef MSG_DEBUG_OK
-               printf("requester doesn't have read access\n");
+               kprintf("requester doesn't have read access\n");
 #endif
                return(eval);
        }
@@ -849,7 +849,7 @@ sys_msgrcv(struct msgrcv_args *uap)
                                if (msgsz < msghdr->msg_ts &&
                                    (msgflg & MSG_NOERROR) == 0) {
 #ifdef MSG_DEBUG_OK
-                                       printf("first message on the queue is too big (want %d, got %d)\n",
+                                       kprintf("first message on the queue is too big (want %d, got %d)\n",
                                            msgsz, msghdr->msg_ts);
 #endif
                                        return(E2BIG);
@@ -882,13 +882,13 @@ sys_msgrcv(struct msgrcv_args *uap)
                                if (msgtyp == msghdr->msg_type ||
                                    msghdr->msg_type <= -msgtyp) {
 #ifdef MSG_DEBUG_OK
-                                       printf("found message type %d, requested %d\n",
+                                       kprintf("found message type %d, requested %d\n",
                                            msghdr->msg_type, msgtyp);
 #endif
                                        if (msgsz < msghdr->msg_ts &&
                                            (msgflg & MSG_NOERROR) == 0) {
 #ifdef MSG_DEBUG_OK
-                                               printf("requested message on the queue is too big (want %d, got %d)\n",
+                                               kprintf("requested message on the queue is too big (want %d, got %d)\n",
                                                    msgsz, msghdr->msg_ts);
 #endif
                                                return(E2BIG);
@@ -933,7 +933,7 @@ sys_msgrcv(struct msgrcv_args *uap)
 
                if ((msgflg & IPC_NOWAIT) != 0) {
 #ifdef MSG_DEBUG_OK
-                       printf("no appropriate message found (msgtyp=%d)\n",
+                       kprintf("no appropriate message found (msgtyp=%d)\n",
                            msgtyp);
 #endif
                        /* The SVID says to return ENOMSG. */
@@ -950,16 +950,16 @@ sys_msgrcv(struct msgrcv_args *uap)
                 */
 
 #ifdef MSG_DEBUG_OK
-               printf("msgrcv:  goodnight\n");
+               kprintf("msgrcv:  goodnight\n");
 #endif
                eval = tsleep((caddr_t)msqptr, PCATCH, "msgwait", 0);
 #ifdef MSG_DEBUG_OK
-               printf("msgrcv:  good morning (eval=%d)\n", eval);
+               kprintf("msgrcv:  good morning (eval=%d)\n", eval);
 #endif
 
                if (eval != 0) {
 #ifdef MSG_DEBUG_OK
-                       printf("msgsnd:  interrupted system call\n");
+                       kprintf("msgsnd:  interrupted system call\n");
 #endif
                        return(EINTR);
                }
@@ -971,7 +971,7 @@ sys_msgrcv(struct msgrcv_args *uap)
                if (msqptr->msg_qbytes == 0 ||
                    msqptr->msg_perm.seq != IPCID_TO_SEQ(uap->msqid)) {
 #ifdef MSG_DEBUG_OK
-                       printf("msqid deleted\n");
+                       kprintf("msqid deleted\n");
 #endif
                        return(EIDRM);
                }
@@ -995,7 +995,7 @@ sys_msgrcv(struct msgrcv_args *uap)
         */
 
 #ifdef MSG_DEBUG_OK
-       printf("found a message, msgsz=%d, msg_ts=%d\n", msgsz,
+       kprintf("found a message, msgsz=%d, msg_ts=%d\n", msgsz,
            msghdr->msg_ts);
 #endif
        if (msgsz > msghdr->msg_ts)
@@ -1009,7 +1009,7 @@ sys_msgrcv(struct msgrcv_args *uap)
            sizeof(msghdr->msg_type));
        if (eval != 0) {
 #ifdef MSG_DEBUG_OK
-               printf("error (%d) copying out message type\n", eval);
+               kprintf("error (%d) copying out message type\n", eval);
 #endif
                msg_freehdr(msghdr);
                wakeup((caddr_t)msqptr);
@@ -1037,7 +1037,7 @@ sys_msgrcv(struct msgrcv_args *uap)
                    user_msgp, tlen);
                if (eval != 0) {
 #ifdef MSG_DEBUG_OK
-                       printf("error (%d) copying out message segment\n",
+                       kprintf("error (%d) copying out message segment\n",
                            eval);
 #endif
                        msg_freehdr(msghdr);
index 49f8c39..be0dfa3 100644 (file)
@@ -1,5 +1,5 @@
 /* $FreeBSD: src/sys/kern/sysv_sem.c,v 1.69 2004/03/17 09:37:13 cperciva Exp $ */
-/* $DragonFly: src/sys/kern/sysv_sem.c,v 1.16 2006/09/05 00:55:45 dillon Exp $ */
+/* $DragonFly: src/sys/kern/sysv_sem.c,v 1.17 2006/12/23 00:35:04 swildner Exp $ */
 
 /*
  * Implementation of SVID semaphores
@@ -398,7 +398,7 @@ sys___semctl(struct __semctl_args *uap)
        struct semid_ds *semaptr;
 
 #ifdef SEM_DEBUG
-       printf("call to semctl(%d, %d, %d, 0x%x)\n", semid, semnum, cmd, arg);
+       kprintf("call to semctl(%d, %d, %d, 0x%x)\n", semid, semnum, cmd, arg);
 #endif
 
        if (!jail_sysvipc_allowed && p->p_ucred->cr_prison != NULL)
@@ -552,7 +552,7 @@ sys_semget(struct semget_args *uap)
        struct ucred *cred = p->p_ucred;
 
 #ifdef SEM_DEBUG
-       printf("semget(0x%x, %d, 0%o)\n", key, nsems, semflg);
+       kprintf("semget(0x%x, %d, 0%o)\n", key, nsems, semflg);
 #endif
 
        if (!jail_sysvipc_allowed && p->p_ucred->cr_prison != NULL)
@@ -566,20 +566,20 @@ sys_semget(struct semget_args *uap)
                }
                if (semid < seminfo.semmni) {
 #ifdef SEM_DEBUG
-                       printf("found public key\n");
+                       kprintf("found public key\n");
 #endif
                        if ((eval = ipcperm(p, &sema[semid].sem_perm,
                            semflg & 0700)))
                                return(eval);
                        if (nsems > 0 && sema[semid].sem_nsems < nsems) {
 #ifdef SEM_DEBUG
-                               printf("too small\n");
+                               kprintf("too small\n");
 #endif
                                return(EINVAL);
                        }
                        if ((semflg & IPC_CREAT) && (semflg & IPC_EXCL)) {
 #ifdef SEM_DEBUG
-                               printf("not exclusive\n");
+                               kprintf("not exclusive\n");
 #endif
                                return(EEXIST);
                        }
@@ -588,19 +588,19 @@ sys_semget(struct semget_args *uap)
        }
 
 #ifdef SEM_DEBUG
-       printf("need to allocate the semid_ds\n");
+       kprintf("need to allocate the semid_ds\n");
 #endif
        if (key == IPC_PRIVATE || (semflg & IPC_CREAT)) {
                if (nsems <= 0 || nsems > seminfo.semmsl) {
 #ifdef SEM_DEBUG
-                       printf("nsems out of range (0<%d<=%d)\n", nsems,
+                       kprintf("nsems out of range (0<%d<=%d)\n", nsems,
                            seminfo.semmsl);
 #endif
                        return(EINVAL);
                }
                if (nsems > seminfo.semmns - semtot) {
 #ifdef SEM_DEBUG
-                       printf("not enough semaphores left (need %d, got %d)\n",
+                       kprintf("not enough semaphores left (need %d, got %d)\n",
                            nsems, seminfo.semmns - semtot);
 #endif
                        return(ENOSPC);
@@ -611,12 +611,12 @@ sys_semget(struct semget_args *uap)
                }
                if (semid == seminfo.semmni) {
 #ifdef SEM_DEBUG
-                       printf("no more semid_ds's available\n");
+                       kprintf("no more semid_ds's available\n");
 #endif
                        return(ENOSPC);
                }
 #ifdef SEM_DEBUG
-               printf("semid %d is available\n", semid);
+               kprintf("semid %d is available\n", semid);
 #endif
                sema[semid].sem_perm.key = key;
                sema[semid].sem_perm.cuid = cred->cr_uid;
@@ -634,12 +634,12 @@ sys_semget(struct semget_args *uap)
                bzero(sema[semid].sem_base,
                    sizeof(sema[semid].sem_base[0])*nsems);
 #ifdef SEM_DEBUG
-               printf("sembase = 0x%x, next = 0x%x\n", sema[semid].sem_base,
+               kprintf("sembase = 0x%x, next = 0x%x\n", sema[semid].sem_base,
                    &sem[semtot]);
 #endif
        } else {
 #ifdef SEM_DEBUG
-               printf("didn't find it and wasn't asked to create it\n");
+               kprintf("didn't find it and wasn't asked to create it\n");
 #endif
                return(ENOENT);
        }
@@ -664,7 +664,7 @@ sys_semop(struct semop_args *uap)
        int do_wakeup, do_undos;
 
 #ifdef SEM_DEBUG
-       printf("call to semop(%d, 0x%x, %u)\n", semid, sops, nsops);
+       kprintf("call to semop(%d, 0x%x, %u)\n", semid, sops, nsops);
 #endif
 
        if (!jail_sysvipc_allowed && p->p_ucred->cr_prison != NULL)
@@ -683,21 +683,21 @@ sys_semop(struct semop_args *uap)
 
        if ((eval = ipcperm(p, &semaptr->sem_perm, IPC_W))) {
 #ifdef SEM_DEBUG
-               printf("eval = %d from ipaccess\n", eval);
+               kprintf("eval = %d from ipaccess\n", eval);
 #endif
                return(eval);
        }
 
        if (nsops > MAX_SOPS) {
 #ifdef SEM_DEBUG
-               printf("too many sops (max=%d, nsops=%u)\n", MAX_SOPS, nsops);
+               kprintf("too many sops (max=%d, nsops=%u)\n", MAX_SOPS, nsops);
 #endif
                return(E2BIG);
        }
 
        if ((eval = copyin(uap->sops, &sops, nsops * sizeof(sops[0]))) != 0) {
 #ifdef SEM_DEBUG
-               printf("eval = %d from copyin(%08x, %08x, %u)\n", eval,
+               kprintf("eval = %d from copyin(%08x, %08x, %u)\n", eval,
                    uap->sops, &sops, nsops * sizeof(sops[0]));
 #endif
                return(eval);
@@ -726,7 +726,7 @@ sys_semop(struct semop_args *uap)
                        semptr = &semaptr->sem_base[sopptr->sem_num];
 
 #ifdef SEM_DEBUG
-                       printf("semop:  semaptr=%x, sem_base=%x, semptr=%x, sem[%d]=%d : op=%d, flag=%s\n",
+                       kprintf("semop:  semaptr=%x, sem_base=%x, semptr=%x, sem[%d]=%d : op=%d, flag=%s\n",
                            semaptr, semaptr->sem_base, semptr,
                            sopptr->sem_num, semptr->semval, sopptr->sem_op,
                            (sopptr->sem_flg & IPC_NOWAIT) ? "nowait" : "wait");
@@ -735,7 +735,7 @@ sys_semop(struct semop_args *uap)
                        if (sopptr->sem_op < 0) {
                                if (semptr->semval + sopptr->sem_op < 0) {
 #ifdef SEM_DEBUG
-                                       printf("semop:  can't do it now\n");
+                                       kprintf("semop:  can't do it now\n");
 #endif
                                        break;
                                } else {
@@ -749,7 +749,7 @@ sys_semop(struct semop_args *uap)
                        } else if (sopptr->sem_op == 0) {
                                if (semptr->semval > 0) {
 #ifdef SEM_DEBUG
-                                       printf("semop:  not zero now\n");
+                                       kprintf("semop:  not zero now\n");
 #endif
                                        break;
                                }
@@ -772,7 +772,7 @@ sys_semop(struct semop_args *uap)
                 * No ... rollback anything that we've already done
                 */
 #ifdef SEM_DEBUG
-               printf("semop:  rollback 0 through %d\n", i-1);
+               kprintf("semop:  rollback 0 through %d\n", i-1);
 #endif
                for (j = 0; j < i; j++)
                        semaptr->sem_base[sops[j].sem_num].semval -=
@@ -791,11 +791,11 @@ sys_semop(struct semop_args *uap)
                        semptr->semncnt++;
 
 #ifdef SEM_DEBUG
-               printf("semop:  good night!\n");
+               kprintf("semop:  good night!\n");
 #endif
                eval = tsleep((caddr_t)semaptr, PCATCH, "semwait", 0);
 #ifdef SEM_DEBUG
-               printf("semop:  good morning (eval=%d)!\n", eval);
+               kprintf("semop:  good morning (eval=%d)!\n", eval);
 #endif
 
                suptr = NULL;   /* sem_undo may have been reallocated */
@@ -826,7 +826,7 @@ sys_semop(struct semop_args *uap)
                if (eval != 0)
                        return(EINTR);
 #ifdef SEM_DEBUG
-               printf("semop:  good morning!\n");
+               kprintf("semop:  good morning!\n");
 #endif
        }
 
@@ -877,7 +877,7 @@ done:
                                    sops[j].sem_op;
 
 #ifdef SEM_DEBUG
-                       printf("eval = %d from semundo_adjust\n", eval);
+                       kprintf("eval = %d from semundo_adjust\n", eval);
 #endif
                        return(eval);
                } /* loop through the sops */
@@ -893,15 +893,15 @@ done:
        /* Do a wakeup if any semaphore was up'd. */
        if (do_wakeup) {
 #ifdef SEM_DEBUG
-               printf("semop:  doing wakeup\n");
+               kprintf("semop:  doing wakeup\n");
 #endif
                wakeup((caddr_t)semaptr);
 #ifdef SEM_DEBUG
-               printf("semop:  back from wakeup\n");
+               kprintf("semop:  back from wakeup\n");
 #endif
        }
 #ifdef SEM_DEBUG
-       printf("semop:  done\n");
+       kprintf("semop:  done\n");
 #endif
        uap->sysmsg_result = 0;
        return(0);
@@ -936,7 +936,7 @@ semexit(p)
                return;
 
 #ifdef SEM_DEBUG
-       printf("proc @%08x has undo structure with %d entries\n", p,
+       kprintf("proc @%08x has undo structure with %d entries\n", p,
            suptr->un_cnt);
 #endif
 
@@ -959,7 +959,7 @@ semexit(p)
                                panic("semexit - semnum out of range");
 
 #ifdef SEM_DEBUG
-                       printf("semexit:  %08x id=%d num=%d(adj=%d) ; sem=%d\n",
+                       kprintf("semexit:  %08x id=%d num=%d(adj=%d) ; sem=%d\n",
                            suptr->un_proc, suptr->un_ent[ix].un_id,
                            suptr->un_ent[ix].un_num,
                            suptr->un_ent[ix].un_adjval,
@@ -977,7 +977,7 @@ semexit(p)
 
                        wakeup((caddr_t)semaptr);
 #ifdef SEM_DEBUG
-                       printf("semexit:  back from wakeup\n");
+                       kprintf("semexit:  back from wakeup\n");
 #endif
                }
        }
@@ -986,7 +986,7 @@ semexit(p)
         * Deallocate the undo vector.
         */
 #ifdef SEM_DEBUG
-       printf("removing vector\n");
+       kprintf("removing vector\n");
 #endif
        suptr->un_proc = NULL;
        *supptr = suptr->un_next;
index a2098cf..798c2ea 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)tty.c       8.8 (Berkeley) 1/21/94
  * $FreeBSD: src/sys/kern/tty.c,v 1.129.2.5 2002/03/11 01:32:31 dd Exp $
- * $DragonFly: src/sys/kern/tty.c,v 1.32 2006/12/20 18:14:41 dillon Exp $
+ * $DragonFly: src/sys/kern/tty.c,v 1.33 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*-
@@ -286,7 +286,7 @@ ttyclearsession(struct tty *tp)
                if (sp->s_ttyp == tp) {
                        sp->s_ttyp = NULL;
                } else {
-                       printf("ttyclearsession: warning: sp->s_ttyp != tp "
+                       kprintf("ttyclearsession: warning: sp->s_ttyp != tp "
                                "%p/%p\n", sp->s_ttyp, tp);
                }
 #endif
@@ -1339,7 +1339,7 @@ again:
                         * next line discipline (although we should do more
                         * to send the START char).  Not clearing the state
                         * may have caused the "putc to a clist with no
-                        * reserved cblocks" panic/printf.
+                        * reserved cblocks" panic/kprintf.
                         */
                        CLR(tp->t_state, TS_TBLOCK);
 
@@ -2117,7 +2117,7 @@ ttyrub(c, tp)
                                break;
                        default:                        /* XXX */
 #define        PANICSTR        "ttyrub: would panic c = %d, val = %d\n"
-                               (void)printf(PANICSTR, c, CCLASS(c));
+                               (void)kprintf(PANICSTR, c, CCLASS(c));
 #ifdef notdef
                                panic(PANICSTR, c, CCLASS(c));
 #endif
index 05b3d90..ef5dd8d 100644 (file)
@@ -32,7 +32,7 @@
  *
  *     @(#)tty_compat.c        8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/kern/tty_compat.c,v 1.29 1999/08/28 00:46:20 peter Exp $
- * $DragonFly: src/sys/kern/tty_compat.c,v 1.4 2003/08/26 21:09:02 rob Exp $
+ * $DragonFly: src/sys/kern/tty_compat.c,v 1.5 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_compat.h"
@@ -247,7 +247,7 @@ ttcompat(tp, com, data, flag)
                   | (tp->t_flags & 0xffff);
                *(int *)data = tp->t_flags>>16;
                if (ttydebug)
-                       printf("CLGET: returning %x\n", *(int *)data);
+                       kprintf("CLGET: returning %x\n", *(int *)data);
                break;
 
        case OTIOCGETD:
@@ -328,7 +328,7 @@ ttcompatgetflags(tp)
                flags |= DECCTQ;
        flags |= lflag&(ECHO|TOSTOP|FLUSHO|PENDIN|NOFLSH);
        if (ttydebug)
-               printf("getflags: %x\n", flags);
+               kprintf("getflags: %x\n", flags);
        return (flags);
 }
 
index e86d650..4558d44 100644 (file)
@@ -25,7 +25,7 @@
  * SUCH DAMAGE.
  *
  * $FreeBSD: src/sys/kern/tty_subr.c,v 1.32 1999/08/28 00:46:21 peter Exp $
- * $DragonFly: src/sys/kern/tty_subr.c,v 1.9 2006/10/19 18:44:00 swildner Exp $
+ * $DragonFly: src/sys/kern/tty_subr.c,v 1.10 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -75,7 +75,7 @@ DB_SHOW_COMMAND(cbstat, cbstat)
 {
        int cbsize = CBSIZE;
 
-       printf(
+       kprintf(
        "tot = %d (active = %d, free = %d (reserved = %d, slush = %d))\n",
               ctotcount * cbsize, ctotcount * cbsize - cfreecount, cfreecount,
               cfreecount - cslushcount * cbsize, cslushcount * cbsize);
@@ -154,7 +154,7 @@ cblock_alloc_cblocks(int number)
        for (i = 0; i < number; ++i) {
                cbp = kmalloc(sizeof *cbp, M_TTYS, M_NOWAIT);
                if (cbp == NULL) {
-                       printf(
+                       kprintf(
 "clist_alloc_cblocks: M_NOWAIT kmalloc failed, trying M_WAITOK\n");
                        cbp = kmalloc(sizeof *cbp, M_TTYS, M_WAITOK);
                }
@@ -396,7 +396,7 @@ clist_putc(int chr, struct clist *clistp)
        if (clistp->c_cl == NULL) {
                if (clistp->c_cbreserved < 1) {
                        crit_exit();
-                       printf("putc to a clist with no reserved cblocks\n");
+                       kprintf("putc to a clist with no reserved cblocks\n");
                        return (-1);            /* nothing done */
                }
                cblockp = cblock_alloc();
@@ -473,7 +473,7 @@ b_to_q(char *src, int amount, struct clist *clistp)
        if (clistp->c_cl == NULL) {
                if (clistp->c_cbreserved < 1) {
                        crit_exit();
-                       printf("b_to_q to a clist with no reserved cblocks.\n");
+                       kprintf("b_to_q to a clist with no reserved cblocks.\n");
                        return (amount);        /* nothing done */
                }
                cblockp = cblock_alloc();
index 76f7930..07d9812 100644 (file)
@@ -82,7 +82,7 @@
  *
  * @(#)uipc_mbuf.c     8.2 (Berkeley) 1/4/94
  * $FreeBSD: src/sys/kern/uipc_mbuf.c,v 1.51.2.24 2003/04/15 06:59:29 silby Exp $
- * $DragonFly: src/sys/kern/uipc_mbuf.c,v 1.58 2006/12/17 19:28:30 dillon Exp $
+ * $DragonFly: src/sys/kern/uipc_mbuf.c,v 1.59 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_param.h"
@@ -720,7 +720,7 @@ m_free(struct mbuf *m)
                static int afewtimes = 10;
 
                if (afewtimes-- > 0) {
-                       printf("mfree: m->m_nextpkt != NULL\n");
+                       kprintf("mfree: m->m_nextpkt != NULL\n");
                        db_print_backtrace();
                }
 #endif
@@ -1445,7 +1445,7 @@ m_print(const struct mbuf *m)
        len = m->m_pkthdr.len;
        m2 = m;
        while (len) {
-               printf("%p %*D\n", m2, m2->m_len, (u_char *)m2->m_data, "-");
+               kprintf("%p %*D\n", m2, m2->m_len, (u_char *)m2->m_data, "-");
                len -= m2->m_len;
                m2 = m2->m_next;
        }
index 0b62c6b..53b42db 100644 (file)
@@ -1,5 +1,5 @@
 /*     $FreeBSD: src/sys/kern/uipc_mbuf2.c,v 1.2.2.5 2003/01/23 21:06:44 sam Exp $     */
-/*     $DragonFly: src/sys/kern/uipc_mbuf2.c,v 1.12 2006/09/05 00:55:45 dillon Exp $   */
+/*     $DragonFly: src/sys/kern/uipc_mbuf2.c,v 1.13 2006/12/23 00:35:04 swildner Exp $ */
 /*     $KAME: uipc_mbuf2.c,v 1.31 2001/11/28 11:08:53 itojun Exp $     */
 /*     $NetBSD: uipc_mbuf.c,v 1.40 1999/04/01 00:23:25 thorpej Exp $   */
 
@@ -112,10 +112,10 @@ m_pulldown(m, off, len, offp)
 #ifdef PULLDOWN_DEBUG
     {
        struct mbuf *t;
-       printf("before:");
+       kprintf("before:");
        for (t = m; t; t = t->m_next)
-               printf(" %d", t->m_len);
-       printf("\n");
+               kprintf(" %d", t->m_len);
+       kprintf("\n");
     }
 #endif
        n = m;
@@ -230,10 +230,10 @@ ok:
 #ifdef PULLDOWN_DEBUG
     {
        struct mbuf *t;
-       printf("after:");
+       kprintf("after:");
        for (t = m; t; t = t->m_next)
-               printf("%c%d", t == n ? '*' : ' ', t->m_len);
-       printf(" (off=%d)\n", off);
+               kprintf("%c%d", t == n ? '*' : ' ', t->m_len);
+       kprintf(" (off=%d)\n", off);
     }
 #endif
        if (offp)
index 694c674..a795872 100644 (file)
@@ -33,7 +33,7 @@
  *
  *     @(#)uipc_socket2.c      8.1 (Berkeley) 6/10/93
  * $FreeBSD: src/sys/kern/uipc_socket2.c,v 1.55.2.17 2002/08/31 19:04:55 dwmalone Exp $
- * $DragonFly: src/sys/kern/uipc_socket2.c,v 1.24 2006/09/05 00:55:45 dillon Exp $
+ * $DragonFly: src/sys/kern/uipc_socket2.c,v 1.25 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_param.h"
@@ -521,7 +521,7 @@ _sbcheck(struct sockbuf *sb)
        for (m = sb->sb_mb; m; m = n) {
            n = m->m_nextpkt;
            if (n == NULL && sb->sb_lastrecord != m) {
-                   printf("sockbuf %p mismatched lastrecord %p vs %p\n", sb, sb->sb_lastrecord, m);
+                   kprintf("sockbuf %p mismatched lastrecord %p vs %p\n", sb, sb->sb_lastrecord, m);
                    panic("sbcheck1");
                
            }
@@ -532,7 +532,7 @@ _sbcheck(struct sockbuf *sb)
                        mbcnt += m->m_ext.ext_size;
                if (n == NULL && m->m_next == NULL) {
                        if (sb->sb_lastmbuf != m) {
-                               printf("sockbuf %p mismatched lastmbuf %p vs %p\n", sb, sb->sb_lastmbuf, m);
+                               kprintf("sockbuf %p mismatched lastmbuf %p vs %p\n", sb, sb->sb_lastmbuf, m);
                                panic("sbcheck2");
                        }
                }
@@ -540,18 +540,18 @@ _sbcheck(struct sockbuf *sb)
        }
        if (sb->sb_mb == NULL) {
            if (sb->sb_lastrecord != NULL) {
-               printf("sockbuf %p is empty, lastrecord not NULL: %p\n",
+               kprintf("sockbuf %p is empty, lastrecord not NULL: %p\n",
                        sb, sb->sb_lastrecord);
                panic("sbcheck3");
            }
            if (sb->sb_lastmbuf != NULL) {
-               printf("sockbuf %p is empty, lastmbuf not NULL: %p\n",
+               kprintf("sockbuf %p is empty, lastmbuf not NULL: %p\n",
                        sb, sb->sb_lastmbuf);
                panic("sbcheck4");
            }
        }
        if (len != sb->sb_cc || mbcnt != sb->sb_mbcnt) {
-               printf("sockbuf %p cc %ld != %ld || mbcnt %ld != %ld\n",
+               kprintf("sockbuf %p cc %ld != %ld || mbcnt %ld != %ld\n",
                    sb, len, sb->sb_cc, mbcnt, sb->sb_mbcnt);
                panic("sbcheck5");
        }
@@ -826,7 +826,7 @@ sbcompress(struct sockbuf *sb, struct mbuf *m, struct mbuf *tailm)
                if (tailm)
                        tailm->m_flags |= eor;
                else
-                       printf("semi-panic: sbcompress");
+                       kprintf("semi-panic: sbcompress");
        }
 
        /*
index da2d794..7a5592a 100644 (file)
@@ -23,7 +23,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/usched_bsd4.c,v 1.17 2006/11/07 18:50:06 dillon Exp $
+ * $DragonFly: src/sys/kern/usched_bsd4.c,v 1.18 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -670,7 +670,7 @@ bsd4_recalculate_estcpu(struct lwp *lp)
                if ((nleft = nticks - lp->lwp_cpticks) < 0)
                        nleft = 0;
                if (usched_debug == lp->lwp_proc->p_pid) {
-                       printf("pid %d tid %d estcpu %d cpticks %d nticks %d nleft %d",
+                       kprintf("pid %d tid %d estcpu %d cpticks %d nticks %d nleft %d",
                                lp->lwp_proc->p_pid, lp->lwp_tid, lp->lwp_estcpu,
                                lp->lwp_cpticks, nticks, nleft);
                }
@@ -695,7 +695,7 @@ bsd4_recalculate_estcpu(struct lwp *lp)
                        lp->lwp_estcpu >>= 1;
 
                if (usched_debug == lp->lwp_proc->p_pid)
-                       printf(" ndecay %d estcpu %d\n", ndecay, lp->lwp_estcpu);
+                       kprintf(" ndecay %d estcpu %d\n", ndecay, lp->lwp_estcpu);
                bsd4_resetpriority(lp);
                lp->lwp_cpbase = cpbase;
                lp->lwp_cpticks = 0;
@@ -1164,7 +1164,7 @@ sched_thread_cpu_init(void)
     int i;
 
     if (bootverbose)
-       printf("start scheduler helpers on cpus:");
+       kprintf("start scheduler helpers on cpus:");
 
     for (i = 0; i < ncpus; ++i) {
        bsd4_pcpu_t dd = &bsd4_pcpu[i];
@@ -1174,7 +1174,7 @@ sched_thread_cpu_init(void)
            continue;
 
        if (bootverbose)
-           printf(" %d", i);
+           kprintf(" %d", i);
 
        lwkt_create(sched_thread, NULL, NULL, &dd->helper_thread, 
                    TDF_STOPREQ, i, "usched %d", i);
@@ -1188,7 +1188,7 @@ sched_thread_cpu_init(void)
        atomic_set_int(&bsd4_rdyprocmask, mask);
     }
     if (bootverbose)
-       printf("\n");
+       kprintf("\n");
 }
 SYSINIT(uschedtd, SI_SUB_FINISH_SMP, SI_ORDER_ANY, sched_thread_cpu_init, NULL)
 
index d31ba12..00a6168 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/usched_dummy.c,v 1.4 2006/11/07 18:50:06 dillon Exp $
+ * $DragonFly: src/sys/kern/usched_dummy.c,v 1.5 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -513,7 +513,7 @@ dummy_sched_thread_cpu_init(void)
     int i;
 
     if (bootverbose)
-       printf("start dummy scheduler helpers on cpus:");
+       kprintf("start dummy scheduler helpers on cpus:");
 
     for (i = 0; i < ncpus; ++i) {
        dummy_pcpu_t dd = &dummy_pcpu[i];
@@ -523,7 +523,7 @@ dummy_sched_thread_cpu_init(void)
            continue;
 
        if (bootverbose)
-           printf(" %d", i);
+           kprintf(" %d", i);
 
        lwkt_create(dummy_sched_thread, NULL, NULL, &dd->helper_thread, 
                    TDF_STOPREQ, i, "dsched %d", i);
@@ -537,7 +537,7 @@ dummy_sched_thread_cpu_init(void)
        atomic_set_int(&dummy_rdyprocmask, mask);
     }
     if (bootverbose)
-       printf("\n");
+       kprintf("\n");
 }
 SYSINIT(uschedtd, SI_SUB_FINISH_SMP, SI_ORDER_ANY,
        dummy_sched_thread_cpu_init, NULL)
index 1c93100..1f3b4a7 100644 (file)
@@ -14,7 +14,7 @@
  * of the author.  This software is distributed AS-IS.
  *
  * $FreeBSD: src/sys/kern/vfs_aio.c,v 1.70.2.28 2003/05/29 06:15:35 alc Exp $
- * $DragonFly: src/sys/kern/vfs_aio.c,v 1.31 2006/09/19 11:47:35 corecode Exp $
+ * $DragonFly: src/sys/kern/vfs_aio.c,v 1.32 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -496,7 +496,7 @@ restart4:
                        zfree(aiolio_zone, lj);
                } else {
 #ifdef DIAGNOSTIC
-                       printf("LIO job not cleaned up: B:%d, BF:%d, Q:%d, "
+                       kprintf("LIO job not cleaned up: B:%d, BF:%d, Q:%d, "
                            "QF:%d\n", lj->lioj_buffer_count,
                            lj->lioj_buffer_finished_count,
                            lj->lioj_queue_count,
@@ -812,7 +812,7 @@ aio_daemon(void *uproc)
                        pmap_activate(mycp);
 #ifdef DIAGNOSTIC
                        if (tmpvm == myvm) {
-                               printf("AIOD: vmspace problem -- %d\n",
+                               kprintf("AIOD: vmspace problem -- %d\n",
                                    mycp->p_pid);
                        }
 #endif
@@ -850,7 +850,7 @@ aio_daemon(void *uproc)
                                        num_aio_procs--;
 #ifdef DIAGNOSTIC
                                        if (mycp->p_vmspace->vm_refcnt <= 1) {
-                                               printf("AIOD: bad vm refcnt for"
+                                               kprintf("AIOD: bad vm refcnt for"
                                                    " exiting daemon: %d\n",
                                                    mycp->p_vmspace->vm_refcnt);
                                        }
index 711b620..80672ef 100644 (file)
@@ -12,7 +12,7 @@
  *             John S. Dyson.
  *
  * $FreeBSD: src/sys/kern/vfs_bio.c,v 1.242.2.20 2003/05/28 18:38:10 alc Exp $
- * $DragonFly: src/sys/kern/vfs_bio.c,v 1.81 2006/09/19 16:06:11 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_bio.c,v 1.82 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -839,11 +839,11 @@ bdirty(struct buf *bp)
 {
        KASSERT(bp->b_qindex == BQUEUE_NONE, ("bdirty: buffer %p still on queue %d", bp, bp->b_qindex));
        if (bp->b_flags & B_NOCACHE) {
-               printf("bdirty: clearing B_NOCACHE on buf %p\n", bp);
+               kprintf("bdirty: clearing B_NOCACHE on buf %p\n", bp);
                bp->b_flags &= ~B_NOCACHE;
        }
        if (bp->b_flags & B_INVAL) {
-               printf("bdirty: warning, dirtying invalid buffer %p\n", bp);
+               kprintf("bdirty: warning, dirtying invalid buffer %p\n", bp);
        }
        bp->b_flags &= ~B_RELBUF;
 
@@ -1173,7 +1173,7 @@ brelse(struct buf *bp)
                if (bp->b_flags & (B_INVAL | B_RELBUF)) {
 #if 0
                        if (bp->b_vp)
-                               printf("brelse bp %p %08x/%08x: Warning, caught and fixed brelvp bug\n", bp, saved_flags, bp->b_flags);
+                               kprintf("brelse bp %p %08x/%08x: Warning, caught and fixed brelvp bug\n", bp, saved_flags, bp->b_flags);
 #endif
                        if (bp->b_bufsize)
                                allocbuf(bp, 0);
@@ -1651,7 +1651,7 @@ restart:
                 * should also be non-zero at this point.  XXX
                 */
                if (defrag && bp->b_kvasize == 0) {
-                       printf("Warning: defrag empty buffer %p\n", bp);
+                       kprintf("Warning: defrag empty buffer %p\n", bp);
                        continue;
                }
 
@@ -1664,12 +1664,12 @@ restart:
                 */
 
                if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT) != 0) {
-                       printf("getnewbuf: warning, locked buf %p, race corrected\n", bp);
+                       kprintf("getnewbuf: warning, locked buf %p, race corrected\n", bp);
                        tsleep(&bd_request, 0, "gnbxxx", hz / 100);
                        goto restart;
                }
                if (bp->b_qindex != qindex) {
-                       printf("getnewbuf: warning, BUF_LOCK blocked unexpectedly on buf %p index %d->%d, race corrected\n", bp, qindex, bp->b_qindex);
+                       kprintf("getnewbuf: warning, BUF_LOCK blocked unexpectedly on buf %p index %d->%d, race corrected\n", bp, qindex, bp->b_qindex);
                        BUF_UNLOCK(bp);
                        goto restart;
                }
@@ -2041,9 +2041,9 @@ vfs_setdirty(struct buf *bp)
        object = bp->b_xio.xio_pages[0]->object;
 
        if ((object->flags & OBJ_WRITEABLE) && !(object->flags & OBJ_MIGHTBEDIRTY))
-               printf("Warning: object %p writeable but not mightbedirty\n", object);
+               kprintf("Warning: object %p writeable but not mightbedirty\n", object);
        if (!(object->flags & OBJ_WRITEABLE) && (object->flags & OBJ_MIGHTBEDIRTY))
-               printf("Warning: object %p mightbedirty but not writeable\n", object);
+               kprintf("Warning: object %p mightbedirty but not writeable\n", object);
 
        if (object->flags & (OBJ_MIGHTBEDIRTY|OBJ_CLEANING)) {
                vm_offset_t boffset;
@@ -2213,7 +2213,7 @@ loop:
                 * as well.
                 */
                if (bp->b_vp != vp || bp->b_loffset != loffset) {
-                       printf("Warning buffer %p (vp %p loffset %lld) was recycled\n", bp, vp, loffset);
+                       kprintf("Warning buffer %p (vp %p loffset %lld) was recycled\n", bp, vp, loffset);
                        BUF_UNLOCK(bp);
                        goto loop;
                }
@@ -2229,7 +2229,7 @@ loop:
                 * block number translation.
                 */
                if ((bp->b_flags & B_INVAL) && (bp->b_bio2.bio_offset != NOOFFSET)) {
-                       printf("Warning invalid buffer %p (vp %p loffset %lld) did not have cleared bio_offset cache\n", bp, vp, loffset);
+                       kprintf("Warning invalid buffer %p (vp %p loffset %lld) did not have cleared bio_offset cache\n", bp, vp, loffset);
                        clearbiocache(&bp->b_bio2);
                }
 
@@ -2890,7 +2890,7 @@ biodone(struct bio *bio)
 
 #if defined(VFS_BIO_DEBUG)
                if (obj->paging_in_progress < bp->b_xio.xio_npages) {
-                       printf("biodone: paging in progress(%d) < bp->b_xio.xio_npages(%d)\n",
+                       kprintf("biodone: paging in progress(%d) < bp->b_xio.xio_npages(%d)\n",
                            obj->paging_in_progress, bp->b_xio.xio_npages);
                }
 #endif
@@ -2931,7 +2931,7 @@ biodone(struct bio *bio)
                        }
 #if defined(VFS_BIO_DEBUG)
                        if (OFF_TO_IDX(foff) != m->pindex) {
-                               printf(
+                               kprintf(
 "biodone: foff(%lu)/m->pindex(%d) mismatch\n",
                                    (unsigned long)foff, m->pindex);
                        }
@@ -2953,21 +2953,21 @@ biodone(struct bio *bio)
                         * have not set the page busy flag correctly!!!
                         */
                        if (m->busy == 0) {
-                               printf("biodone: page busy < 0, "
+                               kprintf("biodone: page busy < 0, "
                                    "pindex: %d, foff: 0x(%x,%x), "
                                    "resid: %d, index: %d\n",
                                    (int) m->pindex, (int)(foff >> 32),
                                                (int) foff & 0xffffffff, resid, i);
                                if (!vn_isdisk(vp, NULL))
-                                       printf(" iosize: %ld, loffset: %lld, flags: 0x%08x, npages: %d\n",
+                                       kprintf(" iosize: %ld, loffset: %lld, flags: 0x%08x, npages: %d\n",
                                            bp->b_vp->v_mount->mnt_stat.f_iosize,
                                            bp->b_loffset,
                                            bp->b_flags, bp->b_xio.xio_npages);
                                else
-                                       printf(" VDEV, loffset: %lld, flags: 0x%08x, npages: %d\n",
+                                       kprintf(" VDEV, loffset: %lld, flags: 0x%08x, npages: %d\n",
                                            bp->b_loffset,
                                            bp->b_flags, bp->b_xio.xio_npages);
-                               printf(" valid: 0x%x, dirty: 0x%x, wired: %d\n",
+                               kprintf(" valid: 0x%x, dirty: 0x%x, wired: %d\n",
                                    m->valid, m->dirty, m->wire_count);
                                panic("biodone: page busy < 0");
                        }
@@ -3382,7 +3382,7 @@ vm_hold_free_pages(struct buf *bp, vm_offset_t from, vm_offset_t to)
                p = bp->b_xio.xio_pages[index];
                if (p && (index < bp->b_xio.xio_npages)) {
                        if (p->busy) {
-                               printf("vm_hold_free_pages: doffset: %lld, loffset: %lld\n",
+                               kprintf("vm_hold_free_pages: doffset: %lld, loffset: %lld\n",
                                        bp->b_bio2.bio_offset, bp->b_loffset);
                        }
                        bp->b_xio.xio_pages[index] = NULL;
@@ -3455,7 +3455,7 @@ retry:
                 */
                pa = pmap_extract(&curproc->p_vmspace->vm_pmap, (vm_offset_t)addr);
                if (pa == 0) {
-                       printf("vmapbuf: warning, race against user address during I/O");
+                       kprintf("vmapbuf: warning, race against user address during I/O");
                        goto retry;
                }
                m = PHYS_TO_VM_PAGE(pa);
@@ -3548,11 +3548,11 @@ vfs_bufstats(void)
                         count++;
                 }
                crit_exit();
-                printf("%s: total-%d", bname[i], count);
+                kprintf("%s: total-%d", bname[i], count);
                 for (j = 0; j <= MAXBSIZE/PAGE_SIZE; j++)
                         if (counts[j] != 0)
-                                printf(", %d-%d", j * PAGE_SIZE, counts[j]);
-                printf("\n");
+                                kprintf(", %d-%d", j * PAGE_SIZE, counts[j]);
+                kprintf("\n");
         }
 }
 #endif
index d83f120..b4b0c1c 100644 (file)
@@ -67,7 +67,7 @@
  *
  *     @(#)vfs_cache.c 8.5 (Berkeley) 3/22/95
  * $FreeBSD: src/sys/kern/vfs_cache.c,v 1.42.2.6 2001/10/05 20:07:03 dillon Exp $
- * $DragonFly: src/sys/kern/vfs_cache.c,v 1.79 2006/10/27 04:56:31 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_cache.c,v 1.80 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -430,14 +430,14 @@ _cache_lock(struct namecache *ncp)
                        if (didwarn)
                                continue;
                        didwarn = 1;
-                       printf("[diagnostic] cache_lock: blocked on %p", ncp);
-                       printf(" \"%*.*s\"\n",
+                       kprintf("[diagnostic] cache_lock: blocked on %p", ncp);
+                       kprintf(" \"%*.*s\"\n",
                                ncp->nc_nlen, ncp->nc_nlen, ncp->nc_name);
                }
        }
 
        if (didwarn == 1) {
-               printf("[diagnostic] cache_lock: unblocked %*.*s\n",
+               kprintf("[diagnostic] cache_lock: unblocked %*.*s\n",
                        ncp->nc_nlen, ncp->nc_nlen, ncp->nc_name);
        }
 }
@@ -801,7 +801,7 @@ _cache_inval(struct namecache *ncp, int flags)
                r = _cache_inval_internal(ncp, flags, &track);
                if (track.resume_ncp == NULL)
                        break;
-               printf("Warning: deep namecache recursion at %s\n",
+               kprintf("Warning: deep namecache recursion at %s\n",
                        ncp->nc_name);
                _cache_unlock(ncp);
                while ((ncp2 = track.resume_ncp) != NULL) {
@@ -904,7 +904,7 @@ restart:
                        _cache_hold(next);
                _cache_lock(ncp);
                if (ncp->nc_vp != vp) {
-                       printf("Warning: cache_inval_vp: race-A detected on "
+                       kprintf("Warning: cache_inval_vp: race-A detected on "
                                "%s\n", ncp->nc_name);
                        _cache_put(ncp);
                        if (next)
@@ -915,7 +915,7 @@ restart:
                _cache_put(ncp);                /* also releases reference */
                ncp = next;
                if (ncp && ncp->nc_vp != vp) {
-                       printf("Warning: cache_inval_vp: race-B detected on "
+                       kprintf("Warning: cache_inval_vp: race-B detected on "
                                "%s\n", ncp->nc_name);
                        _cache_drop(ncp);
                        goto restart;
@@ -953,7 +953,7 @@ cache_rename(struct nchandle *fnch, struct nchandle *tnch)
        _cache_setunresolved(tncp);
        while (_cache_inval(tncp, CINV_CHILDREN) != 0) {
                if (didwarn++ % 10 == 0) {
-                       printf("Warning: cache_rename: race during "
+                       kprintf("Warning: cache_rename: race during "
                                "rename %s->%s\n",
                                fncp->nc_name, tncp->nc_name);
                }
@@ -1013,7 +1013,7 @@ again:
                 * could be in the middle of a reclaim.
                 */
                if (vp->v_flag & VRECLAIMED) {
-                       printf("Warning: vnode reclaim race detected in cache_vget on %p (%s)\n", vp, ncp->nc_name);
+                       kprintf("Warning: vnode reclaim race detected in cache_vget on %p (%s)\n", vp, ncp->nc_name);
                        _cache_lock(ncp);
                        _cache_setunresolved(ncp);
                        _cache_unlock(ncp);
@@ -1065,7 +1065,7 @@ again:
                 * to retry.
                 */
                if (vp->v_flag & VRECLAIMED) {
-                       printf("Warning: vnode reclaim race detected on cache_vref %p (%s)\n", vp, ncp->nc_name);
+                       kprintf("Warning: vnode reclaim race detected on cache_vref %p (%s)\n", vp, ncp->nc_name);
                        _cache_lock(ncp);
                        _cache_setunresolved(ncp);
                        _cache_unlock(ncp);
@@ -1229,7 +1229,7 @@ cache_fromdvp(struct vnode *dvp, struct ucred *cred, int makeit,
         */
        if (ncvp_debug >= 3 && makeit && TAILQ_FIRST(&dvp->v_namecache)) {
                nch->ncp = TAILQ_FIRST(&dvp->v_namecache);
-               printf("cache_fromdvp: forcing %s\n", nch->ncp->nc_name);
+               kprintf("cache_fromdvp: forcing %s\n", nch->ncp->nc_name);
                goto force;
        }
 
@@ -1248,17 +1248,17 @@ force:
                        error = cache_resolve_mp(nch->mount);
                        _cache_put(nch->ncp);
                        if (ncvp_debug) {
-                               printf("cache_fromdvp: resolve root of mount %p error %d", 
+                               kprintf("cache_fromdvp: resolve root of mount %p error %d", 
                                        dvp->v_mount, error);
                        }
                        if (error) {
                                if (ncvp_debug)
-                                       printf(" failed\n");
+                                       kprintf(" failed\n");
                                nch->ncp = NULL;
                                break;
                        }
                        if (ncvp_debug)
-                               printf(" succeeded\n");
+                               kprintf(" succeeded\n");
                        continue;
                }
 
@@ -1271,7 +1271,7 @@ force:
                if (makeit > 20) {
                        error = cache_fromdvp_try(dvp, cred, &saved_dvp);
                        if (error) {
-                               printf("lookupdotdot(longpath) failed %d "
+                               kprintf("lookupdotdot(longpath) failed %d "
                                       "dvp %p\n", error, dvp);
                                break;
                        }
@@ -1283,7 +1283,7 @@ force:
                 */
                error = vop_nlookupdotdot(*dvp->v_ops, dvp, &pvp, cred);
                if (error) {
-                       printf("lookupdotdot failed %d dvp %p\n", error, dvp);
+                       kprintf("lookupdotdot failed %d dvp %p\n", error, dvp);
                        break;
                }
                vn_unlock(pvp);
@@ -1306,13 +1306,13 @@ force:
                error = cache_inefficient_scan(nch, cred, dvp);
                _cache_drop(nch->ncp);
                if (error) {
-                       printf("cache_fromdvp: scan %p (%s) failed on dvp=%p\n",
+                       kprintf("cache_fromdvp: scan %p (%s) failed on dvp=%p\n",
                                pvp, nch->ncp->nc_name, dvp);
                        nch->ncp = NULL;
                        break;
                }
                if (ncvp_debug) {
-                       printf("cache_fromdvp: scan %p (%s) succeeded\n",
+                       kprintf("cache_fromdvp: scan %p (%s) succeeded\n",
                                pvp, nch->ncp->nc_name);
                }
        }
@@ -1379,7 +1379,7 @@ cache_fromdvp_try(struct vnode *dvp, struct ucred *cred,
        }
        if (last_fromdvp_report != time_second) {
                last_fromdvp_report = time_second;
-               printf("Warning: extremely inefficient path resolution on %s\n",
+               kprintf("Warning: extremely inefficient path resolution on %s\n",
                        nch.ncp->nc_name);
        }
        error = cache_inefficient_scan(&nch, cred, dvp);
@@ -1444,7 +1444,7 @@ cache_inefficient_scan(struct nchandle *nch, struct ucred *cred,
        if ((error = cache_vref(nch, cred, &pvp)) != 0)
                return (error);
        if (ncvp_debug)
-               printf("inefficient_scan: directory iosize %ld vattr fileid = %ld\n", vat.va_blocksize, (long)vat.va_fileid);
+               kprintf("inefficient_scan: directory iosize %ld vattr fileid = %ld\n", vat.va_blocksize, (long)vat.va_fileid);
        if ((blksize = vat.va_blocksize) == 0)
                blksize = DEV_BSIZE;
        rbuf = kmalloc(blksize, M_TEMP, M_WAITOK);
@@ -1463,7 +1463,7 @@ again:
        uio.uio_td = curthread;
 
        if (ncvp_debug >= 2)
-               printf("cache_inefficient_scan: readdir @ %08x\n", (int)uio.uio_offset);
+               kprintf("cache_inefficient_scan: readdir @ %08x\n", (int)uio.uio_offset);
        error = VOP_READDIR(pvp, &uio, cred, &eofflag, NULL, NULL);
        if (error == 0) {
                den = (struct dirent *)rbuf;
@@ -1471,14 +1471,14 @@ again:
 
                while (bytes > 0) {
                        if (ncvp_debug >= 2) {
-                               printf("cache_inefficient_scan: %*.*s\n",
+                               kprintf("cache_inefficient_scan: %*.*s\n",
                                        den->d_namlen, den->d_namlen, 
                                        den->d_name);
                        }
                        if (den->d_type != DT_WHT &&
                            den->d_ino == vat.va_fileid) {
                                if (ncvp_debug) {
-                                       printf("cache_inefficient_scan: "
+                                       kprintf("cache_inefficient_scan: "
                                               "MATCHED inode %ld path %s/%*.*s\n",
                                               vat.va_fileid, nch->ncp->nc_name,
                                               den->d_namlen, den->d_namlen,
@@ -1501,12 +1501,12 @@ again:
                if (rncp.ncp->nc_flag & NCF_UNRESOLVED) {
                        _cache_setvp(rncp.ncp, dvp);
                        if (ncvp_debug >= 2) {
-                               printf("cache_inefficient_scan: setvp %s/%s = %p\n",
+                               kprintf("cache_inefficient_scan: setvp %s/%s = %p\n",
                                        nch->ncp->nc_name, rncp.ncp->nc_name, dvp);
                        }
                } else {
                        if (ncvp_debug >= 2) {
-                               printf("cache_inefficient_scan: setvp %s/%s already set %p/%p\n", 
+                               kprintf("cache_inefficient_scan: setvp %s/%s already set %p/%p\n", 
                                        nch->ncp->nc_name, rncp.ncp->nc_name, dvp,
                                        rncp.ncp->nc_vp);
                        }
@@ -1515,7 +1515,7 @@ again:
                        error = rncp.ncp->nc_error;
                _cache_put(rncp.ncp);
        } else {
-               printf("cache_inefficient_scan: dvp %p NOT FOUND in %s\n",
+               kprintf("cache_inefficient_scan: dvp %p NOT FOUND in %s\n",
                        dvp, nch->ncp->nc_name);
                error = ENOENT;
        }
@@ -1871,7 +1871,7 @@ restart:
         * past the mount point).
         */
        if (ncp->nc_parent == NULL) {
-               printf("EXDEV case 1 %p %*.*s\n", ncp,
+               kprintf("EXDEV case 1 %p %*.*s\n", ncp,
                        ncp->nc_nlen, ncp->nc_nlen, ncp->nc_name);
                ncp->nc_error = EXDEV;
                return(ncp->nc_error);
@@ -1908,11 +1908,11 @@ restart:
                while (par->nc_parent && par->nc_parent->nc_vp == NULL)
                        par = par->nc_parent;
                if (par->nc_parent == NULL) {
-                       printf("EXDEV case 2 %*.*s\n",
+                       kprintf("EXDEV case 2 %*.*s\n",
                                par->nc_nlen, par->nc_nlen, par->nc_name);
                        return (EXDEV);
                }
-               printf("[diagnostic] cache_resolve: had to recurse on %*.*s\n",
+               kprintf("[diagnostic] cache_resolve: had to recurse on %*.*s\n",
                        par->nc_nlen, par->nc_nlen, par->nc_name);
                /*
                 * The parent is not set in stone, ref and lock it to prevent
@@ -1925,7 +1925,7 @@ restart:
                if (par == nch->mount->mnt_ncmountpt.ncp) {
                        cache_resolve_mp(nch->mount);
                } else if (par->nc_parent->nc_vp == NULL) {
-                       printf("[diagnostic] cache_resolve: raced on %*.*s\n", par->nc_nlen, par->nc_nlen, par->nc_name);
+                       kprintf("[diagnostic] cache_resolve: raced on %*.*s\n", par->nc_nlen, par->nc_nlen, par->nc_name);
                        _cache_put(par);
                        continue;
                } else if (par->nc_flag & NCF_UNRESOLVED) {
@@ -1935,13 +1935,13 @@ restart:
                }
                if ((error = par->nc_error) != 0) {
                        if (par->nc_error != EAGAIN) {
-                               printf("EXDEV case 3 %*.*s error %d\n",
+                               kprintf("EXDEV case 3 %*.*s error %d\n",
                                    par->nc_nlen, par->nc_nlen, par->nc_name,
                                    par->nc_error);
                                _cache_put(par);
                                return(error);
                        }
-                       printf("[diagnostic] cache_resolve: EAGAIN par %p %*.*s\n",
+                       kprintf("[diagnostic] cache_resolve: EAGAIN par %p %*.*s\n",
                                par, par->nc_nlen, par->nc_nlen, par->nc_name);
                }
                _cache_put(par);
@@ -1961,7 +1961,7 @@ restart:
        ncp->nc_error = VOP_NRESOLVE(&nctmp, cred);
        /*vop_nresolve(*ncp->nc_parent->nc_vp->v_ops, ncp, cred);*/
        if (ncp->nc_error == EAGAIN) {
-               printf("[diagnostic] cache_resolve: EAGAIN ncp %p %*.*s\n",
+               kprintf("[diagnostic] cache_resolve: EAGAIN ncp %p %*.*s\n",
                        ncp, ncp->nc_nlen, ncp->nc_nlen, ncp->nc_name);
                goto restart;
        }
@@ -2015,7 +2015,7 @@ cache_resolve_mp(struct mount *mp)
                                _cache_setvp(ncp, vp);
                                vput(vp);
                        } else {
-                               printf("[diagnostic] cache_resolve_mp: failed to resolve mount %p\n", mp);
+                               kprintf("[diagnostic] cache_resolve_mp: failed to resolve mount %p\n", mp);
                                _cache_setvp(ncp, NULL);
                        }
                } else if (error == 0) {
index cd5d3c0..ba425ab 100644 (file)
@@ -34,7 +34,7 @@
  *
  *     @(#)vfs_cluster.c       8.7 (Berkeley) 2/13/94
  * $FreeBSD: src/sys/kern/vfs_cluster.c,v 1.92.2.9 2001/11/18 07:10:59 dillon Exp $
- * $DragonFly: src/sys/kern/vfs_cluster.c,v 1.28 2006/09/05 03:48:12 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_cluster.c,v 1.29 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include "opt_debug_cluster.h"
@@ -208,7 +208,7 @@ single_block_read:
        if (bp) {
 #if defined(CLUSTERDEBUG)
                if (rcluster)
-                       printf("S(%lld,%d,%d) ",
+                       kprintf("S(%lld,%d,%d) ",
                            bp->b_loffset, bp->b_bcount, seqcount);
 #endif
                bp->b_cmd = BUF_CMD_READ;
@@ -266,12 +266,12 @@ single_block_read:
 #if defined(CLUSTERDEBUG)
                if (rcluster) {
                        if (bp)
-                               printf("A+(%lld,%d,%lld,%d) ",
+                               kprintf("A+(%lld,%d,%lld,%d) ",
                                    rbp->b_loffset, rbp->b_bcount,
                                    rbp->b_loffset - origoffset,
                                    seqcount);
                        else
-                               printf("A(%lld,%d,%lld,%d) ",
+                               kprintf("A(%lld,%d,%lld,%d) ",
                                    rbp->b_loffset, rbp->b_bcount,
                                    rbp->b_loffset - origoffset,
                                    seqcount);
@@ -460,9 +460,9 @@ cluster_rbuild(struct vnode *vp, off_t filesize, off_t loffset,
                 * 'size'.
                 */
                if (tbp->b_bcount != size)
-                   printf("warning: tbp->b_bcount wrong %d vs %d\n", tbp->b_bcount, size);
+                   kprintf("warning: tbp->b_bcount wrong %d vs %d\n", tbp->b_bcount, size);
                if (tbp->b_bufsize != size)
-                   printf("warning: tbp->b_bufsize wrong %d vs %d\n", tbp->b_bufsize, size);
+                   kprintf("warning: tbp->b_bufsize wrong %d vs %d\n", tbp->b_bufsize, size);
                bp->b_bcount += size;
                bp->b_bufsize += size;
        }
index 1299123..694a2d0 100644 (file)
@@ -26,7 +26,7 @@
  * SUCH DAMAGE.
  *
  *     $FreeBSD: src/sys/kern/vfs_conf.c,v 1.49.2.5 2003/01/07 11:56:53 joerg Exp $
- *     $DragonFly: src/sys/kern/vfs_conf.c,v 1.23 2006/12/20 18:14:41 dillon Exp $
+ *     $DragonFly: src/sys/kern/vfs_conf.c,v 1.24 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -202,7 +202,7 @@ vfs_mountroot_try(const char *mountfrom)
                return(error);          /* don't complain */
 
        crit_enter();
-       printf("Mounting root from %s\n", mountfrom);
+       kprintf("Mounting root from %s\n", mountfrom);
        crit_exit();
 
        /* parse vfs name and devname */
@@ -217,7 +217,7 @@ vfs_mountroot_try(const char *mountfrom)
        error = vfs_rootmountalloc(vfsname, 
                        devname[0] != 0 ? devname : ROOTNAME, &mp);
        if (error != 0) {
-               printf("Can't allocate root mount for filesystem '%s': %d\n",
+               kprintf("Can't allocate root mount for filesystem '%s': %d\n",
                       vfsname, error);
                goto done;
        }
@@ -225,7 +225,7 @@ vfs_mountroot_try(const char *mountfrom)
 
        /* do our best to set rootdev */
        if ((devname[0] != 0) && setrootbyname(devname))
-               printf("setrootbyname failed\n");
+               kprintf("setrootbyname failed\n");
 
        /* If the root device is a type "memory disk", mount RW */
        if (rootdev != NOCDEV && dev_is_good(rootdev) &&
@@ -245,7 +245,7 @@ done:
                        vfs_unbusy(mp);
                        kfree(mp, M_MOUNT);
                }
-               printf("Root mount failed: %d\n", error);
+               kprintf("Root mount failed: %d\n", error);
        } else {
                /* register with list of mounted filesystems */
                mountlist_insert(mp, MNTINS_FIRST);
@@ -268,23 +268,23 @@ vfs_mountroot_ask(void)
        cdev_t dev;
 
        for(;;) {
-               printf("\nManual root filesystem specification:\n");
-               printf("  <fstype>:<device>  Mount <device> using filesystem <fstype>\n");
-               printf("                       eg. ufs:da0s1a\n");
-               printf("  ?                  List valid disk boot devices\n");
-               printf("  <empty line>       Abort manual input\n");
-               printf("\nmountroot> ");
+               kprintf("\nManual root filesystem specification:\n");
+               kprintf("  <fstype>:<device>  Mount <device> using filesystem <fstype>\n");
+               kprintf("                       eg. ufs:da0s1a\n");
+               kprintf("  ?                  List valid disk boot devices\n");
+               kprintf("  <empty line>       Abort manual input\n");
+               kprintf("\nmountroot> ");
                gets(name);
                if (name[0] == 0)
                        return(1);
                if (name[0] == '?') {
-                       printf("Possibly valid devices for 'ufs' root:\n");
+                       kprintf("Possibly valid devices for 'ufs' root:\n");
                        for (i = 0; i < NUMCDEVSW; i++) {
                                dev = udev2dev(makeudev(i, 0), 0);
                                if (dev_is_good(dev))
-                                       printf(" \"%s\"", dev_dname(dev));
+                                       kprintf(" \"%s\"", dev_dname(dev));
                        }
-                       printf("\n");
+                       kprintf("\n");
                        continue;
                }
                if (!vfs_mountroot_try(name))
@@ -300,7 +300,7 @@ gets(char *cp)
 
        lp = cp;
        for (;;) {
-               printf("%c", c = cngetc() & 0177);
+               kprintf("%c", c = cngetc() & 0177);
                switch (c) {
                case -1:
                case '\n':
@@ -310,7 +310,7 @@ gets(char *cp)
                case '\b':
                case '\177':
                        if (lp > cp) {
-                               printf(" \b");
+                               kprintf(" \b");
                                lp--;
                        }
                        continue;
@@ -322,7 +322,7 @@ gets(char *cp)
                case '@':
                case 'u' & 037:
                        lp = cp;
-                       printf("%c", '\n');
+                       kprintf("%c", '\n');
                        continue;
                default:
                        *lp++ = c;
@@ -354,7 +354,7 @@ kgetdiskbyname(const char *name)
        while (*cp >= 'a' && *cp <= 'z')
                ++cp;
        if (cp == name) {
-               printf("missing device name\n");
+               kprintf("missing device name\n");
                return (NOCDEV);
        }
        nlen = cp - name;
@@ -364,7 +364,7 @@ kgetdiskbyname(const char *name)
         */
        unit = strtol(cp, &cp, 10);
        if (name + nlen == (const char *)cp || unit < 0 || unit > DKMAXUNIT) {
-               printf("bad unit: %d\n", unit);
+               kprintf("bad unit: %d\n", unit);
                return (NOCDEV);
        }
 
@@ -377,7 +377,7 @@ kgetdiskbyname(const char *name)
        if (*cp == 's') {
                slice = cp[1] - '0';
                if (slice < 1 || slice > 9) {
-                       printf("bad slice number\n");
+                       kprintf("bad slice number\n");
                        return(NOCDEV);
                }
                ++slice;        /* slice #1 starts at 2 */
@@ -397,7 +397,7 @@ kgetdiskbyname(const char *name)
        }
 
        if (*cp != '\0') {
-               printf("junk after name\n");
+               kprintf("junk after name\n");
                return (NOCDEV);
        }
 
@@ -416,7 +416,7 @@ kgetdiskbyname(const char *name)
                }
        }
        if (cd == NUMCDEVSW) {
-               printf("no such device '%*.*s'\n", nlen, nlen, name);
+               kprintf("no such device '%*.*s'\n", nlen, nlen, name);
                return (NOCDEV);
        }
 
index be93ebd..7861a3d 100644 (file)
@@ -37,7 +37,7 @@
  *
  *
  * $FreeBSD: src/sys/kern/vfs_default.c,v 1.28.2.7 2003/01/10 18:23:26 bde Exp $
- * $DragonFly: src/sys/kern/vfs_default.c,v 1.45 2006/10/27 04:56:31 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_default.c,v 1.46 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -200,7 +200,7 @@ vop_compat_nresolve(struct vop_nresolve_args *ap)
         * other VFS's audited before we can switch to LK_SHARED.
         */
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -330,7 +330,7 @@ vop_compat_ncreate(struct vop_ncreate_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -412,7 +412,7 @@ vop_compat_nmkdir(struct vop_nmkdir_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -494,7 +494,7 @@ vop_compat_nmknod(struct vop_nmknod_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -575,7 +575,7 @@ vop_compat_nlink(struct vop_nlink_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -647,7 +647,7 @@ vop_compat_nsymlink(struct vop_nsymlink_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -732,7 +732,7 @@ vop_compat_nwhiteout(struct vop_nwhiteout_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -821,7 +821,7 @@ vop_compat_nremove(struct vop_nremove_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -896,7 +896,7 @@ vop_compat_nrmdir(struct vop_nrmdir_args *ap)
                return(EPERM);
 
        if ((error = vget(dvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        ncp, ncp->nc_name);
                return(EAGAIN);
        }
@@ -1000,7 +1000,7 @@ vop_compat_nrename(struct vop_nrename_args *ap)
         * is the permissions check.
         */
        if ((error = vget(fdvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        fncp, fncp->nc_name);
                return(EAGAIN);
        }
@@ -1052,7 +1052,7 @@ vop_compat_nrename(struct vop_nrename_args *ap)
                return (error);
        }
        if ((error = vget(tdvp, LK_EXCLUSIVE)) != 0) {
-               printf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
+               kprintf("[diagnostic] vop_compat_resolve: EAGAIN on ncp %p %s\n",
                        tncp, tncp->nc_name);
                vrele(fdvp);
                vrele(fvp);
@@ -1136,7 +1136,7 @@ vop_nolookup(ap)
 static int
 vop_nostrategy (struct vop_strategy_args *ap)
 {
-       printf("No strategy for buffer at %p\n", ap->a_bio->bio_buf);
+       kprintf("No strategy for buffer at %p\n", ap->a_bio->bio_buf);
        vprint("", ap->a_vp);
        ap->a_bio->bio_buf->b_flags |= B_ERROR;
        ap->a_bio->bio_buf->b_error = EOPNOTSUPP;
index a3b4046..7d49042 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/vfs_jops.c,v 1.32 2006/10/27 04:56:31 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_jops.c,v 1.33 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * Each mount point may have zero or more independantly configured journals
@@ -378,7 +378,7 @@ journal_restart(struct mount *mp, struct file *fp,
      * Stop the reader and writer threads and clean up the current 
      * descriptor.
      */
-    printf("RESTART WITH FP %p KILLING %p\n", fp, jo->fp);
+    kprintf("RESTART WITH FP %p KILLING %p\n", fp, jo->fp);
     journal_destroy_threads(jo, flags);
 
     if (jo->fp)
@@ -552,7 +552,7 @@ jreclist_init(struct mount *mp, struct jrecord_list *jreclist,
        if (++streamid == JREC_STREAMID_JMAX)
                streamid = JREC_STREAMID_JMIN;
        if (++count == JREC_STREAMID_JMAX - JREC_STREAMID_JMIN) {
-               printf("jreclist_init: all streamid's in use! sleeping\n");
+               kprintf("jreclist_init: all streamid's in use! sleeping\n");
                tsleep(jreclist, 0, "jsidfl", hz * 10);
                count = 0;
        }
index 1e790b8..697f352 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/vfs_journal.c,v 1.29 2006/10/27 04:56:31 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_journal.c,v 1.30 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * The journaling protocol is intended to evolve into a two-way stream
@@ -140,7 +140,7 @@ journal_destroy_threads(struct journal *jo, int flags)
     while (jo->flags & (MC_JOURNAL_WACTIVE | MC_JOURNAL_RACTIVE)) {
        tsleep(jo, 0, "jwait", hz);
        if (++wcount % 10 == 0) {
-           printf("Warning: journal %s waiting for descriptors to close\n",
+           kprintf("Warning: journal %s waiting for descriptors to close\n",
                jo->id);
        }
     }
@@ -257,7 +257,7 @@ journal_wthread(void *info)
                        jo->fifo.membase + ((jo->fifo.rindex - bytes) & jo->fifo.mask),
                        bytes, &res);
        if (error) {
-           printf("journal_thread(%s) write, error %d\n", jo->id, error);
+           kprintf("journal_thread(%s) write, error %d\n", jo->id, error);
            /* XXX */
        } else {
            KKASSERT(res == bytes);
@@ -318,18 +318,18 @@ journal_rthread(void *info)
        if (transid == 0) {
            error = fp_read(jo->fp, &ack, sizeof(ack), &count, 1);
 #if 0
-           printf("fp_read ack error %d count %d\n", error, count);
+           kprintf("fp_read ack error %d count %d\n", error, count);
 #endif
            if (error || count != sizeof(ack))
                break;
            if (error) {
-               printf("read error %d on receive stream\n", error);
+               kprintf("read error %d on receive stream\n", error);
                break;
            }
            if (ack.rbeg.begmagic != JREC_BEGMAGIC ||
                ack.rend.endmagic != JREC_ENDMAGIC
            ) {
-               printf("bad begmagic or endmagic on receive stream\n");
+               kprintf("bad begmagic or endmagic on receive stream\n");
                break;
            }
            transid = ack.rbeg.transid;
@@ -344,7 +344,7 @@ journal_rthread(void *info)
        bytes = jo->fifo.rindex - jo->fifo.xindex;
 
        if (bytes == 0) {
-           printf("warning: unsent data acknowledged transid %08llx\n", transid);
+           kprintf("warning: unsent data acknowledged transid %08llx\n", transid);
            tsleep(&jo->fifo.xindex, 0, "jrseq", hz);
            transid = 0;
            continue;
@@ -363,7 +363,7 @@ journal_rthread(void *info)
         */
        if (rawp->transid < transid) {
 #if 1
-           printf("ackskip %08llx/%08llx\n", rawp->transid, transid);
+           kprintf("ackskip %08llx/%08llx\n", rawp->transid, transid);
 #endif
            jo->fifo.xindex += (rawp->recsize + 15) & ~15;
            jo->total_acked += (rawp->recsize + 15) & ~15;
@@ -375,7 +375,7 @@ journal_rthread(void *info)
        }
        if (rawp->transid == transid) {
 #if 1
-           printf("ackskip %08llx/%08llx\n", rawp->transid, transid);
+           kprintf("ackskip %08llx/%08llx\n", rawp->transid, transid);
 #endif
            jo->fifo.xindex += (rawp->recsize + 15) & ~15;
            jo->total_acked += (rawp->recsize + 15) & ~15;
@@ -386,7 +386,7 @@ journal_rthread(void *info)
            transid = 0;
            continue;
        }
-       printf("warning: unsent data(2) acknowledged transid %08llx\n", transid);
+       kprintf("warning: unsent data(2) acknowledged transid %08llx\n", transid);
        transid = 0;
     }
     jo->flags &= ~MC_JOURNAL_RACTIVE;
@@ -1335,13 +1335,13 @@ jrecord_write_pagelist(struct jrecord *jrec, int16_t rectype,
        if (i - b) {
            error = msf_map_pagelist(&msf, pglist + b, i - b, 0);
            if (error == 0) {
-               printf("RECORD PUTPAGES %d\n", msf_buf_bytes(msf));
+               kprintf("RECORD PUTPAGES %d\n", msf_buf_bytes(msf));
                jrecord_leaf(jrec, JLEAF_SEEKPOS, &offset, sizeof(offset));
                jrecord_leaf(jrec, rectype, 
                             msf_buf_kva(msf), msf_buf_bytes(msf));
                msf_buf_free(msf);
            } else {
-               printf("jrecord_write_pagelist: mapping failure\n");
+               kprintf("jrecord_write_pagelist: mapping failure\n");
            }
            offset += (off_t)(i - b) << PAGE_SHIFT;
        }
@@ -1369,7 +1369,7 @@ jrecord_write_uio(struct jrecord *jrec, int16_t rectype, struct uio *uio)
                     sizeof(uio->uio_offset));
        error = msf_uio_iterate(uio, jrecord_write_uio_callback, &info);
        if (error)
-           printf("XXX warning uio iterate failed %d\n", error);
+           kprintf("XXX warning uio iterate failed %d\n", error);
     }
 }
 
index 762d373..9dfa337 100644 (file)
@@ -67,7 +67,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/vfs_mount.c,v 1.23 2006/09/19 16:06:11 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_mount.c,v 1.24 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -463,7 +463,7 @@ vtrytomakegoneable(struct vnode *vp, int page_count)
        if (vp->v_holdcnt && visleaf(vp)) {
                vinvalbuf(vp, V_SAVE, 0, 0);
 #if 0  /* DEBUG */
-               printf((vp->v_holdcnt ? "vrecycle: vp %p failed: %s\n" :
+               kprintf((vp->v_holdcnt ? "vrecycle: vp %p failed: %s\n" :
                        "vrecycle: vp %p succeeded: %s\n"), vp,
                        (TAILQ_FIRST(&vp->v_namecache) ? 
                            TAILQ_FIRST(&vp->v_namecache)->nc_name : "?"));
@@ -630,7 +630,7 @@ vnlru_proc(void)
                        if (vnlru_nowhere % 10 == 0)
                                tsleep(td, 0, "vlrup", hz * 3);
                        if (vnlru_nowhere % 100 == 0)
-                               printf("vnlru_proc: vnode recycler stopped working!\n");
+                               kprintf("vnlru_proc: vnode recycler stopped working!\n");
                        if (vnlru_nowhere == 1000)
                                vnlru_nowhere = 900;
                } else {
index 79f032d..c625910 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  * 
- * $DragonFly: src/sys/kern/vfs_nlookup.c,v 1.20 2006/10/27 04:56:31 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_nlookup.c,v 1.21 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * nlookup() is the 'new' namei interface.  Rather then return directory and
@@ -395,7 +395,7 @@ nlookup(struct nlookupdata *nd)
        } else {
            nch = cache_nlookup(&nd->nl_nch, &nlc);
            while ((error = cache_resolve(&nch, nd->nl_cred)) == EAGAIN) {
-               printf("[diagnostic] nlookup: relookup %*.*s\n", 
+               kprintf("[diagnostic] nlookup: relookup %*.*s\n", 
                        nch.ncp->nc_nlen, nch.ncp->nc_nlen, nch.ncp->nc_name);
                cache_put(&nch);
                nch = cache_nlookup(&nd->nl_nch, &nlc);
index b6b61a7..87d4212 100644 (file)
@@ -31,7 +31,7 @@
  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- * $DragonFly: src/sys/kern/vfs_rangelock.c,v 1.1 2004/12/17 00:18:07 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_rangelock.c,v 1.2 2006/12/23 00:35:04 swildner Exp $
  */
 /*
  * This module implements hard range locks for files and directories.  It is
@@ -138,14 +138,14 @@ vrange_lock_overlapped(struct vnode *vp,
     while (conflicted) {
        if (tsleep(&vp->v_range.vh_list, 0, "vrnglk", hz * 3) == EWOULDBLOCK) {
            if (warned == 0)
-               printf("warning: conflicted lock vp %p %lld,%lld blocked\n",
+               kprintf("warning: conflicted lock vp %p %lld,%lld blocked\n",
                    vp, vr->vr_offset, vr->vr_length);
            warned = 1;
        }
        conflicted = vrange_lock_conflicted(vp, vr);
     }
     if (warned) {
-       printf("waring: conflicted lock vp %p %lld,%lld unblocked\n",
+       kprintf("waring: conflicted lock vp %p %lld,%lld unblocked\n",
            vp, vr->vr_offset, vr->vr_length);
     }
 }
index 8d691f5..910832e 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)vfs_subr.c  8.31 (Berkeley) 5/26/95
  * $FreeBSD: src/sys/kern/vfs_subr.c,v 1.249.2.30 2003/04/04 20:35:57 tegge Exp $
- * $DragonFly: src/sys/kern/vfs_subr.c,v 1.99 2006/09/19 11:47:36 corecode Exp $
+ * $DragonFly: src/sys/kern/vfs_subr.c,v 1.100 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -498,7 +498,7 @@ vtruncbuf(struct vnode *vp, off_t length, int blksize)
                vp->v_track_write.bk_waitflag = 1;
                tsleep(&vp->v_track_write, 0, "vbtrunc", 0);
                if (length == 0) {
-                       printf("Warning: vtruncbuf(): Had to wait for "
+                       kprintf("Warning: vtruncbuf(): Had to wait for "
                               "%d buffer I/Os to finish in %s\n",
                               count, filename);
                }
@@ -517,7 +517,7 @@ vtruncbuf(struct vnode *vp, off_t length, int blksize)
                                vtruncbuf_bp_trunc_cmp,
                                vtruncbuf_bp_trunc, &truncloffset);
                if (count) {
-                       printf("Warning: vtruncbuf():  Had to re-clean %d "
+                       kprintf("Warning: vtruncbuf():  Had to re-clean %d "
                               "left over buffers in %s\n", count, filename);
                }
        } while(count);
@@ -692,7 +692,7 @@ vfsync(struct vnode *vp, int waitfor, int passes,
                                vfsync_bp, &info);
                        error = vfsync_wait_output(vp, waitoutput);
                        if (info.skippedbufs)
-                               printf("Warning: vfsync skipped %d dirty bufs in pass2!\n", info.skippedbufs);
+                               kprintf("Warning: vfsync skipped %d dirty bufs in pass2!\n", info.skippedbufs);
                }
                while (error == 0 && passes > 0 &&
                    !RB_EMPTY(&vp->v_rbdirty_tree)) {
@@ -771,7 +771,7 @@ vfsync_bp(struct buf *bp, void *data)
         * Ignore buffers that we cannot immediately lock.  XXX
         */
        if (BUF_LOCK(bp, LK_EXCLUSIVE | LK_NOWAIT)) {
-               printf("Warning: vfsync_bp skipping dirty buffer %p\n", bp);
+               kprintf("Warning: vfsync_bp skipping dirty buffer %p\n", bp);
                ++info->skippedbufs;
                return(0);
        }
@@ -1001,7 +1001,7 @@ v_associate_rdev(struct vnode *vp, cdev_t dev)
                return(ENXIO);
        KKASSERT(vp->v_rdev == NULL);
        if (dev_ref_debug)
-               printf("Z1");
+               kprintf("Z1");
        vp->v_rdev = reference_dev(dev);
        lwkt_gettoken(&ilock, &spechash_token);
        SLIST_INSERT_HEAD(&dev->si_hlist, vp, v_cdevnext);
@@ -1069,7 +1069,7 @@ vclean_interlocked(struct vnode *vp, int flags)
         * Scrap the vfs cache
         */
        while (cache_inval_vp(vp, 0) != 0) {
-               printf("Warning: vnode %p clean/cache_resolution race detected\n", vp);
+               kprintf("Warning: vnode %p clean/cache_resolution race detected\n", vp);
                tsleep(vp, 0, "vclninv", 2);
        }
 
@@ -1101,7 +1101,7 @@ vclean_interlocked(struct vnode *vp, int flags)
                        else
                                VOP_CLOSE(vp, FNONBLOCK);
                        if (vp->v_opencount == n) {
-                               printf("Warning: unable to force-close"
+                               kprintf("Warning: unable to force-close"
                                       " vnode %p\n", vp);
                                break;
                        }
@@ -1391,10 +1391,10 @@ vprint(char *label, struct vnode *vp)
        char buf[96];
 
        if (label != NULL)
-               printf("%s: %p: ", label, (void *)vp);
+               kprintf("%s: %p: ", label, (void *)vp);
        else
-               printf("%p: ", (void *)vp);
-       printf("type %s, usecount %d, writecount %d, refcount %d,",
+               kprintf("%p: ", (void *)vp);
+       kprintf("type %s, usecount %d, writecount %d, refcount %d,",
            typename[vp->v_type], vp->v_usecount, vp->v_writecount,
            vp->v_holdcnt);
        buf[0] = '\0';
@@ -1409,11 +1409,11 @@ vprint(char *label, struct vnode *vp)
        if (vp->v_flag & VOBJBUF)
                strcat(buf, "|VOBJBUF");
        if (buf[0] != '\0')
-               printf(" flags (%s)", &buf[1]);
+               kprintf(" flags (%s)", &buf[1]);
        if (vp->v_data == NULL) {
-               printf("\n");
+               kprintf("\n");
        } else {
-               printf("\n\t");
+               kprintf("\n\t");
                VOP_PRINT(vp);
        }
 }
@@ -1429,7 +1429,7 @@ static int db_show_locked_vnodes(struct mount *mp, void *data);
  */
 DB_SHOW_COMMAND(lockedvnodes, lockedvnodes)
 {
-       printf("Locked vnodes\n");
+       kprintf("Locked vnodes\n");
        mountlist_scan(db_show_locked_vnodes, NULL, 
                        MNTSCAN_FORWARD|MNTSCAN_NOBUSY);
 }
@@ -1567,12 +1567,12 @@ vfs_umountall_callback(struct mount *mp, void *data)
        error = dounmount(mp, MNT_FORCE);
        if (error) {
                mountlist_remove(mp);
-               printf("unmount of filesystem mounted from %s failed (", 
+               kprintf("unmount of filesystem mounted from %s failed (", 
                        mp->mnt_stat.f_mntfromname);
                if (error == EBUSY)
-                       printf("BUSY)\n");
+                       kprintf("BUSY)\n");
                else
-                       printf("%d)\n", error);
+                       kprintf("%d)\n", error);
        }
        return(1);
 }
index 18bb9cc..6feb25b 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)vfs_subr.c  8.31 (Berkeley) 5/26/95
  * $FreeBSD: src/sys/kern/vfs_subr.c,v 1.249.2.30 2003/04/04 20:35:57 tegge Exp $
- * $DragonFly: src/sys/kern/vfs_sync.c,v 1.13 2006/08/12 00:26:20 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_sync.c,v 1.14 2006/12/23 00:35:04 swildner Exp $
  */
 
 /*
@@ -458,9 +458,9 @@ sync_print(struct vop_print_args *ap)
 {
        struct vnode *vp = ap->a_vp;
 
-       printf("syncer vnode");
+       kprintf("syncer vnode");
        lockmgr_printinfo(&vp->v_lock);
-       printf("\n");
+       kprintf("\n");
        return (0);
 }
 
index 54551bb..4b34353 100644 (file)
@@ -37,7 +37,7 @@
  *
  *     @(#)vfs_syscalls.c      8.13 (Berkeley) 4/15/94
  * $FreeBSD: src/sys/kern/vfs_syscalls.c,v 1.151.2.18 2003/04/04 20:35:58 tegge Exp $
- * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.109 2006/12/18 20:41:01 dillon Exp $
+ * $DragonFly: src/sys/kern/vfs_syscalls.c,v 1.110 2006/12/23 00:35:04 swildner Exp $
  */
 
 #include <sys/param.h>
@@ -731,14 +731,14 @@ mount_warning(struct mount *mp, const char *ctl, ...)
 
        __va_start(va, ctl);
        if (cache_fullpath(NULL, &mp->mnt_ncmounton, &ptr, &buf) == 0) {
-               printf("unmount(%s): ", ptr);
+               kprintf("unmount(%s): ", ptr);
                kvprintf(ctl, va);
-               printf("\n");
+               kprintf("\n");
                kfree(buf, M_TEMP);
        } else {
-               printf("unmount(%p): ", mp);
+               kprintf("unmount(%p): ", mp);
                kvprintf(ctl, va);
-               printf("\n");
+               kprintf("\n");
        }
        __va_end(va);
 }
@@ -3396,7 +3396,7 @@ sys_fhopen(struct fhopen_args *uap)
         * Assert that all regular files must be created with a VM object.
         */
        if (vp->v_type == VREG && vp->v_object == NULL) {
-               printf("fhopen: regular file did not have VM object: %p\n", vp);
+               kprintf("fhopen: regular file did not have VM object: %p\n", vp);
                goto bad_drop;
        }