[PATCH 03/10] security: Drop virSecurity(DAC|SELinux)RestoreImageLabelSingle()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Each one only has a single, trivial caller.

Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
---
 src/security/security_dac.c     | 21 ++++-----------------
 src/security/security_selinux.c | 21 ++++-----------------
 2 files changed, 8 insertions(+), 34 deletions(-)

diff --git a/src/security/security_dac.c b/src/security/security_dac.c
index 7421496fc9..9c24a1c4a8 100644
--- a/src/security/security_dac.c
+++ b/src/security/security_dac.c
@@ -972,10 +972,10 @@ virSecurityDACSetImageLabel(virSecurityManager *mgr,
 }
 
 static int
-virSecurityDACRestoreImageLabelSingle(virSecurityManager *mgr,
-                                      virDomainDef *def,
-                                      virStorageSource *src,
-                                      bool migrated)
+virSecurityDACRestoreImageLabelInt(virSecurityManager *mgr,
+                                   virDomainDef *def,
+                                   virStorageSource *src,
+                                   bool migrated)
 {
     virSecurityDACData *priv = virSecurityManagerGetPrivateData(mgr);
     virSecurityLabelDef *secdef;
@@ -1047,19 +1047,6 @@ virSecurityDACRestoreImageLabelSingle(virSecurityManager *mgr,
 }
 
 
-static int
-virSecurityDACRestoreImageLabelInt(virSecurityManager *mgr,
-                                   virDomainDef *def,
-                                   virStorageSource *src,
-                                   bool migrated)
-{
-    if (virSecurityDACRestoreImageLabelSingle(mgr, def, src, migrated) < 0)
-        return -1;
-
-    return 0;
-}
-
-
 static int
 virSecurityDACRestoreImageLabel(virSecurityManager *mgr,
                                 virDomainDef *def,
diff --git a/src/security/security_selinux.c b/src/security/security_selinux.c
index ffad058d9a..d491435ae1 100644
--- a/src/security/security_selinux.c
+++ b/src/security/security_selinux.c
@@ -1774,10 +1774,10 @@ virSecuritySELinuxRestoreTPMFileLabelInt(virSecurityManager *mgr,
 
 
 static int
-virSecuritySELinuxRestoreImageLabelSingle(virSecurityManager *mgr,
-                                          virDomainDef *def,
-                                          virStorageSource *src,
-                                          bool migrated)
+virSecuritySELinuxRestoreImageLabelInt(virSecurityManager *mgr,
+                                       virDomainDef *def,
+                                       virStorageSource *src,
+                                       bool migrated)
 {
     virSecurityLabelDef *seclabel;
     virSecurityDeviceLabelDef *disk_seclabel;
@@ -1863,19 +1863,6 @@ virSecuritySELinuxRestoreImageLabelSingle(virSecurityManager *mgr,
 }
 
 
-static int
-virSecuritySELinuxRestoreImageLabelInt(virSecurityManager *mgr,
-                                       virDomainDef *def,
-                                       virStorageSource *src,
-                                       bool migrated)
-{
-    if (virSecuritySELinuxRestoreImageLabelSingle(mgr, def, src, migrated) < 0)
-        return -1;
-
-    return 0;
-}
-
-
 static int
 virSecuritySELinuxRestoreImageLabel(virSecurityManager *mgr,
                                     virDomainDef *def,
-- 
2.44.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux