diff options
author | Jan Synacek <jsynacek@redhat.com> | 2013-12-17 10:27:15 +0100 |
---|---|---|
committer | Jan Synacek <jsynacek@redhat.com> | 2013-12-17 11:11:03 +0100 |
commit | 67ae76aecfac0b04f22bea07b87bd7a8ce04a711 (patch) | |
tree | 55da46583bc833564ff8a27625dff80565342e9e /src/logicalfile/LMI_UnixFileProvider.c | |
parent | 9a3adaf677fe49c016774c98e016140055c36afb (diff) | |
download | openlmi-providers-67ae76aecfac0b04f22bea07b87bd7a8ce04a711.tar.gz openlmi-providers-67ae76aecfac0b04f22bea07b87bd7a8ce04a711.tar.xz openlmi-providers-67ae76aecfac0b04f22bea07b87bd7a8ce04a711.zip |
logicalfile: correctly fill FSCreationClassName and FSName
Files residing on nodevice or remote filesystems now correctly set these
properties. FSCreationClassName is set to "LMI_TransientFileSystem" and
FSName is set to "PATH=<path to file>". This behavior is consistent with
how storage providers set those properties. To check for filesystem, the
provider uses udev and checks for ID_FS_UUID_ENC and DEVNAME fields. If
these are not found, filesystem is then considered nodevice or remote.
Additional test for files on transient filesystems has been added.
Diffstat (limited to 'src/logicalfile/LMI_UnixFileProvider.c')
-rw-r--r-- | src/logicalfile/LMI_UnixFileProvider.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/logicalfile/LMI_UnixFileProvider.c b/src/logicalfile/LMI_UnixFileProvider.c index fbe467c..165eb82 100644 --- a/src/logicalfile/LMI_UnixFileProvider.c +++ b/src/logicalfile/LMI_UnixFileProvider.c @@ -120,6 +120,7 @@ static CMPIStatus LMI_UnixFileGetInstance( char aux[BUFLEN]; const char *path; char *fsname; + char *fsclassname; st = lmi_check_required(_cb, cc, cop); if (st.rc != CMPI_RC_OK) { @@ -134,9 +135,9 @@ static CMPIStatus LMI_UnixFileGetInstance( CMReturnWithChars(_cb, CMPI_RC_ERR_NOT_FOUND, aux); } /* set ignored stuff */ - LMI_UnixFile_Set_FSCreationClassName(&lmi_file, FSCREATIONCLASSNAME); - st = get_fsname_from_stat(_cb, &sb, &fsname); + 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); |