A cosmetic change - don't output empty <flags>.

This commit is contained in:
ivoras 2010-07-15 13:46:30 +00:00
parent d0783d36e6
commit 3fb9f87a34

View File

@ -2656,16 +2656,16 @@ sysctl_kern_sched_topology_spec_internal(struct sbuf *sb, struct cpu_group *cg,
}
sbuf_printf(sb, "</cpu>\n");
sbuf_printf(sb, "%*s <flags>", indent, "");
if (cg->cg_flags != 0) {
sbuf_printf(sb, "%*s <flags>", indent, "");
if ((cg->cg_flags & CG_FLAG_HTT) != 0)
sbuf_printf(sb, "<flag name=\"HTT\">HTT group</flag>");
if ((cg->cg_flags & CG_FLAG_THREAD) != 0)
sbuf_printf(sb, "<flag name=\"THREAD\">THREAD group</flag>");
if ((cg->cg_flags & CG_FLAG_SMT) != 0)
sbuf_printf(sb, "<flag name=\"SMT\">SMT group</flag>");
sbuf_printf(sb, "</flags>\n");
}
sbuf_printf(sb, "</flags>\n");
if (cg->cg_children > 0) {
sbuf_printf(sb, "%*s <children>\n", indent, "");