Date: Tue, 1 Sep 2009 09:31:16 +0200 From: Nick Hibma <nick@van-laarhoven.org> To: FreeBSD CURRENT Mailing List <freebsd-current@freebsd.org> Subject: Reducing noise in dmesg output Message-ID: <200909010931.16880.nick@van-laarhoven.org>
next in thread | raw e-mail | index | archive | help
Folks, dmesg is getting cluttered with random bits of irrelevant information which either should be behind bootverbose or not at all present. Below two locations where I intend to remove that information. The fact that a module is loaded can be seen in the output of kldstat -v | grep netsmb the amount of stolen memory and aperture size might be interesting when configuring your X server. Then again, most X servers nowadays HAVE no configuration file anymore because of auto-configuration. Any objections? Nick Index: kern/kern_shutdown.c =================================================================== --- kern/kern_shutdown.c (revision 196710) +++ kern/kern_shutdown.c (working copy) @@ -581,6 +581,10 @@ /* * Support for poweroff delay. + * + * Please note that setting this delay too short might power off your machine + * before the write cache on your hard disk has been flushed, leading to + * soft-updates inconsistencies. */ #ifndef POWEROFF_DELAY # define POWEROFF_DELAY 5000 Index: dev/agp/agp_i810.c =================================================================== --- dev/agp/agp_i810.c (revision 196589) +++ dev/agp/agp_i810.c (working copy) @@ -474,12 +474,15 @@ agp_generic_detach(dev); return EINVAL; } - if (sc->stolen > 0) { - device_printf(dev, "detected %dk stolen memory\n", - sc->stolen * 4); + if (bootverbose) { + if (sc->stolen > 0) { + device_printf(dev, + "detected %dk stolen memory\n", + sc->stolen * 4); + } + device_printf(dev, "aperture size is %dM\n", + sc->initial_aperture / 1024 / 1024); } - device_printf(dev, "aperture size is %dM\n", - sc->initial_aperture / 1024 / 1024); /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); @@ -664,9 +667,11 @@ gtt_size += 4; sc->stolen = (stolen - gtt_size) * 1024 / 4096; - if (sc->stolen > 0) - device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); - device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + if (bootverbose) { + if (sc->stolen > 0) + device_printf(dev, "detected %dk stolen memory\n", sc->stolen * 4); + device_printf(dev, "aperture size is %dM\n", sc->initial_aperture / 1024 / 1024); + } /* GATT address is already in there, make sure it's enabled */ pgtblctl = bus_read_4(sc->sc_res[0], AGP_I810_PGTBL_CTL); Index: netsmb/smb_dev.c =================================================================== --- netsmb/smb_dev.c (revision 196589) +++ netsmb/smb_dev.c (working copy) @@ -352,7 +352,6 @@ } clone_setup(&nsmb_clones); nsmb_dev_tag = EVENTHANDLER_REGISTER(dev_clone, nsmb_dev_clone, 0, 1000); - printf("netsmb_dev: loaded\n"); break; case MOD_UNLOAD: smb_iod_done(); @@ -363,7 +362,6 @@ drain_dev_clone_events(); clone_cleanup(&nsmb_clones); destroy_dev_drain(&nsmb_cdevsw); - printf("netsmb_dev: unloaded\n"); break; default: error = EINVAL;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200909010931.16880.nick>