From owner-svn-src-all@FreeBSD.ORG Fri Jan 22 11:31:50 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4D89D106566B; Fri, 22 Jan 2010 11:31:50 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21C348FC08; Fri, 22 Jan 2010 11:31:50 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o0MBVoNP055458; Fri, 22 Jan 2010 11:31:50 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o0MBVo29055455; Fri, 22 Jan 2010 11:31:50 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201001221131.o0MBVo29055455@svn.freebsd.org> From: Alexander Motin Date: Fri, 22 Jan 2010 11:31:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r202801 - stable/8/sys/dev/sound/pcm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2010 11:31:50 -0000 Author: mav Date: Fri Jan 22 11:31:49 2010 New Revision: 202801 URL: http://svn.freebsd.org/changeset/base/202801 Log: MFC r202267: Hide from default sndstat some information not used on daily basis, to make it readable by average user with average screen size. Modified: stable/8/sys/dev/sound/pcm/sndstat.c stable/8/sys/dev/sound/pcm/sndstat.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/sound/pcm/sndstat.c ============================================================================== --- stable/8/sys/dev/sound/pcm/sndstat.c Fri Jan 22 11:30:32 2010 (r202800) +++ stable/8/sys/dev/sound/pcm/sndstat.c Fri Jan 22 11:31:49 2010 (r202801) @@ -81,7 +81,7 @@ static int sndstat_files = 0; static SLIST_HEAD(, sndstat_entry) sndstat_devlist = SLIST_HEAD_INITIALIZER(none); -int snd_verbose = 1; +int snd_verbose = 0; TUNABLE_INT("hw.snd.verbose", &snd_verbose); #ifdef SND_DEBUG @@ -372,12 +372,10 @@ sndstat_prepare(struct sbuf *s) PCM_ACQUIRE_QUICK(d); sbuf_printf(s, "%s:", device_get_nameunit(ent->dev)); sbuf_printf(s, " <%s>", device_get_desc(ent->dev)); - sbuf_printf(s, " %s [%s]", ent->str, - (d->flags & SD_F_MPSAFE) ? "MPSAFE" : "GIANT"); + if (snd_verbose > 0) + sbuf_printf(s, " %s", ent->str); if (ent->handler) ent->handler(s, ent->dev, snd_verbose); - else - sbuf_printf(s, " [no handler]"); sbuf_printf(s, "\n"); PCM_RELEASE_QUICK(d); } Modified: stable/8/sys/dev/sound/pcm/sndstat.h ============================================================================== --- stable/8/sys/dev/sound/pcm/sndstat.h Fri Jan 22 11:30:32 2010 (r202800) +++ stable/8/sys/dev/sound/pcm/sndstat.h Fri Jan 22 11:31:49 2010 (r202801) @@ -37,9 +37,6 @@ struct pcm_channel *c; \ struct pcm_feeder *f; \ \ - if (verbose < 1) \ - return (0); \ - \ d = device_get_softc(dev); \ PCM_BUSYASSERT(d); \ \ @@ -48,9 +45,19 @@ return (0); \ } \ \ - sbuf_printf(s, " (%dp:%dv/%dr:%dv channels %splex%s)", \ - d->playcount, d->pvchancount, d->reccount, d->rvchancount, \ - (d->flags & SD_F_SIMPLEX) ? "sim" : "du", \ + if (verbose < 1) { \ + sbuf_printf(s, " (%s%s%s", \ + d->playcount ? "play" : "", \ + (d->playcount && d->reccount) ? "/" : "", \ + d->reccount ? "rec" : ""); \ + } else { \ + sbuf_printf(s, " (%dp:%dv/%dr:%dv", \ + d->playcount, d->pvchancount, \ + d->reccount, d->rvchancount); \ + } \ + sbuf_printf(s, "%s)%s", \ + ((d->playcount != 0 && d->reccount != 0) && \ + (d->flags & SD_F_SIMPLEX)) ? " simplex" : "", \ (device_get_unit(dev) == snd_unit) ? " default" : "")