diff options
Diffstat (limited to 'src/logicalfile/LMI_DirectoryContainsFileProvider.c')
-rw-r--r-- | src/logicalfile/LMI_DirectoryContainsFileProvider.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/src/logicalfile/LMI_DirectoryContainsFileProvider.c b/src/logicalfile/LMI_DirectoryContainsFileProvider.c index 2033804..bcf6d14 100644 --- a/src/logicalfile/LMI_DirectoryContainsFileProvider.c +++ b/src/logicalfile/LMI_DirectoryContainsFileProvider.c @@ -51,17 +51,17 @@ static CMPIStatus logicalfile_objectpath_from_path( CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, err); } else { get_class_from_stat(&sb, fileclass); - st = check_assoc_class(_cb, namespace, resultClass, fileclass); - if (st.rc == RC_ERR_CLASS_CHECK_FAILED) { + st = lmi_check_assoc_class(_cb, namespace, resultClass, fileclass); + if (st.rc == LMI_RC_ERR_CLASS_CHECK_FAILED) { st.rc = CMPI_RC_OK; *o = NULL; return st; } /* check status again for other possible errors */ - check_status(st); + lmi_check_status(st); st = get_fsinfo_from_stat(_cb, &sb, abspath, &fsclassname, &fsname); - check_status(st); + lmi_check_status(st); } CIM_LogicalFileRef cim_lfr; @@ -107,7 +107,7 @@ static CMPIStatus dir_file_objectpaths( dirname = g_path_get_dirname(path); st = logicalfile_objectpath_from_path(dirname, resultClass, namespace, &o); g_free(dirname); - check_status(st); + lmi_check_status(st); if (o) { ops[i++] = o; } @@ -160,24 +160,24 @@ static CMPIStatus associators( int group = -1; int rgroup = -1; - st = check_assoc_class(_cb, ns, assocClass, LMI_DirectoryContainsFile_ClassName); - check_class_check_status(st); + st = lmi_check_assoc_class(_cb, ns, assocClass, LMI_DirectoryContainsFile_ClassName); + lmi_check_class_check_status(st); /* role && resultRole checks */ if (role) { - if (strcmp(role, GROUP_COMPONENT) != 0 && strcmp(role, PART_COMPONENT) != 0) { + if (strcmp(role, LMI_GROUP_COMPONENT) != 0 && strcmp(role, LMI_PART_COMPONENT) != 0) { CMReturn(CMPI_RC_OK); - } else if (strcmp(role, GROUP_COMPONENT) == 0) { + } else if (strcmp(role, LMI_GROUP_COMPONENT) == 0) { group = 1; - } else if (strcmp(role, PART_COMPONENT) == 0) { + } else if (strcmp(role, LMI_PART_COMPONENT) == 0) { group = 0; } } if (resultRole) { - if (strcmp(resultRole, GROUP_COMPONENT) != 0 && strcmp(resultRole, PART_COMPONENT) != 0) { + if (strcmp(resultRole, LMI_GROUP_COMPONENT) != 0 && strcmp(resultRole, LMI_PART_COMPONENT) != 0) { CMReturn(CMPI_RC_OK); - } else if (strcmp(resultRole, GROUP_COMPONENT) == 0) { + } else if (strcmp(resultRole, LMI_GROUP_COMPONENT) == 0) { rgroup = 1; - } else if (strcmp(resultRole, PART_COMPONENT) == 0) { + } else if (strcmp(resultRole, LMI_PART_COMPONENT) == 0) { rgroup = 0; } } @@ -193,7 +193,7 @@ static CMPIStatus associators( if (st.rc != CMPI_RC_OK) { return st; } - path = get_string_property_from_op(cop, "Name"); + path = lmi_get_string_property_from_objectpath(cop, "Name"); if (!path) CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Cannot find Name property in provided LMI_UnixDirectory"); st = dir_file_objectpaths(cc, cr, resultClass, group, rgroup, properties, ns, path, refs, &count); @@ -223,11 +223,11 @@ static CMPIStatus associators( if (group == 1 || rgroup == 0) { CMReturn(CMPI_RC_OK); } - path = get_string_property_from_op(cop, "Name"); + path = lmi_get_string_property_from_objectpath(cop, "Name"); if (!path) CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Cannot find Name property in provided CIM_logicalFile"); - st = check_assoc_class(_cb, ns, resultClass, LMI_UnixDirectory_ClassName); - check_class_check_status(st); + st = lmi_check_assoc_class(_cb, ns, resultClass, LMI_UnixDirectory_ClassName); + lmi_check_class_check_status(st); CIM_DirectoryRef lmi_dr; CIM_DirectoryRef_Init(&lmi_dr, _cb, ns); @@ -236,7 +236,7 @@ static CMPIStatus associators( char *fsclassname = NULL; st = get_fsinfo_from_path(_cb, path, &fsclassname, &fsname); - check_status(st); + lmi_check_status(st); gchar *dirname = g_path_get_dirname(path); fill_logicalfile(CIM_DirectoryRef, &lmi_dr, dirname, fsclassname, fsname, LMI_UnixDirectory_ClassName); @@ -283,14 +283,14 @@ static CMPIStatus references( CMPIInstance *ci; int group = -1; - st = check_assoc_class(_cb, ns, assocClass, LMI_DirectoryContainsFile_ClassName); - check_class_check_status(st); + st = lmi_check_assoc_class(_cb, ns, assocClass, LMI_DirectoryContainsFile_ClassName); + lmi_check_class_check_status(st); if (role) { - if (strcmp(role, GROUP_COMPONENT) != 0 && strcmp(role, PART_COMPONENT) != 0) { + if (strcmp(role, LMI_GROUP_COMPONENT) != 0 && strcmp(role, LMI_PART_COMPONENT) != 0) { CMReturn(CMPI_RC_OK); - } else if (strcmp(role, GROUP_COMPONENT) == 0) { + } else if (strcmp(role, LMI_GROUP_COMPONENT) == 0) { group = 1; - } else if (strcmp(role, PART_COMPONENT) == 0) { + } else if (strcmp(role, LMI_PART_COMPONENT) == 0) { group = 0; } } @@ -302,12 +302,12 @@ static CMPIStatus references( if (CMClassPathIsA(_cb, cop, LMI_UnixDirectory_ClassName, &st)) { st = lmi_check_required(_cb, cc, cop); - check_status(st); - path = get_string_property_from_op(cop, "Name"); + lmi_check_status(st); + path = lmi_get_string_property_from_objectpath(cop, "Name"); if (!path) CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Cannot find Name property in provided LMI_UnixDirectory"); st = get_fsinfo_from_path(_cb, path, &fsclassname, &fsname); - check_status(st); + lmi_check_status(st); /* got GroupComponent - DirectoryRef */ fill_logicalfile(CIM_DirectoryRef, &lmi_dr, path, fsclassname, fsname, LMI_UnixDirectory_ClassName); o = CIM_DirectoryRef_ToObjectPath(&lmi_dr, &st); @@ -318,7 +318,7 @@ static CMPIStatus references( CMPIObjectPath *refs[MAX_REFS]; unsigned int count = 0; st = dir_file_objectpaths(cc, cr, NULL, group, -1, properties, ns, path, refs, &count); - check_status(st); + lmi_check_status(st); if (count > MAX_REFS) { CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Too many files in a single directory..."); } @@ -336,13 +336,13 @@ static CMPIStatus references( } } else if (CMClassPathIsA(_cb, cop, CIM_LogicalFile_ClassName, &st)) { st = lmi_check_required(_cb, cc, cop); - check_status(st); - path = get_string_property_from_op(cop, "Name"); + lmi_check_status(st); + path = lmi_get_string_property_from_objectpath(cop, "Name"); if (!path) CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, "Cannot find Name property in provided CIM_LogicalFile"); get_class_from_path(path, ccname); st = get_fsinfo_from_path(_cb, path, &fsclassname, &fsname); - check_status(st); + lmi_check_status(st); /* got PartComponent - LogicalFileRef */ if (group == 1) { CMReturn(CMPI_RC_OK); |