提交 b1258b27 编写于 作者: L Laine Stump

conf: eliminate hardcoded indent from network xml

This was very simple, since the only place that had hardcoded
indentation was a few items in the network status xml.
上级 b9e9b76e
...@@ -2797,17 +2797,17 @@ virNetworkObjFormat(virNetworkObjPtr net, ...@@ -2797,17 +2797,17 @@ virNetworkObjFormat(virNetworkObjPtr net,
goto no_memory; goto no_memory;
virBufferAddLit(&buf, "<networkstatus>\n"); virBufferAddLit(&buf, "<networkstatus>\n");
virBufferAsprintf(&buf, " <class_id bitmap='%s'/>\n", class_id); virBufferAdjustIndent(&buf, 2);
virBufferAsprintf(&buf, " <floor sum='%llu'/>\n", net->floor_sum); virBufferAsprintf(&buf, "<class_id bitmap='%s'/>\n", class_id);
virBufferAsprintf(&buf, "<floor sum='%llu'/>\n", net->floor_sum);
VIR_FREE(class_id); VIR_FREE(class_id);
for (i = 0; i < VIR_NETWORK_TAINT_LAST; i++) { for (i = 0; i < VIR_NETWORK_TAINT_LAST; i++) {
if (net->taint & (1 << i)) if (net->taint & (1 << i))
virBufferAsprintf(&buf, " <taint flag='%s'/>\n", virBufferAsprintf(&buf, "<taint flag='%s'/>\n",
virNetworkTaintTypeToString(i)); virNetworkTaintTypeToString(i));
} }
virBufferAdjustIndent(&buf, 2);
if (virNetworkDefFormatBuf(&buf, net->def, flags) < 0) if (virNetworkDefFormatBuf(&buf, net->def, flags) < 0)
goto error; goto error;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册