summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/LMI_DirectoryContainsFileProvider.c
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2013-07-17 11:09:10 +0200
committerJan Synacek <jsynacek@redhat.com>2013-07-17 13:47:42 +0200
commit214989d14a3c62c0f5554e03a74da04e4796390a (patch)
tree77b79adcb658e883d017c17774443019507458f1 /src/logicalfile/LMI_DirectoryContainsFileProvider.c
parent7ab308dcbe9f9631e7b2fd276236df664b666702 (diff)
downloadopenlmi-providers-214989d14a3c62c0f5554e03a74da04e4796390a.tar.gz
openlmi-providers-214989d14a3c62c0f5554e03a74da04e4796390a.tar.xz
openlmi-providers-214989d14a3c62c0f5554e03a74da04e4796390a.zip
LogicalFile: use get_string_property_from_op() where appropriate
Diffstat (limited to 'src/logicalfile/LMI_DirectoryContainsFileProvider.c')
-rw-r--r--src/logicalfile/LMI_DirectoryContainsFileProvider.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/logicalfile/LMI_DirectoryContainsFileProvider.c b/src/logicalfile/LMI_DirectoryContainsFileProvider.c
index 1794ea8..46db891 100644
--- a/src/logicalfile/LMI_DirectoryContainsFileProvider.c
+++ b/src/logicalfile/LMI_DirectoryContainsFileProvider.c
@@ -127,7 +127,6 @@ static CMPIStatus associators(
CMPIObjectPath *o;
CMPIInstance *ci;
CMPIStatus st;
- CMPIData pathd;
const char *ns = KNameSpace(cop);
st = lmi_check_required(_cb, cop, LOGICALFILE);
@@ -139,8 +138,7 @@ static CMPIStatus associators(
CMReturn(CMPI_RC_OK);
}
- pathd = CMGetKey(cop, "Name", &st);
- const char *path = KChars(pathd.value.string);
+ const char *path = get_string_property_from_op(cop, "Name");
CMPIObjectPath *refs[MAX_REFS];
unsigned int count;
@@ -200,8 +198,6 @@ static CMPIStatus references(
{
LMI_DirectoryContainsFile lmi_dcf;
CMPIStatus st;
- CMPIData pathd;
- CMPIData cd;
const char *ns = KNameSpace(cop);
/* GroupComponent */
@@ -225,10 +221,8 @@ static CMPIStatus references(
return st;
}
- cd = CMGetKey(cop, "CreationClassName", &st);
- const char *ccname = KChars(cd.value.string);
- pathd = CMGetKey(cop, "Name", &st);
- const char *path = KChars(pathd.value.string);
+ const char *ccname = get_string_property_from_op(cop, "CreationClassName");
+ const char *path = get_string_property_from_op(cop, "Name");
char *fsname;
if (get_fsname_from_path(path, &fsname) < 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_FAILED, "Can't get filesystem name");