mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
lxc: eliminate unnecessary labels
Signed-off-by: Laine Stump <laine@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
8d591eb167
commit
c02a08ec5a
@ -1380,13 +1380,12 @@ virLXCControllerSetupUsernsMap(virDomainIdMapEntryPtr map,
|
||||
{
|
||||
g_auto(virBuffer) map_value = VIR_BUFFER_INITIALIZER;
|
||||
size_t i;
|
||||
int ret = -1;
|
||||
|
||||
/* The kernel supports up to 340 lines in /proc/<pid>/{g,u}id_map */
|
||||
if (num > 340) {
|
||||
virReportError(VIR_ERR_INVALID_ARG, "%s",
|
||||
_("Too many id mappings defined."));
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
|
||||
for (i = 0; i < num; i++)
|
||||
@ -1397,12 +1396,10 @@ virLXCControllerSetupUsernsMap(virDomainIdMapEntryPtr map,
|
||||
|
||||
if (virFileWriteStr(path, virBufferCurrentContent(&map_value), 0) < 0) {
|
||||
virReportSystemError(errno, _("unable write to %s"), path);
|
||||
goto cleanup;
|
||||
return -1;
|
||||
}
|
||||
|
||||
ret = 0;
|
||||
cleanup:
|
||||
return ret;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user