mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-04 10:55:19 +00:00
conf: Remove virDomainDiskSourceDefFormatSeclabel
The wrapper functionality can be moved to the only user virDomainDiskSourceFormatInternal. Also removes comment which does not reflect the truth any more. Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
6bec169759
commit
8f5138829f
@ -22704,33 +22704,16 @@ virDomainDiskBlockIoDefFormat(virBufferPtr buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* virDomainSourceDefFormatSeclabel:
|
|
||||||
*
|
|
||||||
* This function automatically closes the <source> element and formats any
|
|
||||||
* possible seclabels.
|
|
||||||
*/
|
|
||||||
static void
|
|
||||||
virDomainDiskSourceDefFormatSeclabel(virBufferPtr buf,
|
|
||||||
size_t nseclabels,
|
|
||||||
virSecurityDeviceLabelDefPtr *seclabels,
|
|
||||||
unsigned int flags,
|
|
||||||
bool skipSeclables)
|
|
||||||
{
|
|
||||||
size_t n;
|
|
||||||
|
|
||||||
if (nseclabels && !skipSeclables) {
|
|
||||||
for (n = 0; n < nseclabels; n++)
|
|
||||||
virSecurityDeviceLabelDefFormat(buf, seclabels[n], flags);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
virDomainSourceDefFormatSeclabel(virBufferPtr buf,
|
virDomainSourceDefFormatSeclabel(virBufferPtr buf,
|
||||||
size_t nseclabels,
|
size_t nseclabels,
|
||||||
virSecurityDeviceLabelDefPtr *seclabels,
|
virSecurityDeviceLabelDefPtr *seclabels,
|
||||||
unsigned int flags)
|
unsigned int flags)
|
||||||
{
|
{
|
||||||
virDomainDiskSourceDefFormatSeclabel(buf, nseclabels, seclabels, flags, false);
|
size_t n;
|
||||||
|
|
||||||
|
for (n = 0; n < nseclabels; n++)
|
||||||
|
virSecurityDeviceLabelDefFormat(buf, seclabels[n], flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -22875,9 +22858,9 @@ virDomainDiskSourceFormatInternal(virBufferPtr buf,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (src->type != VIR_STORAGE_TYPE_NETWORK) {
|
if (src->type != VIR_STORAGE_TYPE_NETWORK) {
|
||||||
virDomainDiskSourceDefFormatSeclabel(&childBuf, src->nseclabels,
|
if (!skipSeclabels)
|
||||||
src->seclabels, flags,
|
virDomainSourceDefFormatSeclabel(&childBuf, src->nseclabels,
|
||||||
skipSeclabels);
|
src->seclabels, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Storage Source formatting will not carry through the blunder
|
/* Storage Source formatting will not carry through the blunder
|
||||||
|
Loading…
x
Reference in New Issue
Block a user