summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/LMI_FileIdentityProvider.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logicalfile/LMI_FileIdentityProvider.c')
-rw-r--r--src/logicalfile/LMI_FileIdentityProvider.c26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/logicalfile/LMI_FileIdentityProvider.c b/src/logicalfile/LMI_FileIdentityProvider.c
index fe3324f..d31c305 100644
--- a/src/logicalfile/LMI_FileIdentityProvider.c
+++ b/src/logicalfile/LMI_FileIdentityProvider.c
@@ -65,8 +65,6 @@ static CMPIStatus associators(
CMPIInstance *ci;
CMPIObjectPath *o;
const char *ns = KNameSpace(cop);
- CMPIData pathd;
- CMPIData cd;
char fileclass[BUFLEN];
char *fsname;
@@ -83,10 +81,8 @@ static CMPIStatus associators(
return st;
}
- pathd = CMGetKey(cop, "LFName", &st);
- cd = CMGetKey(cop, "LFCreationClassName", &st);
- const char *path = KChars(pathd.value.string);
- const char *ccname = KChars(cd.value.string);
+ const char *path = get_string_property_from_op(cop, "LFName");
+ const char *ccname = get_string_property_from_op(cop, "LFCreationClassName");
get_class_from_path(path, fileclass);
if (get_fsname_from_path(path, &fsname) < 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_FAILED, "Can't get filesystem name");
@@ -111,9 +107,7 @@ static CMPIStatus associators(
return st;
}
- pathd = CMGetKey(cop, "Name", &st);
- cd = CMGetKey(cop, "CreationClassName", &st);
- const char *path = KChars(pathd.value.string);
+ const char *path = get_string_property_from_op(cop, "Name");
get_class_from_path(path, fileclass);
if (get_fsname_from_path(path, &fsname) < 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_FAILED, "Can't get filesystem name");
@@ -152,8 +146,6 @@ static CMPIStatus references(
{
LMI_FileIdentity lmi_fi;
CMPIStatus st, res;
- CMPIData pathd;
- CMPIData cd;
const char *ns = KNameSpace(cop);
CMPIInstance *ci;
CMPIObjectPath *o;
@@ -181,10 +173,8 @@ static CMPIStatus references(
return st;
}
- pathd = CMGetKey(cop, "LFName", &st);
- cd = CMGetKey(cop, "LFCreationClassName", &st);
- const char *path = KChars(pathd.value.string);
- const char *ccname = KChars(cd.value.string);
+ const char *path = get_string_property_from_op(cop, "LFName");
+ const char *ccname = get_string_property_from_op(cop, "LFCreationClassName");
get_class_from_path(path, fileclass);
if (get_fsname_from_path(path, &fsname) < 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_FAILED, "Can't get filesystem name");
@@ -212,10 +202,8 @@ static CMPIStatus references(
return st;
}
- pathd = CMGetKey(cop, "Name", &st);
- cd = CMGetKey(cop, "CreationClassName", &st);
- const char *path = KChars(pathd.value.string);
- const char *ccname = KChars(cd.value.string);
+ const char *path = get_string_property_from_op(cop, "Name");
+ const char *ccname = get_string_property_from_op(cop, "CreationClassName");
if (get_fsname_from_path(path, &fsname) < 0) {
CMReturnWithChars(_cb, CMPI_RC_ERR_FAILED, "Can't get filesystem name");
}