| 638 | // mount + tree/cat then reach the same VFS that Engine::create |
| 639 | // constructs, with /plugins/<plugin>/ wired up. |
| 640 | extern "C" LMPFS_API void lmpfs_internal_scan_plugins(lmpfs::Engine* eng) { |
| 641 | if (!eng) { |
| 642 | log::info("plugin: scan called with null engine — nothing to do"); |
| 643 | return; |
| 644 | } |
| 645 | log::info("plugin: scan_plugins entered (LMPFS_PLUGINS_DIR={})", |
| 646 | std::getenv("LMPFS_PLUGINS_DIR") ? std::getenv("LMPFS_PLUGINS_DIR") : "(unset)"); |
| 647 | try { scan_and_load_plugins(eng); } |
| 648 | catch (const std::exception& e) { |
| 649 | log::warn("plugin: scan failed — {}", e.what()); |
| 650 | } catch (...) { |
| 651 | log::warn("plugin: scan failed (unknown)"); |
| 652 | } |
| 653 | } |
no test coverage detected