') { $storePoint = '/'; $currentSource = $wantedSource; } else { $storePoint = CONFIG_VMSTORE_DIR; $currentSource = false; } // Collect free space information foreach ($task['data']['list'] as $entry) { // StorePoint is either the actual directory of the vmstore, or / if we use internal storage if ($entry['mountPoint'] === $storePoint) { $storeUsage = $entry; } // Always report free space on system disk if ($entry['mountPoint'] === '/') { $systemUsage = $entry; } // Record what's mounted at destination, regardless of config, to indicate something is wrong if ($entry['mountPoint'] === CONFIG_VMSTORE_DIR) { $currentSource = $entry['fileSystem']; // If internal/local storage is used but there is a mount on CONFIG_VMSTORE_DIR, // we assume it's on purpose like a second hdd and use that if ($wantedSource === '') { $wantedSource = $currentSource; $storeUsage = $entry; } } } return true; } }