summaryrefslogtreecommitdiffstats
path: root/src/logicalfile/LMI_UnixFileProvider.c
diff options
context:
space:
mode:
authorJan Synacek <jsynacek@redhat.com>2014-01-09 15:41:21 +0100
committerJan Synacek <jsynacek@redhat.com>2014-01-10 09:16:00 +0100
commit9019f10060080eff165c3e6aa3b6461748112ecc (patch)
tree0407d68fffe2b2958fb083f96b1f4fcadd10f408 /src/logicalfile/LMI_UnixFileProvider.c
parent68567e7e27c66e499aed185c58503e65572c891a (diff)
downloadopenlmi-providers-9019f10060080eff165c3e6aa3b6461748112ecc.tar.gz
openlmi-providers-9019f10060080eff165c3e6aa3b6461748112ecc.tar.xz
openlmi-providers-9019f10060080eff165c3e6aa3b6461748112ecc.zip
logicalfile: don't automatically fill FSName and FSCreationClassName
Set there properties on output, meaning when GetInstance() is invoked, only when they are empty. Otherwise leave them unchanged.
Diffstat (limited to 'src/logicalfile/LMI_UnixFileProvider.c')
-rw-r--r--src/logicalfile/LMI_UnixFileProvider.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/logicalfile/LMI_UnixFileProvider.c b/src/logicalfile/LMI_UnixFileProvider.c
index 165eb82..347975c 100644
--- a/src/logicalfile/LMI_UnixFileProvider.c
+++ b/src/logicalfile/LMI_UnixFileProvider.c
@@ -135,11 +135,14 @@ static CMPIStatus LMI_UnixFileGetInstance(
CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, aux);
}
/* set ignored stuff */
+ /* only use udev information if no fs information is provided */
+ /* discarding const qualifiers is ok here, it makes the code a bit more simple */
+ fsname = (char *) KChars(lmi_file.FSName.value);
+ fsclassname = (char *) KChars(lmi_file.FSCreationClassName.value);
st = get_fsinfo_from_stat(_cb, &sb, path, &fsclassname, &fsname);
check_status(st);
LMI_UnixFile_Set_FSCreationClassName(&lmi_file, fsclassname);
LMI_UnixFile_Set_FSName(&lmi_file, fsname);
- free(fsname);
get_class_from_stat(&sb, aux);
LMI_UnixFile_Set_LFCreationClassName(&lmi_file, aux);
@@ -264,4 +267,5 @@ KONKRET_REGISTRATION(
/* vi: set et: */
/* Local Variables: */
/* indent-tabs-mode: nil */
+/* c-basic-offset: 4 */
/* End: */