diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/logicalfile/LMI_RootDirectoryProvider.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/logicalfile/LMI_RootDirectoryProvider.c b/src/logicalfile/LMI_RootDirectoryProvider.c index 179d146..0399ab1 100644 --- a/src/logicalfile/LMI_RootDirectoryProvider.c +++ b/src/logicalfile/LMI_RootDirectoryProvider.c @@ -59,6 +59,10 @@ static CMPIStatus associators( const char *ns = KNameSpace(cop); const char *comp_ccname = get_system_creation_class_name(); + CMPIData pathd; + pathd = CMGetKey(cop, "Name", &st); + const char *path = KChars(pathd.value.string); + /* * allow only LMI_UnixDirectory and Linux_ComputerSystem * XXX @@ -69,6 +73,11 @@ static CMPIStatus associators( if (CMClassPathIsA(_cb, cop, LMI_UnixDirectory_ClassName, &st)) { /* got LMI_UnixDirectory */ + /* ignore this association if the directory is not root */ + if (strcmp(path, "/")) { + CMReturn(CMPI_RC_OK); + } + CIM_ComputerSystemRef cim_csr; CIM_ComputerSystemRef_Init(&cim_csr, _cb, ns); CIM_ComputerSystemRef_Set_Name(&cim_csr, get_system_name()); |