From 35a6a5c870164947ce4e865b30e8b93f320d0ab5 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sun, 23 Nov 2025 02:41:00 -0500 Subject: feat: libsteps: error handling and parsing functions/operators. feat: mimick nekernel filesystem tree in repository as well. feat: update modules as well. Signed-off-by: Amlal El Mahrouss --- tools/steps.cc | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/steps.cc b/tools/steps.cc index 3b61ef2..6b9a8f7 100644 --- a/tools/steps.cc +++ b/tools/steps.cc @@ -1,8 +1,8 @@ -/* ------------------------------------------- +/* =========================================================== Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. -------------------------------------------- */ +=========================================================== */ #include #include @@ -10,15 +10,22 @@ Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. /// =========================================================== /// /// Use operators from steps namespace to compare steps records. /// =========================================================== /// -using namespace steps::operators; +using namespace ocl::steps::operators; + +const auto kStepsFileRoot = "/system/install.stp"; /// =========================================================== /// /// @brief Main function for running steps on NeKernel. /// =========================================================== /// -int main(int argc, char **argv) { +int main(void) { ocl::io::print("steps: running steps for program...\n"); - steps::record steps; + std::ifstream file(kStepsFileRoot); + ocl::steps::record steps; + + file >> steps; + + if (!ocl::steps::is_valid(steps)) return EXIT_FAILURE; /// AMLALE: Read steps from file and process them. -- cgit v1.2.3