summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/LMI_FileIdentityProvider.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_FileIdentityProvider.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_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");
}