diff options
author | Jan Synacek <jsynacek@redhat.com> | 2013-10-02 09:13:42 +0200 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2013-10-02 13:26:23 +0200 |
commit | 97a856311031d688180fc4e68faf4e95c5b46a84 (patch) | |
tree | 2c83e1cffb148baf9c284a6d49fabebcf9b951ff /src/logicalfile/LMI_FileIdentityProvider.c | |
parent | 143e43c90a4e3d0428ebb1f85659a4bd2ee6dbbe (diff) | |
download | openlmi-providers-97a856311031d688180fc4e68faf4e95c5b46a84.tar.gz openlmi-providers-97a856311031d688180fc4e68faf4e95c5b46a84.tar.xz openlmi-providers-97a856311031d688180fc4e68faf4e95c5b46a84.zip |
logicalfile: remove needless code
Diffstat (limited to 'src/logicalfile/LMI_FileIdentityProvider.c')
-rw-r--r-- | src/logicalfile/LMI_FileIdentityProvider.c | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/logicalfile/LMI_FileIdentityProvider.c b/src/logicalfile/LMI_FileIdentityProvider.c index f041c5b..4d85f3c 100644 --- a/src/logicalfile/LMI_FileIdentityProvider.c +++ b/src/logicalfile/LMI_FileIdentityProvider.c @@ -27,28 +27,6 @@ static const CMPIBroker* _cb; -static int check_valid_classes(const CMPIObjectPath *o) -{ - const char *VALID_CLASSES[] = { - "LMI_UnixFile", - "LMI_DataFile", - "LMI_UnixDeviceFile", - "LMI_UnixDirectory", - "LMI_FIFOPipeFile", - "LMI_SymbolicLink", - "LMI_UnixSocket", - NULL - }; - int found = 0; - for (int i = 0; VALID_CLASSES[i]; i++) { - if (CMClassPathIsA(_cb, o, VALID_CLASSES[i], NULL)) { - found++; - break; - } - } - return found; -} - static CMPIStatus associators( CMPIAssociationMI* mi, const CMPIContext* cc, @@ -70,10 +48,6 @@ static CMPIStatus associators( st = check_assoc_class(_cb, ns, assocClass, LMI_FileIdentity_ClassName); check_class_check_status(st); - /* allow only LMI_UnixFile and classes derived from CIM_LogicalFile */ - if (!check_valid_classes(cop)) { - CMReturn(CMPI_RC_OK); - } if (CMClassPathIsA(_cb, cop, LMI_UnixFile_ClassName, &st)) { /* got UnixFile - SameElement */ @@ -166,15 +140,6 @@ static CMPIStatus references( st = check_assoc_class(_cb, ns, assocClass, LMI_FileIdentity_ClassName); check_class_check_status(st); - /* - * allow only LMI_UnixFile and classes derived from CIM_LogicalFile - * - * XXX this should not be necessary, but FileIdentity.Refereneces() is - * called when Linux_ComputerSystem.References() is... server bug? - */ - if (!check_valid_classes(cop)) { - CMReturn(CMPI_RC_OK); - } LMI_FileIdentity_Init(&lmi_fi, _cb, ns); |