summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/LMI_UnixDirectoryProvider.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_UnixDirectoryProvider.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_UnixDirectoryProvider.c')
-rw-r--r--src/logicalfile/LMI_UnixDirectoryProvider.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/logicalfile/LMI_UnixDirectoryProvider.c b/src/logicalfile/LMI_UnixDirectoryProvider.c
index 2628982..7face91 100644
--- a/src/logicalfile/LMI_UnixDirectoryProvider.c
+++ b/src/logicalfile/LMI_UnixDirectoryProvider.c
@@ -78,8 +78,7 @@ static CMPIStatus LMI_UnixDirectoryCreateInstance(
LMI_UnixDirectory_InitFromInstance(&lmi_ud, _cb, ci);
CMPIStatus st;
CMPIObjectPath *iop = CMGetObjectPath(ci, &st);
- CMPIData pathd = CMGetKey(iop, "Name", &st);
- const char *path = KChars(pathd.value.string);
+ const char *path = get_string_property_from_op(iop, "Name");
if (mkdir(path, 0777) < 0) {
char errmsg[BUFLEN];
@@ -107,9 +106,7 @@ static CMPIStatus LMI_UnixDirectoryDeleteInstance(
const CMPIResult* cr,
const CMPIObjectPath* cop)
{
- CMPIStatus st;
- CMPIData pathd = CMGetKey(cop, "Name", &st);
- const char *path = KChars(pathd.value.string);
+ const char *path = get_string_property_from_op(cop, "Name");
if (rmdir(path) < 0) {
char errmsg[BUFLEN];