From owner-p4-projects Fri Mar 7 8:28:15 2003 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id B86F437B401; Fri, 7 Mar 2003 08:28:12 -0800 (PST) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6388137B405 for ; Fri, 7 Mar 2003 08:28:12 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id E5FA843FA3 for ; Fri, 7 Mar 2003 08:28:11 -0800 (PST) (envelope-from jhb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h27GSB0U055754 for ; Fri, 7 Mar 2003 08:28:11 -0800 (PST) (envelope-from jhb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h27GSB3Z055751 for perforce@freebsd.org; Fri, 7 Mar 2003 08:28:11 -0800 (PST) Date: Fri, 7 Mar 2003 08:28:11 -0800 (PST) Message-Id: <200303071628.h27GSB3Z055751@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jhb@freebsd.org using -f From: John Baldwin Subject: PERFORCE change 26499 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://perforce.freebsd.org/chv.cgi?CH=26499 Change 26499 by jhb@jhb_laptop on 2003/03/07 08:27:42 Don't use the tree-wide level for the indent, instead, always indent direct children of a lock only one space from the parent. Affected files ... .. //depot/projects/smpng/sys/kern/subr_witness.c#89 edit Differences ... ==== //depot/projects/smpng/sys/kern/subr_witness.c#89 (text+ko) ==== @@ -167,7 +167,7 @@ static int reparentchildren(struct witness *newparent, struct witness *oldparent); static void witness_displaydescendants(void(*)(const char *fmt, ...), - struct witness *); + struct witness *, int indent); static const char *fixup_filename(const char *file); static void witness_leveldescendents(struct witness *parent, int level); static void witness_levelall(void); @@ -519,7 +519,7 @@ /* * This lock has no anscestors, display its descendants. */ - witness_displaydescendants(prnt, w); + witness_displaydescendants(prnt, w, 0); } } @@ -564,10 +564,10 @@ #if 1 /* Extra check from Sanity Clause. */ - prnt("\nLocks which weren't displayed!\n"); + prnt("\nLocks which weren't displayed:\n"); STAILQ_FOREACH(w, &w_all, w_list) { if (w->w_displayed == 0) - witness_displaydescendants(prnt, w); + witness_displaydescendants(prnt, w, 0); } #endif } @@ -1414,14 +1414,14 @@ static void witness_displaydescendants(void(*prnt)(const char *fmt, ...), - struct witness *parent) + struct witness *parent, int indent) { struct witness_child_list_entry *wcl; int i, level; level = parent->w_level; prnt("%-2d", level); - for (i = 0; i < level; i++) + for (i = 0; i < indent; i++) prnt(" "); if (parent->w_refcount > 0) prnt("%s", parent->w_name); @@ -1441,7 +1441,7 @@ for (wcl = parent->w_children; wcl != NULL; wcl = wcl->wcl_next) for (i = 0; i < wcl->wcl_count; i++) witness_displaydescendants(prnt, - wcl->wcl_children[i]); + wcl->wcl_children[i], indent + 1); } #ifdef BLESSING To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message